# Save a preset

Source: https://amanucci.com/docs/developers/api/people/createPreset

## POST /v1/me/presets

Save a preset

Save a preset of yours for one list: a name and a state, which must be a call the list's operation takes within its vocabulary (else 422, naming the member, and nothing is stored). A name you already use for that list is 409 `preset_name_taken`, a 51st for one list 409 `preset_limit_reached`. Idempotent by its client-minted id. The caller's own, by session or API key; takes no hat.

Operation ID: `createPreset`

### Request body

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/CreatePreset"
      }
    }
  }
}
```

### Responses

#### 200 Duplicate-ok: this id already named this person's preset, which is unchanged.

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

#### 201 The preset, saved.

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

#### 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"
    }
  }
}
```

#### 404 Absent, or hidden from this asker — the two are indistinguishable (`not-found`).

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

#### 409 The world is not in the state the request assumed: a stale `expectedSeq`, or a transition already made.

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

#### 422 The request did not satisfy the schema (`invalid-input`).

```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"
    }
  }
}
```
