---
title: "Create or replace one option set, whole (admin)"
method: PUT
path: "/v1/attributes/{key}/sets/{id}"
tags: ["vocabulary"]
---

# Create or replace one option set, whole (admin)

`PUT /v1/attributes/{key}/sets/{id}`

## Request

- Base URL: `https://api.sixminute.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.sixminute.ai/v1/attributes/{key}/sets/{id}`
- Auth: HTTP bearer

The body's `id` and `attribute_key` must be the path's. A set is a LIST, so the body carries every option and an unchanged body leaves `updated_at` where it was. An attribute this firm does not hold is a 404; a connector-owned set, or an attribute the connector owns or has bound, is a 409, and so is a body that says `source: connector`; two options with one value is a 400. Leaving out an option an entry carries is a 409 `urn:six-minute:problem:option-in-use` naming the values: send it with `active: false`, which retires it.

## Path parameters

- `key` string, required
- `id` string, required

## Request body

- object
  - `id` string, required
  - `attribute_key` string, required
  - `name` string, required
  - `source` 'firm' | 'connector'
  - `external_ref` string, nullable
  - `options` object[], required
    - `value` string, required
    - `label` string, required
    - `description` string
    - `external_ref` string, nullable
    - `active` boolean
    - `min_narrative_chars` integer, nullable
  - `active` boolean

## Response `200`

The set as stored.

- object
  - `id` string, required
  - `attribute_key` string, required
  - `name` string, required
  - `source` 'firm' | 'connector'
  - `external_ref` string, nullable
  - `options` object[], required
    - `value` string, required
    - `label` string, required
    - `description` string
    - `external_ref` string, nullable
    - `active` boolean
    - `min_narrative_chars` integer, nullable
  - `active` boolean
  - `updated_at` string, date-time, required

## Other responses

- `400`: The body, query or path did not validate; `errors` lists the fields.
- `401`: No bearer token, or one that does not verify or has expired.
- `403`: The token verified but may not do this: no organisation, not provisioned, wrong role, or a device problem.
- `404`: No such row for this tenant.
- `409`: The id or the email already belongs to something else.

---

[API](https://skmtc.dev/sixminute/apis/sixminute-api.md) - [All operations](https://skmtc.dev/sixminute/apis/sixminute-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sixminute/apis/sixminute-api/revisions/605577eadc10?raw)
