Skip to content

Enroll members

Goal: identify a member so events and redemptions have someone to apply to.

POST /v1/customers resolves-or-creates by (channel, external_id) — channel defaults to "api" if you omit it. Any profile fields you include (email, name, birthday, locale, social_handles, marketing_consent) are merged in.

Terminal window
curl -X POST https://sandbox.usetessera.io/v1/customers \
-H "Authorization: Bearer $TESSERA_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"external_id": "cust_5512",
"channel": "shopify",
"email": "ada@example.com",
"name": "Ada Lovelace"
}'
201 (first creation) / 200 (merged into an existing member)
{
"customer_uuid": "c0ffee00-0000-4000-8000-000000000001",
"channel": "shopify",
"external_id": "cust_5512",
"created": true,
"updated_at": "2026-07-24T12:00:00.000Z"
}

PATCH /v1/customers/{ref} merges profile fields — ref is either the customer_uuid or an external_id on the api channel. An absent field is left untouched; sending a field as null clears it.

Terminal window
curl -X PATCH https://sandbox.usetessera.io/v1/customers/c0ffee00-0000-4000-8000-000000000001 \
-H "Authorization: Bearer $TESSERA_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{ "birthday": "1990-05-01", "locale": null }'

Attach an additional (channel, external_id) to an existing member — useful when the same person is recognized on a second channel after the fact: POST .../links to link, DELETE .../links/{channel}/{externalId} to unlink.

Terminal window
curl -X POST https://sandbox.usetessera.io/v1/customers/c0ffee00-0000-4000-8000-000000000001/links \
-H "Authorization: Bearer $TESSERA_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{ "channel": "pos", "external_id": "pos-8841" }'
Terminal window
curl -X DELETE https://sandbox.usetessera.io/v1/customers/c0ffee00-0000-4000-8000-000000000001/links/pos/pos-8841 \
-H "Authorization: Bearer $TESSERA_SECRET_KEY"

Unlinking is idempotent — calling it on an already-unlinked pair still returns 200.

codeStatusCause
invalid_request400external_id missing, or a malformed body.
customer_not_found404PATCH/links target a ref/uuid that doesn’t exist in this tenant.
customer_erased410The customer’s PII was erased (GDPR) — it can no longer accept profile writes.
profile_validation_error422A profile field (e.g. email) failed semantic validation — see details.field.

See Members & channels for the identity model these calls build on.