Skip to main content
POST
/
api
/
v1
/
plans
/
entitlement
Add an entitlement to a plan
curl --request POST \
  --url https://dev-billing-api.iqraa.ai/api/v1/api/v1/plans/entitlement \
  --header 'Content-Type: application/json' \
  --header 'x-admin-api-key: <x-admin-api-key>' \
  --data '
{
  "planAndEntitlementQuotas": [
    {
      "planCode": "specter_starter_monthly",
      "name": "Document Review",
      "code": "SPECTER_DOCUMENT_REVIEW",
      "description": "Document Review",
      "isReportable": true,
      "quota": 1000
    }
  ]
}
'
[
  {
    "planCode": "specter_starter_monthly",
    "name": "Document Review",
    "code": "SPECTER_DOCUMENT_REVIEW",
    "description": "Document Review",
    "isReportable": true,
    "quota": 1000
  }
]

Headers

x-admin-api-key
string
required

The API key to access the admin API

Body

application/json
planAndEntitlementQuotas
object[]
required

The list of plans and entitlements to add

Response

The entitlement has been successfully added to the plan

planCode
string
required

The Code of the plan

Example:

"specter_starter_monthly"

name
string
required

The name of the entitlement

Example:

"Document Review"

code
string
required

The code of the entitlement

Example:

"SPECTER_DOCUMENT_REVIEW"

description
string
required

The description of the entitlement

Example:

"Document Review"

isReportable
boolean
required

Whether the entitlement is reportable

Example:

true

quota
number
required

The quota for the entitlement

Example:

1000