---
title: "Verify Email Code"
method: POST
path: "/api/v1/console/email-code/verify"
tags: ["console"]
---

# Verify Email Code

`POST /api/v1/console/email-code/verify`

## Request

- Base URL: `https://ndi-api.nace.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://ndi-api.nace.ai/api/v1/console/email-code/verify`
- Auth: none declared
- TypeScript: <https://skmtc.dev/nace/apis/ndi-service/docs/api/v1/console/email-code/verify/post.ts> (a function with typed inputs; its response is checked against the schema)

Exchange a mailed code for a console session.

## Request body

- EmailCodeVerifyRequest: Exchange a mailed code for a console session.
  - `email` string, email, required: The address the code was mailed to.
  - `code` string, password, required: The code from the email.

## Response `200`

Successful Response

- EmailCodeSignInResponse: The signed-in identity plus the same bounded console session an invitation link mints.
  - `created` boolean, required: True when this sign-in wrote something: a new identity, a membership from an accepted invitation, or the default organization for an identity that belonged nowhere.
  - `user` ConsoleUserInfo, required: The signed-in OIDC identity. Carries no role: a role is held per organization, so it lives on :class:`~ndi_service.app.schemas.organization.OrganizationInfo`.
    - `id` string, uuid, required
    - `email` string, nullable
    - `created_at` string, date-time, required
  - `organizations` OrganizationInfo[], required: Every organization the user belongs to. Empty means they belong to none yet.
    - `organization_id` string, uuid, required
    - `name` string, required: Storage-safe slug, derived server-side. Stable; not shown to users.
    - `display_name` string, required: The name a human gave the organization.
    - `role` 'owner' | 'admin' | 'member', required: The signed-in user's role here. It may differ per organization.
    - `rate_limit_rpm` integer, required
    - `included_credits` integer, nullable: Lifetime credit allowance; null means unlimited.
    - `joined_at` string, date-time, required
    - `created_at` string, date-time, required
    - `default_workspace_id` string, uuid, nullable: The signed-in user's Perception Playground in this organization — where the console's perception tools upload by default. Null when it has not been provisioned yet, which the console handles by falling back to workspace-free uploads.
  - `can_create_organization` boolean, required: Whether this user may still create an organization themselves.
  - `can_run_evals` boolean: Whether this identity may use the eval console (a Nace staff email domain). The console hides the section when false; the routes enforce it regardless.
  - `access_token` string, required
  - `token_type` 'bearer'
  - `expires_at` string, date-time, required

## Other responses

- `400`: Bad Request
- `401`: The code is wrong, expired or already used.
- `402`: Payment Required
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `413`: Request Entity Too Large
- `422`: Unprocessable Entity
- `429`: Too many requests for this address or from this network; see Retry-After.
- `500`: Internal Server Error
- `503`: Email sign-in is unavailable (its store is unreachable).

---

[API](https://skmtc.dev/nace/apis/ndi-service.md) - [All operations](https://skmtc.dev/nace/apis/ndi-service/llms.txt) - [OpenAPI document](https://skmtc.dev/nace/apis/ndi-service/revisions/d9d1f8ec2207?raw)
