Skip to main content

Developer API (2.0.0)

Download OpenAPI specification:Download

Entitlement

Operations about entitlements.

Get an entitlement

This endpoint requires the following permission(s): project_configuration:entitlements:read. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

entitlement_id
required
string [ 1 .. 255 ] characters
Example: entla1b2c3d4e5

ID of the entitlement

query Parameters
expand
Array of strings[ items [ 1 .. 5000 ] characters ]
Items Value: "product"
Example: expand=product

Specifies which fields in the response should be expanded. Accepted values are: product (requires project_configuration:products:read permission).

Responses

Response samples

Content type
application/json
{
  • "state": "active",
  • "object": "entitlement",
  • "project_id": "proj1ab2c3d4",
  • "id": "entla1b2c3d4e5",
  • "lookup_key": "premium",
  • "display_name": "Premium",
  • "created_at": 1658399423658,
  • "products": {
    }
}

Update an entitlement

This endpoint requires the following permission(s): project_configuration:entitlements:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

entitlement_id
required
string [ 1 .. 255 ] characters
Example: entla1b2c3d4e5

ID of the entitlement

Request Body schema: application/json
required
display_name
required
string [ 1 .. 1500 ] characters

The display name of the entitlement

Responses

Request samples

Content type
application/json
{
  • "display_name": "Premium"
}

Response samples

Content type
application/json
{
  • "state": "active",
  • "object": "entitlement",
  • "project_id": "proj1ab2c3d4",
  • "id": "entla1b2c3d4e5",
  • "lookup_key": "premium",
  • "display_name": "Premium",
  • "created_at": 1658399423658,
  • "products": {
    }
}

Delete an entitlement

This endpoint requires the following permission(s): project_configuration:entitlements:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

entitlement_id
required
string [ 1 .. 255 ] characters
Example: entla1b2c3d4e5

ID of the entitlement

Responses

Response samples

Content type
application/json
{
  • "object": "app",
  • "id": "string",
  • "deleted_at": 1658399423658
}

Get a list of entitlements

This endpoint requires the following permission(s): project_configuration:entitlements:read. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

query Parameters
starting_after
string
Example: starting_after=ent12354

Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page.

limit
integer
Default: 20
Example: limit=10

Maximum number of items to return per page. Values below 1 or above 100 are clamped to that range rather than rejected.

expand
Array of strings[ items [ 1 .. 5000 ] characters ]
Items Value: "items.product"
Example: expand=items.product

Specifies which fields in the response should be expanded. Accepted values are: items.product (requires project_configuration:products:read permission).

Responses

Response samples

Content type
application/json
{
  • "object": "list",
  • "items": [
    ],
  • "next_page": "/v2/projects/proj1ab2c3d4/entitlements?starting_after=entlab21dac",
  • "url": "/v2/projects/proj1ab2c3d4/entitlements"
}

Create an entitlement

This endpoint requires the following permission(s): project_configuration:entitlements:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

Request Body schema: application/json
required
lookup_key
required
string [ 1 .. 200 ] characters

The identifier of the entitlement

display_name
required
string [ 1 .. 1500 ] characters

The display name of the entitlement

Responses

Request samples

Content type
application/json
{
  • "lookup_key": "premium",
  • "display_name": "Premium access to all features"
}

Response samples

Content type
application/json
{
  • "state": "active",
  • "object": "entitlement",
  • "project_id": "proj1ab2c3d4",
  • "id": "entla1b2c3d4e5",
  • "lookup_key": "premium",
  • "display_name": "Premium",
  • "created_at": 1658399423658,
  • "products": {
    }
}

Get a list of products attached to a given entitlement

This endpoint requires the following permission(s): project_configuration:entitlements:read. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

entitlement_id
required
string [ 1 .. 255 ] characters
Example: entla1b2c3d4e5

ID of the entitlement

query Parameters
starting_after
string
Example: starting_after=ent12354

Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page.

limit
integer
Default: 20
Example: limit=10

Maximum number of items to return per page. Values below 1 or above 100 are clamped to that range rather than rejected.

Responses

Response samples

Content type
application/json
{
  • "object": "list",
  • "items": [
    ],
  • "next_page": "/v2/projects/proj1ab2c3d4/entitlements/entla1b2c3d4e5/products?starting_after=prod1a2b3c4d5",
  • "url": "/v2/projects/proj1ab2c3d4/entitlements/entla1b2c3d4e5/products"
}

Archive an entitlement

Archives an entitlement (makes it inactive). This endpoint requires the following permission(s): project_configuration:entitlements:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

entitlement_id
required
string [ 1 .. 255 ] characters
Example: entla1b2c3d4e5

ID of the entitlement

Responses

Response samples

Content type
application/json
{
  • "state": "active",
  • "object": "entitlement",
  • "project_id": "proj1ab2c3d4",
  • "id": "entla1b2c3d4e5",
  • "lookup_key": "premium",
  • "display_name": "Premium",
  • "created_at": 1658399423658,
  • "products": {
    }
}

Unarchive an entitlement

Unarchives an entitlement (makes it active). This endpoint requires the following permission(s): project_configuration:entitlements:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

entitlement_id
required
string [ 1 .. 255 ] characters
Example: entla1b2c3d4e5

ID of the entitlement

Responses

Response samples

Content type
application/json
{
  • "state": "active",
  • "object": "entitlement",
  • "project_id": "proj1ab2c3d4",
  • "id": "entla1b2c3d4e5",
  • "lookup_key": "premium",
  • "display_name": "Premium",
  • "created_at": 1658399423658,
  • "products": {
    }
}

Attach a set of products to an entitlement

This endpoint requires the following permission(s): project_configuration:entitlements:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

entitlement_id
required
string [ 1 .. 255 ] characters
Example: entla1b2c3d4e5

ID of the entitlement

Request Body schema: application/json
required
product_ids
required
Array of strings [ 1 .. 50 ] characters [ items [ 1 .. 255 ] characters ]

IDs of the products to be attached to the entitlement.

Responses

Request samples

Content type
application/json
{
  • "product_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "state": "active",
  • "object": "entitlement",
  • "project_id": "proj1ab2c3d4",
  • "id": "entla1b2c3d4e5",
  • "lookup_key": "premium",
  • "display_name": "Premium",
  • "created_at": 1658399423658,
  • "products": {
    }
}

Detach a set of product from an entitlement

This endpoint requires the following permission(s): project_configuration:entitlements:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

entitlement_id
required
string [ 1 .. 255 ] characters
Example: entla1b2c3d4e5

ID of the entitlement

Request Body schema: application/json
required
product_ids
required
Array of strings [ 1 .. 50 ] characters [ items [ 1 .. 255 ] characters ]

IDs of the products to be detached from the entitlement.

Responses

Request samples

Content type
application/json
{
  • "product_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "state": "active",
  • "object": "entitlement",
  • "project_id": "proj1ab2c3d4",
  • "id": "entla1b2c3d4e5",
  • "lookup_key": "premium",
  • "display_name": "Premium",
  • "created_at": 1658399423658,
  • "products": {
    }
}