Add a Person to an Organization with a domain role
const url = 'https://quikstik-core.fly.dev/org-memberships';const options = { method: 'POST', headers: { 'x-tenant-id': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', 'Idempotency-Key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"org_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","person_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","role":"member","effective_from_ms":1,"effective_to_ms":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://quikstik-core.fly.dev/org-memberships \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --header 'x-tenant-id: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --data '{ "org_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "person_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "role": "member", "effective_from_ms": 1, "effective_to_ms": 1 }'Binds a Person into an Organization with a domain role (member / coordinator /
payer_contact / guardian_contact), effective-dated with a half-open window. The role is a
domain descriptor only — it grants no operator authority.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”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 for the command envelope. A retry with the same key is a no-op.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Open (null) means ongoing.
Responses
Section titled “Responses”Membership accepted; the membership identifier is assigned server-side
object
Example generated
{ "membership_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Malformed body
object
Example generated
{ "reason": "example"}Missing or invalid session bearer token
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}The session’s effect authority does not cover this operation
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}No durable backend is wired for this operation (fail-closed)
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}