Auth
Email a sign-in code
Sends a six-digit code to the address.
POST
/auth/codeTL;DR
| Question | Answer |
|---|---|
| What does it do? | Email a sign-in code. |
| What does it take? | A JSON body of type RequestCodeBody. |
| What does it return? | Status 202 with a body of type Accepted. |
| What can go wrong? | 400 the address is not valid; 403 the request came from an origin that may not sign in; 429 too many requests; 502 the email could not be sent. Every failure uses the one error envelope. |
What it does
Sends a six-digit code to the address. There is no separate sign-up: the first successful sign-in makes the account. The answer is the same whether or not an email went out, so it reveals nothing about the address.
Request body
The body has the type RequestCodeBody.
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | at least 3 characters; at most 254 characters. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 202 | Accepted. | Accepted |
| 400 | The address is not valid. | ErrorResponse |
| 403 | The request came from an origin that may not sign in. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 502 | The email could not be sent. | ErrorResponse |
Response body
A 202 answer has the type Accepted.
| Field | Type | Required | Description |
|---|---|---|---|
accepted | true | yes |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Schemas | Every request and response type |
| Tool reference | The operations as callable tools |