# Change a preset

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

## POST /v1/me/presets/{presetId}/update

Change a preset

Rename a preset of yours, give it a new state, or both; its id and list never move. The state is judged as a create's, against the preset's own list (else 422, naming the member, and nothing changes); a name you already use for that list is 409 `preset_name_taken`. An update to what it holds answers it unchanged. Another person's id, or none, is 404. The caller's own, by session or API key; takes no hat.

Operation ID: `updatePreset`

### Parameters

```json
[
  {
    "schema": {
      "type": "string",
      "format": "uuid",
      "description": "One of your presets."
    },
    "required": true,
    "description": "One of your presets.",
    "name": "presetId",
    "in": "path"
  }
]
```

### Request body

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

### Responses

#### 200 The preset as it now stands.

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