# Ask for a code

Source: https://amanucci.com/docs/developers/api/step-up/sendStepUpCode

## POST /v1/step-up/send

Ask for a code

Mail a one-time step-up code to this session's owner, at her own address: the request names no address, so nobody but the session holder can mint, replace or spend her step-up code. The code is step-up's own (Better Auth's `email-verification` type), which no public door mints or checks, so a sign-in code or guess never touches it. In operator mode a support operator is 403 `operator-read-only`; an admin's step-up passes as her own presence.

Operation ID: `sendStepUpCode`

### Responses

#### 200 The code was mailed to the session's owner.

```json
{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/Sent"
    }
  }
}
```

#### 401 Dead or absent credential (`unauthenticated`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 403 Authenticated, present, and refused: a missing grant, a missing seat, or a missing step-up.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 429 Too many requests on this door's bucket (`rate-limited`); refused before any handler ran, `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 503 Temporarily unavailable; `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```
