Customer API Reference
BetaBrowser-callable API for signed-in buyers and members on your site (https://{site}/api/v1/customer). Pair with <kanorio-login> and <kanorio-unit> from @kanorio/elements or call directly with a Customer Session Bearer token. Generated from packages/shared/openapi/customer.json.
Before you start
- Authenticate buyers via passwordless email code or magic link (/auth/challenge → /auth/verify) to receive a Bearer session token.
- All responses are private to the signed-in contact (Cache-Control: private, no-store).
- POST /units/{id}/open verifies Entitlement, release schedule, and tier scope before minting a 600-second signed playback/download URL.
Base URL
Endpoint descriptions match what AI assistants read.
Authentication, Session & Profile
/auth/challengecustomer_auth_challenge
BetaRequest a login code / magic link by email
- Permission
- none
- Rate limit
- Per-IP & per-site rate limited
curl -X POST "https://{site}/api/v1/customer/auth/challenge" \
-H "Content-Type: application/json" \
-d '{"email":"reader@example.com","locale":"string","returnTo":"string","altcha":"string"}'/auth/verifycustomer_auth_verify
BetaExchange a code or magic-link token for a Bearer session
- Permission
- none
- Rate limit
- Per-IP & per-site rate limited
curl -X POST "https://{site}/api/v1/customer/auth/verify" \
-H "Content-Type: application/json" \
-d '{"method":"code","email":"string","code":"string"}'/mecustomer_me
BetaRead-onlyCurrent contact and sessions
- Permission
- Bearer knr_cat_* (customer session)
- Rate limit
- Per-IP & per-site rate limited
curl -X GET "https://{site}/api/v1/customer/me" \
-H "Authorization: Bearer $KANORIO_TOKEN"/sessioncustomer_session_revoke
BetaRevoke sessions
- Permission
- Bearer knr_cat_* (customer session)
- Rate limit
- Per-IP & per-site rate limited
Query parameters
modestringsessionIdstring
curl -X DELETE "https://{site}/api/v1/customer/session" \
-H "Authorization: Bearer $KANORIO_TOKEN"Deliverables, Protected Units, Progress & Access
/deliverablescustomer_deliverables_list
BetaRead-onlyDeliverables the customer has access to
- Permission
- Bearer knr_cat_* (customer session)
- Rate limit
- Per-IP & per-site rate limited
curl -X GET "https://{site}/api/v1/customer/deliverables" \
-H "Authorization: Bearer $KANORIO_TOKEN"/deliverables/{key}customer_deliverables_get
BetaRead-onlyDeliverable tree with per-unit access and progress
- Permission
- Bearer knr_cat_* (customer session)
- Rate limit
- Per-IP & per-site rate limited
Path parameters
keystringRequired
curl -X GET "https://{site}/api/v1/customer/deliverables/{key}" \
-H "Authorization: Bearer $KANORIO_TOKEN"/deliverables/{key}/progresscustomer_deliverables_progress
BetaRead-onlyProgress summary for a deliverable
- Permission
- Bearer knr_cat_* (customer session)
- Rate limit
- Per-IP & per-site rate limited
Path parameters
keystringRequired
curl -X GET "https://{site}/api/v1/customer/deliverables/{key}/progress" \
-H "Authorization: Bearer $KANORIO_TOKEN"/units/{id}/opencustomer_units_open
BetaGet a short-lived URL to read or download a unit
- Permission
- Bearer knr_cat_* (customer session)
- Rate limit
- Per-IP & per-site rate limited
Path parameters
idstringRequired
curl -X POST "https://{site}/api/v1/customer/units/{id}/open" \
-H "Authorization: Bearer $KANORIO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"mode":"read"}'/progresscustomer_progress_report
BetaReport playback/reading progress (server decides completion)
- Permission
- Bearer knr_cat_* (customer session)
- Rate limit
- Per-IP & per-site rate limited
curl -X POST "https://{site}/api/v1/customer/progress" \
-H "Authorization: Bearer $KANORIO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"unitId":"string","reports":[{"positionSeconds":1,"durationSeconds":1,"completed":true}]}'/access/{id}customer_access_check
BetaRead-onlyCheck access to a deliverable (id or key) or a unit (`type=unit`)
- Permission
- Bearer knr_cat_* (customer session)
- Rate limit
- Per-IP & per-site rate limited
Path parameters
idstringRequired
Query parameters
typestring
curl -X GET "https://{site}/api/v1/customer/access/{id}" \
-H "Authorization: Bearer $KANORIO_TOKEN"Error codes
{
"error": {
"code": "ITEM_NOT_FOUND",
"message": "Item not found."
}
}| Code | HTTP |
|---|---|
| BAD_REQUEST / QUERY_INVALID | 400 |
| UNAUTHORIZED / PREVIEW_UNAUTHORIZED | 401 |
| FORBIDDEN / NO_ENTITLEMENT / NOT_YET_RELEASED | 403 |
| NOT_FOUND / COLLECTION_NOT_FOUND / ITEM_NOT_FOUND | 404 |
| RATE_LIMITED | 429 |