Attach an identity to a person, with evidence (session only)
const url = 'https://quikstik-core.fly.dev/persons/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/identities';const options = { method: 'POST', headers: { 'x-tenant-id': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"kind":"email","value":"example","evidence":"example"}'};
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/persons/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/identities \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-tenant-id: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --data '{ "kind": "email", "value": "example", "evidence": "example" }'A human decision: session bearer only — an operator key is refused. value is
normalised (email and relay aliases lower-cased, phone digits only, ota_ref upper-cased). An
identity belongs to ONE person per tenant: attaching a value another person owns is
409 identity_owned_by_another_person (resolve it with a merge). Re-attaching the same value
to the same person is 200 and writes nothing. 422 for an unknown kind, an impossible
value, or missing/over-long (240 chars) evidence.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path 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.
Request Bodyrequired
Section titled “Request Bodyrequired”object
One line — what proved it.
Responses
Section titled “Responses”Already attached to this person.
Attached.
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"}Expired, consumed, unknown, or unresolvable — indistinguishable by design
object
Example generated
{ "reason": "example"}Another person in this tenant owns the identity (identity_owned_by_another_person, with owner_person_id).
Invalid kind, value or evidence.
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"}