headless lms

Revoke a person's grant to content or a bundle

POST /api/entitlements/revoke. Revoke a person's grant to content or a bundle. Headless LMS Entitlements API reference.

POST
/api/entitlements/revoke

Requires access:write; to revoke an event, events:write on it is enough, and a person may revoke their own. Name exactly one of contentId and bundleId. Revokes the person's direct grant; access through a bundle stays. Granting again makes it active. 404 when they have no direct active grant.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/entitlements/revoke" \  -H "Content-Type: application/json" \  -d '{    "orgUserId": "string"  }'
{  "orgId": "string",  "id": "string",  "orgUserId": "string",  "bundleId": "string",  "contentId": "string",  "status": "active",  "source": "string",  "grantedAt": "2019-08-24T14:15:22Z",  "expiresAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
{  "error": "string",  "message": "string",  "requestId": "string",  "issues": [    {      "path": "string",      "message": "string"    }  ]}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}