Auth API reference

Auth API · Consumer-Auth

post/{app_slug}/v1/auth/send-verification-emailAuth

Mint + dispatch a verification email via Mail (PAK-required)

Mints a fresh 6-digit verification code AND dispatches it to the supplied email address via the workspace's verified Mail sender, in one call. Email-only — the customer integrates SMS delivery themselves through `request-verification`. PAK-required — distinct permission from the bare mint so customers can enable mint without enabling outbound Mail traffic. Surfaces typed precondition errors instead of the silent fail-closed of a fire-and-forget mailer: * 412 ENVOI_NOT_ENABLED — `notifications_via_envoi` is false * 412 ENVOI_SENDER_NOT_CONFIGURED * 412 ENVOI_TEMPLATE_NOT_CONFIGURED * 412 ENVOI_APP_NOT_BOUND_TO_WORKSPACE * 503 ENVOI_DISPATCH_FAILED — RabbitMQ publish failure * 503 ENVOI_NOT_WIRED — no Mail client wired in this deployment On success returns `{ expires_at }`. The plaintext code is NOT returned. Returns `{}` when the contact is missing or already verified (silent — same enumeration defence as `request-verification`). Issuing a code invalidates any previously issued, unconsumed code for the same contact — including the one auto-emailed at signup. Only the most recently minted code is accepted.

Path parameters

app_slug*string

Slug of the app.

Request body

email*string

Email contact value to send the verification code to.

Example: "jane@example.com"

Response · 201 `{ expires_at }` on success; `{}` on no-match.

expires_at*string

Code expiry, ISO 8601. The plaintext code is NOT returned — Mail has dispatched it.

Example: "2026-05-09T17:30:00.000Z"

Example

Request

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

{
  "email": "jane@example.com"
}

Response

{
  "expires_at": "2026-05-09T17:30:00.000Z"
}