Mailmus

Entitlements

POST
/projects/{projectId}/b2b/entitlements/check

Answers for one organization and one feature. An undeclared feature is a refusal, not an error, so your code can ask for any key.

AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/projects/string/b2b/entitlements/check" \  -H "Content-Type: application/json" \  -d '{    "featureKey": "seats"  }'
{  "featureKey": "string",  "type": "BOOLEAN",  "enabled": true,  "limit": 0,  "source": "OVERRIDE",  "planKey": "string",  "reason": "string",  "expiresAt": "2019-08-24T14:15:22Z"}
GET
/projects/{projectId}/b2b/organizations/{organizationId}/entitlements
AuthorizationBearer <token>

In: header

Path Parameters

organizationId*string
projectId*string

Response Body

application/json

curl -X GET "https://example.com/projects/string/b2b/organizations/string/entitlements"
[  {    "featureKey": "string",    "type": "BOOLEAN",    "enabled": true,    "limit": 0,    "source": "OVERRIDE",    "planKey": "string",    "reason": "string",    "expiresAt": "2019-08-24T14:15:22Z"  }]
PUT
/projects/{projectId}/b2b/organizations/{organizationId}/plan

Send null to take it off every plan.

AuthorizationBearer <token>

In: header

Path Parameters

organizationId*string
projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X PUT "https://example.com/projects/string/b2b/organizations/string/plan" \  -H "Content-Type: application/json" \  -d '{    "planKey": "pro"  }'
Empty
DELETE
/projects/{projectId}/b2b/organizations/{organizationId}/entitlements/{featureKey}
AuthorizationBearer <token>

In: header

Path Parameters

organizationId*string
featureKey*string
projectId*string

Response Body

application/json

curl -X DELETE "https://example.com/projects/string/b2b/organizations/string/entitlements/string"
{  "featureKey": "string",  "type": "BOOLEAN",  "enabled": true,  "limit": 0,  "source": "OVERRIDE",  "planKey": "string",  "reason": "string",  "expiresAt": "2019-08-24T14:15:22Z"}
PUT
/projects/{projectId}/b2b/organizations/{organizationId}/entitlements/{featureKey}
AuthorizationBearer <token>

In: header

Path Parameters

organizationId*string
featureKey*string
projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PUT "https://example.com/projects/string/b2b/organizations/string/entitlements/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "featureKey": "string",  "type": "BOOLEAN",  "enabled": true,  "limit": 0,  "source": "OVERRIDE",  "planKey": "string",  "reason": "string",  "expiresAt": "2019-08-24T14:15:22Z"}