Skip to content

Create a durable customer identity

POST
/persons
curl --request POST \
--url https://quikstik-core.fly.dev/persons \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: example' \
--header 'x-tenant-id: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--data '{ "display_name": "example", "email": "example" }'

Creates a tenant-scoped Person. The display name is required and non-empty; the email, when present, is validated and normalized server-side. Idempotent on the envelope key.

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
display_name
required
string
>= 1 characters
email

Validated and normalized server-side; optional.

string

Example generated

{
"display_name": "example",
"email": "example"
}

Command accepted; the Person identifier is assigned server-side

Media typeapplication/json
object
person_id
required
string format: uuid

Example generated

{
"person_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"
}