Skip to content

Entitlement ops

These endpoints mirror the entitlement actions in Admin → Contacts. All require the manage scope, a location_id in the JSON body, and a request_id for idempotency. The path :id is the internal entitlement UUID (returned by grants and deduct responses, or visible in admin).

POST /api/v2/entitlements/:id/pause

Pauses an entitlement until paused_until. Only works when pause is enabled in location settings.

FieldTypeRequiredNotes
location_idstringyesMust match the token’s location
request_idstringyesIdempotency key
paused_untilstringyesISO 8601 datetime in the future
Terminal window
curl -X POST https://app.<your-domain>/api/v2/entitlements/kotally-entitlement-uuid/pause \
-H "Authorization: Bearer ktly_<your-token>" \
-H "Content-Type: application/json" \
-d '{
"location_id": "loc_1",
"request_id": "pause-ent-123",
"paused_until": "2026-06-01T00:00:00.000Z"
}'
POST /api/v2/entitlements/:id/unpause

Clears the pause on an entitlement and returns it to active status.

FieldTypeRequiredNotes
location_idstringyesMust match the token’s location
request_idstringyesIdempotency key
Terminal window
curl -X POST https://app.<your-domain>/api/v2/entitlements/kotally-entitlement-uuid/unpause \
-H "Authorization: Bearer ktly_<your-token>" \
-H "Content-Type: application/json" \
-d '{
"location_id": "loc_1",
"request_id": "unpause-ent-123"
}'
POST /api/v2/entitlements/:id/adjust

Adds or removes credits manually. Same rules as admin — a negative delta cannot bring the balance below zero.

FieldTypeRequiredNotes
location_idstringyesMust match the token’s location
request_idstringyesIdempotency key
deltaintegeryesNon-zero integer; positive adds credits, negative removes
notestringyesNon-empty reason for the adjustment (stored in the ledger)
Terminal window
curl -X POST https://app.<your-domain>/api/v2/entitlements/kotally-entitlement-uuid/adjust \
-H "Authorization: Bearer ktly_<your-token>" \
-H "Content-Type: application/json" \
-d '{
"location_id": "loc_1",
"request_id": "adjust-ent-123",
"delta": 2,
"note": "Comp class for missed session"
}'
POST /api/v2/entitlements/:id/extend-expiry

Extends the expiry date on a package entitlement. Provide exactly one of extends_to or extend_days. Membership entitlements cannot be extended.

FieldTypeRequiredNotes
location_idstringyesMust match the token’s location
request_idstringyesIdempotency key
extends_tostringone of†ISO 8601 datetime in the future — sets expiry to this date
extend_daysintegerone of†Positive integer — adds this many days to the current expiry

† Provide exactly one of extends_to or extend_days.

Terminal window
curl -X POST https://app.<your-domain>/api/v2/entitlements/kotally-entitlement-uuid/extend-expiry \
-H "Authorization: Bearer ktly_<your-token>" \
-H "Content-Type: application/json" \
-d '{
"location_id": "loc_1",
"request_id": "extend-ent-123",
"extend_days": 14
}'

All four endpoints return the same shape on success:

{
"ok": true,
"reason_code": "entitlement_paused",
"correlation_id": "a1b2c3d4-...",
"entitlement": {
"id": "kotally-entitlement-uuid",
"contact_id": "contact-uuid",
"product_config_id": "pc_package_1",
"status": "paused",
"credits_remaining": 4,
"expires_at": "2026-06-15T00:00:00.000Z",
"paused_until": "2026-06-01T00:00:00.000Z",
"updated_at": "2026-05-01T12:00:00.000Z"
}
}

Success reason_code values: entitlement_paused, entitlement_unpaused, entitlement_adjusted, entitlement_expiry_extended.

StatusWhen
400Validation error (missing field, invalid delta, membership extend rejected, pause disabled)
403BILLING_SUSPENDED — workspace billing is suspended
404Entitlement not found for this location

See the Overview for the full error model.