Auth API reference

Auth API · Consumer-Me

post/{app_slug}/v1/me/contactsAuth

Add a new contact (unverified, non-primary)

Adds an email or phone contact to the EndUser. The contact starts unverified and non-primary. Verification is a separate flow — call /auth/request-verification with the contact value and the customer's PAK to mint a code, then submit via /auth/verify.

Path parameters

app_slug*string

Slug of the app.

Headers

Idempotency-Keystring

Retry safety: a repeat with the same key and body replays the first response instead of creating a contact again. Same key with a different body: 409 `IDEMPOTENCY_KEY_REUSE`. 24 h window.

Request body

type*enum (2)

Contact kind: `email` or `phone`.

Example: "email"

value*string

Email or phone value (E.164 recommended for phone)

Example: "ada@example.com"

is_primaryboolean

Whether to flag the new contact as primary for its type. Demotes the previous primary of the same type. Default false.

Response · 201

id*string

Unique identifier of the contact.

type*object

Contact kind: `email` or `phone`.

value*string

The contact value: an email address or an E.164 phone number.

is_primary*boolean

True when this is the account's primary contact of its type.

verified_at*string · date-time

When the contact was verified (ISO 8601), or `null` while unverified.

created_at*string · date-time

When the contact was created (ISO 8601).

Example

Request

POST https://api.auth.productcraft.co/{app_slug}/v1/me/contacts
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "type": "email",
  "value": "ada@example.com",
  "is_primary": false
}

Response

{
  "id": "string",
  "type": {},
  "value": "string",
  "is_primary": false,
  "verified_at": "2026-01-01T00:00:00.000Z",
  "created_at": "2026-01-01T00:00:00.000Z"
}