Skip to content

Restore credits

POST /api/v2/entitlements/restore

Restores credits to a contact’s entitlement, typically when an appointment is cancelled. Requires the restore scope, is idempotent via request_id, and is subject to the workspace cancellation-window setting.

FieldTypeRequiredNotes
location_idstringyesMust match the token’s location
request_idstringyesIdempotency key
external_contact_idstringyes†Provider-neutral contact id. Send this or ghl_contact_id — interchangeable; must match the id used on the grant
ghl_contact_idstringyes†The GoHighLevel contact id. Interchangeable with external_contact_id
product_config_idstringyes*The product config to restore into
calendar_idstringyes*Alternative to product_config_id
amountintegernoCredits to restore; defaults to 1
external_refstringnoBooking or event reference
appointment_timestringnoISO 8601 timestamp of the cancelled appointment (used for the window check)

* Either product_config_id or calendar_id is required.
† Exactly one of external_contact_id or ghl_contact_id is required.

Terminal window
curl -X POST https://app.<your-domain>/api/v2/entitlements/restore \
-H "Authorization: Bearer ktly_<your-token>" \
-H "Content-Type: application/json" \
-d '{
"location_id": "loc_1",
"request_id": "booking-123-restore",
"ghl_contact_id": "ghl_contact_123",
"product_config_id": "pc_package_1",
"amount": 1,
"external_ref": "booking_123",
"appointment_time": "2026-05-01T10:00:00.000Z"
}'
{
"ok": true,
"reason_code": "restored",
"correlation_id": "a1b2c3d4-...",
"balance_after": 10,
"entitlement_id": "kotally-entitlement-uuid"
}
  • Pass appointment_time so Kotally can enforce the cancellation window; a restore outside the window is rejected with CANCELLATION_WINDOW_EXPIRED.
reason_codeMeaning
NO_ENTITLEMENTContact has no matching entitlement
CANCELLATION_WINDOW_EXPIREDThe appointment is outside the allowed cancellation window
BILLING_SUSPENDEDWorkspace billing is suspended
REQUEST_IN_PROGRESSSame request_id is still being processed — retry after a short delay

See the Overview for HTTP status codes and the full reason-code list.