> ## Documentation Index
> Fetch the complete documentation index at: https://billing-docs.platform.ai71services.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Add an entitlement to a plan

> Add an entitlement to a plan with the provided details. Note: This endpoint is restricted for internal use only.



## OpenAPI

````yaml specs/billing_api_docs.json post /api/v1/plans/entitlement
openapi: 3.0.1
info:
  title: Billing API
  description: Billing service for managing subscriptions, payments, and entitlements
  contact: {}
  version: '1.0'
servers:
  - url: https://dev-billing-api.iqraa.ai/api/v1
security: []
tags:
  - name: Customers
    description: Customers related endpoints
  - name: Subscriptions
    description: Subscription related endpoints
  - name: Plans
    description: Plans related endpoints
  - name: Entitlements
    description: Entitlements related endpoints
  - name: Payments
    description: Payments related endpoints
  - name: Emails
    description: Email related endpoints
paths:
  /api/v1/plans/entitlement:
    post:
      tags:
        - Plans
      summary: Add an entitlement to a plan
      description: >-
        Add an entitlement to a plan with the provided details. Note: This
        endpoint is restricted for internal use only.
      operationId: PlansController_addEntitlementToPlan
      parameters:
        - name: x-admin-api-key
          in: header
          description: The API key to access the admin API
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddEntitlementDto'
      responses:
        '201':
          description: The entitlement has been successfully added to the plan
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AddEntitlementDtoEntry'
        '400':
          description: Bad Request - Invalid entitlement data or duplicate entitlements
        '401':
          description: Unauthorized - Missing or invalid admin API key
        '404':
          description: Not Found - Plan not found
components:
  schemas:
    AddEntitlementDto:
      type: object
      properties:
        planAndEntitlementQuotas:
          description: The list of plans and entitlements to add
          type: array
          items:
            $ref: '#/components/schemas/AddEntitlementDtoEntry'
      required:
        - planAndEntitlementQuotas
    AddEntitlementDtoEntry:
      type: object
      properties:
        planCode:
          type: string
          example: specter_starter_monthly
          description: The Code of the plan
        name:
          type: string
          example: Document Review
          description: The name of the entitlement
        code:
          type: string
          example: SPECTER_DOCUMENT_REVIEW
          description: The code of the entitlement
        description:
          type: string
          example: Document Review
          description: The description of the entitlement
        isReportable:
          type: boolean
          example: true
          description: Whether the entitlement is reportable
        quota:
          type: number
          example: 1000
          description: The quota for the entitlement
      required:
        - planCode
        - name
        - code
        - description
        - isReportable
        - quota

````