---
title: "Send an authentication code"
description: "Immediately sends a real, short-lived authentication code. Call this once only after the account owner supplies and approves the exact email address, then wait for the latest code."
canonical: "https://www.cool.computer/docs/api-reference/authentication/send-an-authentication-code"
---
# Send an authentication code

> Immediately sends a real, short-lived authentication code. Call this once only after the account owner supplies and approves the exact email address, then wait for the latest code.

```http
POST https://api.cool.computer/api/auth/email/start
```

Immediately sends a real, short-lived authentication code. Call this once only after the account owner supplies and approves the exact email address, then wait for the latest code. Sign-up is open while Cool Computers has room (`GET /api/signup`); while it is full, an email with no account and no invitation still gets a code, and completing it answers 403 sign_up_waitlisted. Each email gets at most 5 codes sent and 10 codes tried in 10 minutes, counted together with the SSH sign-in prompt by each API process; past that this answers 429 rate_limited with Retry-After, the seconds until the email may try again.

## Authorization

No credential is needed.

## Request body

Required.

- `application/json` (object)
  - `email` (string, email, required)

## Responses

- `202`: The authentication code was sent.
  - `application/json` (object)
    - `status` ("code_sent", required)
    - `expires_in` (integer, at least 1, required)
- `400`: Bad Request.
- `413`: Payload Too Large.
- `429`: Too Many Requests. If the problem code is api_request_rate_exceeded, wait for Retry-After seconds; other problem codes describe a separate limit.
- `500`: Internal Server Error.
- `503`: Service Unavailable.
- `default`: A machine-readable API error with a stable code and recovery instruction.

An error is an `application/problem+json` document with a stable `code`; [API errors](/docs/api-reference/errors) says how to handle one.

## Example

```sh
curl -X POST "https://api.cool.computer/api/auth/email/start" \
  -H "content-type: application/json" \
  --data '{"email":"ana@example.com"}'
```
