# Create metadata property option

Adds a single option to a `select_str` or `multiselect_str` property definition. Body must include `type` so the server knows which per-type option table to write.

**Endpoint:** `POST /v2/prism/{teamId}/{objectType}/properties/{propertyId}/options`  
**Operation ID:** `createMetadataPropertyOption`  
**Server:** `https://developers.micro.so`  
**Security:** `[{"apiKey":[]}]`

## Parameters

```json
[
  {
    "name": "teamId",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string",
      "format": "uuid"
    }
  },
  {
    "name": "objectType",
    "in": "path",
    "required": true,
    "schema": {
      "$ref": "#/components/schemas/ObjectType"
    }
  },
  {
    "$ref": "#/components/parameters/OptionPropertyId"
  },
  {
    "$ref": "#/components/parameters/IdempotencyKey"
  }
]
```

## Request body

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

## Responses

```json
{
  "201": {
    "description": "Option created",
    "headers": {
      "x-request-id": {
        "$ref": "#/components/headers/XRequestId"
      },
      "idempotent-replay": {
        "$ref": "#/components/headers/IdempotentReplay"
      }
    },
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/PropertyOption"
        }
      }
    }
  },
  "400": {
    "$ref": "#/components/responses/BadRequest"
  },
  "401": {
    "$ref": "#/components/responses/Unauthorized"
  },
  "403": {
    "$ref": "#/components/responses/Forbidden"
  },
  "404": {
    "$ref": "#/components/responses/NotFound"
  },
  "409": {
    "$ref": "#/components/responses/Conflict"
  },
  "500": {
    "$ref": "#/components/responses/InternalError"
  }
}
```

## Referenced components

```json
{
  "securitySchemes": {
    "apiKey": {
      "type": "apiKey",
      "in": "header",
      "name": "x-api-key",
      "description": "Public API key generated from Micro settings. Sent as the `x-api-key` header and validated by AWS API Gateway in front of the service."
    }
  },
  "schemas": {
    "ObjectType": {
      "type": "string",
      "description": "Object types that support CRUD, query, list, and per-type property metadata. `GET /v2/prism/{teamId}/properties` (list-all) also returns definitions for pipeline-owned types that are not in this set — including `message`, `thread`, and `linkedin_thread`. Those types are not queryable. Contacts expose `last_email` as a `ref_message`; you cannot query `message` to follow it.",
      "enum": [
        "comment",
        "deal",
        "engagement",
        "identity",
        "ai_chat_thread",
        "ai_chat_message",
        "agent_site",
        "document",
        "action",
        "event",
        "organization",
        "contact"
      ]
    },
    "PropertyOptionCreate": {
      "type": "object",
      "description": "New option for a `select_str` or `multiselect_str` property. `type` identifies the per-type option table to write.",
      "required": [
        "type",
        "value"
      ],
      "properties": {
        "type": {
          "$ref": "#/components/schemas/PropertyType"
        },
        "list_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "Scope the option to a specific list/app."
        },
        "value": {
          "type": "string",
          "description": "Display value for the option."
        },
        "slug": {
          "type": "string",
          "description": "URL-safe identifier. Defaults to a slugified `value`."
        },
        "color_scheme": {
          "type": [
            "string",
            "null"
          ]
        },
        "sort_index": {
          "type": [
            "integer",
            "null"
          ]
        },
        "icon": {
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "option_group": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "PropertyOption": {
      "type": "object",
      "description": "An enabled option for a select_str or multiselect_str property definition.",
      "required": [
        "id",
        "slug"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "slug": {
          "type": "string"
        },
        "value": {
          "type": [
            "string",
            "null"
          ],
          "description": "Display value for the option."
        },
        "color_scheme": {
          "type": [
            "string",
            "null"
          ]
        },
        "sort_index": {
          "type": [
            "integer",
            "null"
          ]
        },
        "icon": {
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "option_group": {
          "type": [
            "string",
            "null"
          ]
        },
        "list_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "crm_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "deprecated": true
        }
      },
      "additionalProperties": false
    },
    "PropertyType": {
      "type": "string",
      "description": "Storage type for a property definition. Determines which per-type table holds the values, and which display formats the property can take.",
      "enum": [
        "num",
        "str",
        "bool",
        "date",
        "text",
        "byte",
        "select_str",
        "multi_str",
        "multiselect_str",
        "jsonb",
        "ref_identity",
        "ref_user",
        "ref_organization",
        "ref_contact",
        "ref_thread",
        "ref_message",
        "ref_event",
        "ref_account",
        "ref_ai_chat_thread",
        "ref_ai_chat_message",
        "multiref_ai_chat_message",
        "multiref_agent_site",
        "multiref_action",
        "multiref_comment",
        "multiref_contact",
        "multiref_label",
        "multiref_thread",
        "multiref_messages",
        "multiref_document",
        "multiref_identity",
        "multiref_organization",
        "multiref_engagement",
        "multiref_attendee",
        "multiref_meeting_entry",
        "multiref_read_receipt",
        "multiref_account",
        "multiref_source"
      ]
    },
    "Error": {
      "type": "object",
      "description": "Canonical JSON error envelope for every non-2xx v2 API response. `error.code` is the machine-readable error code, `error.message` is the human-readable summary, and `error.request_id` identifies the request for support. When supplied, `error.errors` contains field-level validation issues.",
      "required": [
        "error"
      ],
      "properties": {
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "request_id"
          ],
          "properties": {
            "code": {
              "type": "string",
              "description": "Stable machine-readable code. Branch on this, not on the HTTP status, to handle specific failure modes.",
              "example": "invalid_request"
            },
            "message": {
              "type": "string",
              "description": "Human-readable summary suitable for logs. Not localized; do not display verbatim to end users."
            },
            "request_id": {
              "type": [
                "string",
                "null"
              ],
              "description": "Echo of the x-request-id response header. Include in support requests."
            },
            "errors": {
              "type": "array",
              "description": "Optional structured field-level validation issues when the server provides them.",
              "items": {
                "type": "object",
                "properties": {
                  "field": {
                    "type": "string",
                    "description": "JSON path of the offending property (e.g. \".body.default.email\")."
                  },
                  "message": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string",
                    "description": "Validator-specific code (e.g. \"required.openapi.validation\")."
                  }
                },
                "required": [
                  "message"
                ]
              }
            },
            "details": {
              "type": "object",
              "description": "Optional bag of error-specific context. Shape varies by code; clients should treat fields as opaque unless documented."
            }
          }
        }
      }
    }
  },
  "parameters": {
    "OptionPropertyId": {
      "name": "propertyId",
      "in": "path",
      "required": true,
      "description": "Property definition uuid, or the reserved alias `app_stage` for the list pipeline stage definition (requires `list_id`). The alias exists because a superseded native `status` definition can coexist with the pipeline one and the two are indistinguishable in a metadata read; the definition carrying `alias: app_stage` is the pipeline one.",
      "schema": {
        "type": "string",
        "pattern": "^(app_stage|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
      }
    },
    "IdempotencyKey": {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "description": "A unique key (UUID or any opaque string up to 255 chars) for an authenticated POST, PUT, or PATCH request. The server retains the initial claim for 24 hours and replays a completed non-5xx response only when the method, path, and request body all match. Reusing a non-expired key with a different method, path, or body returns 409 `idempotency_key_mismatch`; reusing it after expiry returns 409 `idempotency_key_stale`, so use a new key. Replays include the `idempotent-replay: true` response header.",
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 255
      }
    }
  },
  "headers": {
    "XRequestId": {
      "description": "Correlation ID. Echoed from the request `x-request-id` header when supplied, otherwise generated. Include in support requests.",
      "schema": {
        "type": "string"
      }
    },
    "IdempotentReplay": {
      "description": "Present and set to `true` when this response is a cached replay of an earlier request with the same `Idempotency-Key`. Absent on first execution.",
      "schema": {
        "type": "string",
        "enum": [
          "true"
        ]
      }
    }
  },
  "responses": {
    "BadRequest": {
      "description": "Request validation failed. Inspect `error.errors` for field-level details.",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/XRequestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "Unauthorized": {
      "description": "Missing or invalid credentials. API Gateway maps a missing or invalid `x-api-key` to HTTP 401 with this envelope (including `request_id`). A 403 here means the key was accepted but the caller is not permitted.",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/XRequestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "Forbidden": {
      "description": "Authenticated but not permitted to perform this action.",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/XRequestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "NotFound": {
      "description": "Resource or route does not exist.",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/XRequestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "Conflict": {
      "description": "Request conflicts with current state (e.g., duplicate or stale write).",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/XRequestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "InternalError": {
      "description": "Unexpected server error. Retry with backoff; report `request_id` if persistent.",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/XRequestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}
```
