Reference / Authz

Write a relationship tuple (idempotent).

POST /v1/authz/relations
End-user session operationId: write_relation

Authorization

Called from the browser with the publishable application id (x-application-id); the access token lives in memory.

Request body · required

  • object string required
  • relation string required
  • subject string required

Responses

201 Tuple written
{
  "data": {
    "created_at": "2026-01-15T09:30:00Z",
    "object": "document:readme",
    "relation": "editor",
    "subject": "user:alice"
  },
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "timestamp": "string"
  },
  "success": false
}
422 Malformed object/subject/relation

Request

curl -X POST "http://localhost:8080/v1/authz/relations" \
  -H "Content-Type: application/json" \
  -d '{
  "object": "document:readme",
  "relation": "editor",
  "subject": "user:alice"
}'

Try it

live request
POST http://localhost:8080/v1/authz/relations

Request body

application/json