Enroll members
Goal: identify a member so events and redemptions have someone to apply to.
Create or update a member
Section titled “Create or update a member”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.
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" }'{ "customer_uuid": "c0ffee00-0000-4000-8000-000000000001", "channel": "shopify", "external_id": "cust_5512", "created": true, "updated_at": "2026-07-24T12:00:00.000Z"}const customer = await tessera.customers.upsert({ externalId: 'cust_5512', email: 'ada@example.com', name: 'Ada Lovelace',});console.log(customer.created ? 'enrolled' : 'updated', customer.customerUuid);Update a profile
Section titled “Update a profile”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.
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 }'Link or unlink a channel
Section titled “Link or unlink a channel”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.
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" }'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.
Common errors
Section titled “Common errors”code | Status | Cause |
|---|---|---|
invalid_request | 400 | external_id missing, or a malformed body. |
customer_not_found | 404 | PATCH/links target a ref/uuid that doesn’t exist in this tenant. |
customer_erased | 410 | The customer’s PII was erased (GDPR) — it can no longer accept profile writes. |
profile_validation_error | 422 | A profile field (e.g. email) failed semantic validation — see details.field. |
See Members & channels for the identity model these calls build on.