---
title: "Email a sign-in code"
method: POST
path: "/v1/auth/code"
tags: ["Auth"]
---

# Email a sign-in code

`POST /v1/auth/code`

## Request

- Base URL: `https://api.naturali.ai`
- URL: `https://api.naturali.ai/v1/auth/code`
- Auth: none required

Emails a short numeric code to the address. Always responds 200 with the same body whether or not the address has an account, so it never leaks existence. A first-time address gets an account on its first successful verification, so this is both sign-up and log-in. Issuing a code invalidates any previous one for the same address.

## Request body

- SignInCodeRequest
  - `email` string, email, required

## Response `200`

If the address can receive a code, one has been sent.

- Acknowledgement: A deliberately uninformative confirmation. The wording is identical for a known and an unknown address so the response cannot be used to enumerate accounts.
  - `message` string

## Other responses

- `400`: The request was malformed or failed validation.

---

[API](https://skmtc.dev/naturali/apis/naturali-ai-api.md) · [All operations](https://skmtc.dev/naturali/apis/naturali-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/naturali/apis/naturali-ai-api/revisions/e4905b78f422?raw)
