- Method and path
- POST
/api/v1/entitlements - Authentication
- Server key
- Status codes
-
- 200
- 400
- 401
- 403
- 404
- 413
- 415
- 429
- 503
Authenticate with a server key in Authorization: Bearer <key>. Send a strict JSON object of 4 KiB at most with reader or readerId, not both. Both fields or neither field returns 400 invalid_request.
Use the entitlement read for publisher apps, CRM tools and webhook checks. Use the server check POST /api/v1/access for each article view.
For rate limits and cache rules, read part 17 of the integration guide.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
reader | string, 4,096 characters at most | no | The value of the reader cookie on your site. A value that names no live reader returns known: false. Send this field or readerId, not both. |
readerId | string, UUID | no | The reader ID from data.reader.id in a webhook event or from an earlier answer. An unknown ID returns known: false. Send this field or reader, not both. |
Response 200
| Field | Type | Always present | Description |
|---|---|---|---|
known | boolean | yes | true when the request names a live reader account of the publication. |
readerId | string, UUID or null | yes | The reader ID in this publication, or null when known is false. |
subscription | object or null | yes | The newest subscription of the reader, or null when the reader has no subscription. |
accessKeys | array of strings | yes | The access keys that the reader holds now. The array is empty when the reader has no access. |
Fields in subscription
| Field | Type | Always present | Description |
|---|---|---|---|
id | string, UUID | yes | The ID of the subscription. |
status | trialing, active, past_due or ended | yes | The status at the time of the request. A subscription past its end date has status ended even before the next background run. |
plan.id | string, UUID | yes | The ID of the plan of the subscription. |
plan.name | string | yes | The name of the plan. |
currentPeriodEnd | timestamp, UTC | yes | The end of the current period in UTC. |
cancelAtPeriodEnd | boolean | yes | true when the subscription ends at the end of the current period. |
endsAt | timestamp, UTC or null | yes | The end of the current period while cancelAtPeriodEnd is true, the end date of an ended subscription, or null. |
Example
Request
curl -sS https://konto.example.no/api/v1/entitlements \
-H "Authorization: Bearer $SERVER_KEY" \
-H "Content-Type: application/json" \
-d '{"readerId": "0193f0b2-1111-7a4e-9d2b-3f6a8c1e2d4f"}' Response 200
{
"known": true,
"readerId": "0193f0b2-1111-7a4e-9d2b-3f6a8c1e2d4f",
"subscription": {
"id": "0193f0b2-2222-7a4e-9d2b-3f6a8c1e2d4f",
"status": "active",
"plan": {
"id": "0193f0b2-3333-7a4e-9d2b-3f6a8c1e2d4f",
"name": "Monthly A1"
},
"currentPeriodEnd": "2027-02-10T09:00:00Z",
"cancelAtPeriodEnd": false,
"endsAt": null
},
"accessKeys": [
"paid"
]
} Errors
| Status | code |
|---|---|
| 400 | invalid_request |
| 401 | unauthenticated, key_mode_mismatch |
| 403 | browser_request |
| 404 | no_site |
| 413 | too_large |
| 415 | unsupported_media_type |
| 429 | rate_limited |
| 503 | busy |
Read the cause and action for each code in the Errors reference.