# Request a sign-in code

`POST /v1/otp/request`

Send an email with a one-time Tiiny Host sign-in code.

## Request

`Content-Type: application/json`. Provide `email` in the body, or send `x-email: <address>` and an empty JSON object. This operation sends a real email. Use an address supplied by the user.

## Example

```bash
curl --fail-with-body https://ext.tiiny.host/v1/otp/request \
  -H 'Content-Type: application/json' -d '{"email":"you@example.com"}'
```

## Success response

`200 OK` returns `{"success":true,"message":"OTP sent"}`. Continue with [Verify a sign-in code](../verify-sign-in-code/) after the user receives the code.

## Errors

For a rejected request, verify the email address and JSON encoding. If the request succeeded and no message arrives, check spam before resending.
