Skip to content

Assert a typed relationship edge between two subjects

POST
/relationship-edges
curl --request POST \
--url https://quikstik-core.fly.dev/relationship-edges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: example' \
--header 'x-tenant-id: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--data '{ "kind": "guardian_of", "from": { "subject_type": "person", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }, "to": { "subject_type": "person", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }, "effective_from_ms": 1, "effective_to_ms": 1 }'

Records a typed, effective-dated relationship (guardian_of / payer_for / coordinator_for / receives_communications_for) from one subject (Person or Organization) to another. guardian_of requires Person endpoints; a self-referential edge is rejected (400). Legal, financial, and coordination edges are independent (arch-032 §4.1).

x-tenant-id
required
string format: uuid

Tenant identifier (UUID).

Authn/authz semantics are intentionally TBD for this contract slice; this header exists to keep the contract explicitly multi-tenant from day 0.

Idempotency-Key
required
string
>= 1 characters

Idempotency key for the command envelope. A retry with the same key is a no-op.

Media typeapplication/json
object
kind
required
string
Allowed values: guardian_of payer_for coordinator_for receives_communications_for assigned_resource
from
required

A subject in the relationship graph. participant and resource participate only in the assigned_resource edge; the people-graph kinds relate persons and organizations.

object
subject_type
required
string
Allowed values: person organization participant resource
id
required
string format: uuid
to
required

A subject in the relationship graph. participant and resource participate only in the assigned_resource edge; the people-graph kinds relate persons and organizations.

object
subject_type
required
string
Allowed values: person organization participant resource
id
required
string format: uuid
effective_from_ms
required
integer format: int64
effective_to_ms
integer format: int64
nullable

Edge accepted; the edge identifier is assigned server-side

Media typeapplication/json
object
edge_id
required
string format: uuid

Example generated

{
"edge_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Malformed body

Media typeapplication/json
object
reason
required
string

Example generated

{
"reason": "example"
}

Missing or invalid session bearer token

Media typeapplication/json
object
reason
required

Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).

string

Example

{
"reason": "sold_out"
}

The session’s effect authority does not cover this operation

Media typeapplication/json
object
reason
required

Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).

string

Example

{
"reason": "sold_out"
}

No durable backend is wired for this operation (fail-closed)

Media typeapplication/json
object
reason
required

Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).

string

Example

{
"reason": "sold_out"
}