POST /v1/tenants/{tenant_id}/data/write
The Write Data endpoint stores relationship tuples and/or attributes in Permify’s authorization data store. These records form the graph that the permission engine traverses when evaluating access checks.
You can write tuples (e.g. organization:1#admin@user:3), attributes (e.g. document:1$is_private|boolean:true), or both in a single request.
The response includes a snap_token representing the state of the database after the write. Pass this token in subsequent read or check requests to guarantee you read your own writes.
Use this endpoint for both relationship data and attribute data. Both
tuples and attributes arrays are optional; include whichever you need.Path Parameters
The tenant identifier. Use
t1 for single-tenant deployments. Must match ^([a-zA-Z0-9_\-@\.:+]{1,128}|\*)$.Request Body
Relationship tuples to write.
Attribute data to write.
Response
A token representing the database state after the write. Pass this to subsequent check or read requests via
metadata.snap_token to ensure consistency.Examples
Write a relationship tuple
Write a tuple and an attribute together
Error Codes
| HTTP Status | Description |
|---|---|
400 | Bad request — invalid entity types, relation names, or attribute values |
401 | Unauthorized |
404 | Tenant not found |
429 | Rate limit exceeded |
500 | Internal server error |