POST /v1/auth/email/verify
Exchanges the emailed code for a dashboard session, set as the `__Host-b3os_session` cookie. Creates the user on first sign-in.

Request Body required

application/json
email string (email) REQUIRED
code string REQUIRED

Responses

200 Signed in.
application/json
object string REQUIRED
Enum: auth_session
user object REQUIRED
id string REQUIRED
email string (email) REQUIRED
name string | null REQUIRED
image_url string (uri) | null REQUIRED
org object | null REQUIRED
The active organization, or `null` before the user has one.
id string REQUIRED
object string REQUIRED
Enum: organization
name string REQUIRED
slug string REQUIRED
role string | null REQUIRED
The caller's role; `null` for API keys.
Enum: owner, admin, member, null
plan string REQUIRED
Enum: beta
created_at string (date-time) REQUIRED
metadata object REQUIRED
Up to 16 string key-value pairs you attach to an object for your own use. Keys are 1 to 40 characters of `A-Z a-z 0-9 _ . : -`; values are at most 500 characters. B3OS never interprets them.
project object | null REQUIRED
The active project, or `null`.
id string REQUIRED
object string REQUIRED
Enum: project
org_id string REQUIRED
name string REQUIRED
created_at string (date-time) REQUIRED
updated_at string (date-time) REQUIRED
metadata object REQUIRED
Up to 16 string key-value pairs you attach to an object for your own use. Keys are 1 to 40 characters of `A-Z a-z 0-9 _ . : -`; values are at most 500 characters. B3OS never interprets them.
orgs object[] REQUIRED
Array of:
id string REQUIRED
name string REQUIRED
role string REQUIRED
Enum: owner, admin, member
needs_invite boolean REQUIRED
`true` until the user belongs to an organization (redeem an invite code).
csrf_token string REQUIRED
Send as `x-b3os-csrf` on every cookie-authenticated write.
expires_at string (date-time) REQUIRED
400 The code is wrong or expired (`email_code_invalid`).
403 A browser request from a page other than https://beta.b3os.org (`forbidden`, reason `csrf`). Requests without an `Origin` header (the CLI, curl) are not refused.
413 The request body exceeds this operation's limit.
415 The Content-Type is not accepted by this operation.
429 A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500 Something failed inside B3OS (`internal`). Retry with backoff.
503 The node or the product is not available right now (`node_unavailable`, `product_unavailable`, `capacity_unavailable`).
curl -X POST 'https://beta.b3os.org/v1/auth/email/verify' \  -H 'Authorization: Bearer YOUR_API_TOKEN' \  -H 'Content-Type: application/json' \  -d '{  "email": "dev@example.com",  "code": "482913"}'
const response = await fetch('https://beta.b3os.org/v1/auth/email/verify', {  method: 'POST',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN",      "Content-Type": "application/json"  },  body: JSON.stringify({    "email": "dev@example.com",    "code": "482913"  })});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://beta.b3os.org/v1/auth/email/verify', headers=headers, json={  "email": "dev@example.com",  "code": "482913"})print(response.json())
200 Response
{  "object": "auth_session",  "user": {    "id": "usr_01m5t3jv4b5sappg7vzv1rwx6x",    "email": "dev@example.com",    "name": null,    "image_url": null  },  "org": null,  "project": null,  "orgs": [],  "needs_invite": true,  "csrf_token": "9f8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d",  "expires_at": "2026-11-24T22:10:00.000Z"}
Ask a question... ⌘I