Auth API reference

Auth API · Consumer-Auth

post/{app_slug}/v1/auth/verify

Submit a verification code

Consumes a 6-digit verification code (single-use) and flips the bound contact's `verified_at`. Public — anyone holding the code can submit it; that is the whole point of the verification flow. The server figures out which contact + account from the code value itself. Renamed from /verify-email — the same endpoint now serves both email and phone verifications.

Path parameters

app_slug*string

Slug of the app.

Request body

code*string

6-digit numeric verification code. The server resolves which contact the code is for from the code value itself.

Example: "123456"

Response · 200 Contact verified.

account_id*string

EndUser account id whose contact was verified.

contact_id*string

Account_contact id that just flipped to verified.

type*string

Contact type: `email` or `phone`.

Example: "email"

value*string

Normalised contact value.

Example: "jane@example.com"

verified_at*string

Verification timestamp, ISO 8601.

Example

Request

POST https://api.auth.productcraft.co/{app_slug}/v1/auth/verify
Content-Type: application/json

{
  "code": "123456"
}

Response

{
  "account_id": "string",
  "contact_id": "string",
  "type": "email",
  "value": "jane@example.com",
  "verified_at": "string"
}