Create a ReBAC relationship tuple.
POST
/api/admin/rebac/tuples
Code sample: Shell / cURL
curl --request POST \ --url https://auth.example.com/api/admin/rebac/tuples \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "relationship_type": "support_delegate", "from_type": "admin_user", "from_id": "admin_123", "to_type": "tenant_resource", "to_id": "tenant_123", "permission_level": "limited", "is_transitive": false, "is_bidirectional": false, "expires_at": 1770086400000, "metadata": { "ticket_id": "SUP-1234" } }'Create a relationship tuple for the current tenant. from_type defaults to subject, permission_level defaults to full, and expires_at is stored in seconds after accepting milliseconds.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
relationship_type
required
string
from_type
string
from_id
required
string
to_type
string
to_id
required
string
permission_level
string
expires_at
integer format: int64
metadata
object
key
additional properties
is_transitive
boolean
is_bidirectional
boolean
key
additional properties
Example
{ "relationship_type": "support_delegate", "from_type": "admin_user", "from_id": "admin_123", "to_type": "tenant_resource", "to_id": "tenant_123", "permission_level": "limited", "is_transitive": false, "is_bidirectional": false, "expires_at": 1770086400000, "metadata": { "ticket_id": "SUP-1234" }}Responses
Section titled “ Responses ”Created or returned admin ReBAC relationship.
Media type application/json
object
id
required
string
tenant_id
required
string
relationship_type
required
string
from_type
required
string
from_id
required
string
to_type
required
string
to_id
required
string
permission_level
required
string
expires_at
required
integer | null format: int64
is_bidirectional
required
boolean
metadata
required
object | null
created_at
required
integer format: int64
updated_at
required
integer format: int64
key
additional properties
Example
{ "id": "rel_admin_support_001", "tenant_id": "tenant_123", "relationship_type": "support_delegate", "from_type": "admin_user", "from_id": "admin_123", "to_type": "tenant_resource", "to_id": "tenant_123", "permission_level": "limited", "expires_at": 1770086400000, "is_bidirectional": false, "metadata": { "ticket_id": "SUP-1234" }, "created_at": 1770000000000, "updated_at": 1770000000000}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}