> ## Documentation Index
> Fetch the complete documentation index at: https://docs.periskope.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Property Options

> Adds or removes options on a dropdown or picklist property. Adding is idempotent on the label (case-insensitive).



## OpenAPI

````yaml api-reference/openapi-generated.json POST /v1/properties/{property_id}/options
openapi: 3.0.3
info:
  title: Periskope API
  version: 1.0.0
  description: >-
    Periskope external API.


    Responses use a flat, unwrapped shape: most endpoints return the resource at
    the top level, and list endpoints return a wrapper object with pagination
    inline (e.g. `{ from, to, count, chats: [...] }`). The documented response
    schemas describe these shapes directly.
servers:
  - url: https://api.periskope.app
security:
  - bearerAuth: []
paths:
  /v1/properties/{property_id}/options:
    post:
      tags:
        - Properties
      summary: Update the options of a custom property
      description: >-
        Adds or removes options on a dropdown or picklist property. Adding is
        idempotent on the label (case-insensitive).
      operationId: updatePropertyOptions
      parameters:
        - schema:
            type: string
            minLength: 1
            description: >-
              The property_id (property-xxxxxxxxxxxxxxxx) or the name
              (case-insensitive) of the custom property. Prefer the property_id
              — a name that exists as both a chat and a ticket property is
              ambiguous without the type query parameter.
            example: property-aaaaaaaaaaaa
          required: true
          description: >-
            The property_id (property-xxxxxxxxxxxxxxxx) or the name
            (case-insensitive) of the custom property. Prefer the property_id —
            a name that exists as both a chat and a ticket property is ambiguous
            without the type query parameter.
          name: property_id
          in: path
        - schema:
            type: string
            enum:
              - chat
              - ticket
            description: >-
              Resolves the chat or the ticket property when property_id is a
              name that exists as both. Not needed when passing a property_id,
              or when the name only exists under one type.
            example: ticket
          required: false
          description: >-
            Resolves the chat or the ticket property when property_id is a name
            that exists as both. Not needed when passing a property_id, or when
            the name only exists under one type.
          name: type
          in: query
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                operation:
                  type: string
                  enum:
                    - add
                    - remove
                  description: >-
                    Whether to add the given options to the property ('add') or
                    remove them from it ('remove')
                  example: add
                options:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  description: >-
                    For add: the option labels to add — adding is idempotent,
                    labels that already exist (case-insensitive) are skipped and
                    their existing id returned. For remove: the option ids or
                    labels to remove.
                  example:
                    - Example Corp
                    - Globex
              required:
                - operation
                - options
      responses:
        '200':
          description: Per-entry outcome of the add or remove operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                    description: Always true when the request was processed
                  message:
                    type: string
                    description: Human-readable confirmation message
                    example: Options updated
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        description: Id of the property whose options were updated
                        example: property-aaaaaaaaaaaa
                      operation:
                        type: string
                        enum:
                          - add
                          - remove
                        description: The operation that was performed
                        example: add
                      options:
                        type: array
                        items:
                          $ref: >-
                            #/components/schemas/CustomPropertyOptionUpdateResult
                        description: >-
                          Per-entry outcome, in the same order as the options in
                          the request. Unmatched entries are reported here
                          instead of failing the request.
              examples:
                default:
                  summary: Response body
                  value:
                    success: true
                    message: Options updated
                    data:
                      property_id: property-aaaaaaaaaaaa
                      operation: add
                      options:
                        - id: '1755859200000'
                          label: Example Corp
                          added: null
                          removed: null
        '401':
          description: Invalid, expired or missing API token
          content:
            application/json:
              examples:
                error:
                  summary: Invalid, expired or missing API token
                  value:
                    code: UNAUTHORIZED_ERROR
                    message: Invalid bearer auth token
                    status: 401
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED_ERROR
                  message:
                    type: string
                    example: Invalid bearer auth token
                  status:
                    type: integer
                    example: 401
                example:
                  code: UNAUTHORIZED_ERROR
                  message: Invalid bearer auth token
                  status: 401
        '404':
          description: No custom property matches property_id
          content:
            application/json:
              examples:
                error:
                  summary: No custom property matches property_id
                  value:
                    code: NOT_FOUND_ERROR
                    message: No custom property matches property_id
                    status: 404
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND_ERROR
                  message:
                    type: string
                    example: No custom property matches property_id
                  status:
                    type: integer
                    example: 404
                example:
                  code: NOT_FOUND_ERROR
                  message: No custom property matches property_id
                  status: 404
        '422':
          description: Request validation failed
          content:
            application/json:
              examples:
                error:
                  summary: Request validation failed
                  value:
                    code: VALIDATION_ERROR
                    message: Request validation failed
                    status: 422
                    fields:
                      body.chat_id:
                        message: chat_id is required
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: VALIDATION_ERROR
                  message:
                    type: string
                    example: Request validation failed
                  status:
                    type: integer
                    example: 422
                  fields:
                    type: object
                    additionalProperties:
                      type: object
                      properties:
                        message:
                          type: string
                        value: {}
                    example:
                      body.chat_id:
                        message: chat_id is required
                example:
                  code: VALIDATION_ERROR
                  message: Request validation failed
                  status: 422
                  fields:
                    body.chat_id:
                      message: chat_id is required
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              examples:
                error:
                  summary: Rate limit exceeded
                  value:
                    code: RATE_LIMIT_ERROR
                    message: You can only make 100 requests per second
                    status: 429
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: RATE_LIMIT_ERROR
                  message:
                    type: string
                    example: You can only make 100 requests per second
                  status:
                    type: integer
                    example: 429
                example:
                  code: RATE_LIMIT_ERROR
                  message: You can only make 100 requests per second
                  status: 429
        '500':
          description: Internal server error
          content:
            application/json:
              examples:
                error:
                  summary: Internal server error
                  value:
                    code: UNKNOWN_ERROR
                    message: Internal server error
                    status: 500
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNKNOWN_ERROR
                  message:
                    type: string
                    example: Internal server error
                  status:
                    type: integer
                    example: 500
                example:
                  code: UNKNOWN_ERROR
                  message: Internal server error
                  status: 500
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: typescript
          label: TypeScript
          source: |-
            import { PeriskopeApi } from '@periskope/periskope-client';

            const client = new PeriskopeApi({
              authToken: 'YOUR_API_KEY',
            });

            async function main() {
              const response = await client.properties.updatePropertyOptions({
                property_id: 'property-aaaaaaaaaaaa',
                operation: 'add',
                options: [
                  'Example Corp',
                  'Globex',
                ],
              });
              console.log(response);
            }

            main();
        - lang: bash
          label: cURL
          source: >-
            curl -X POST
            'https://api.periskope.app/v1/properties/property-aaaaaaaaaaaa/options'
            \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{
                "operation": "add",
                "options": [
                  "Example Corp",
                  "Globex"
                ]
              }'
components:
  schemas:
    CustomPropertyOptionUpdateResult:
      type: object
      properties:
        id:
          type: string
          description: >-
            Id of the affected option. Absent when a remove entry did not match
            any option.
          example: '1755859200000'
        label:
          type: string
          description: >-
            Label of the affected option — for unmatched remove entries, the
            entry exactly as sent
          example: Example Corp
        added:
          type: boolean
          description: >-
            Present on add operations: true when the option was newly added,
            false when an option with the same label (case-insensitive) already
            existed — its existing id is returned
        removed:
          type: boolean
          description: >-
            Present on remove operations: true when the option was removed,
            false when no option matched the entry
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Periskope API token, sent as `Authorization: Bearer <token>`.
        Generate one from the Periskope dashboard under **Settings → API &
        Webhooks**. API access requires an active Pro or Enterprise plan.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.