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

# Edit an item

> Change what one item extracts, or how.

```json theme={"dark"}
{ "name": "Lead Temperature",
  "description": "How ready the caller is to buy, judged from what they actually said — not tone.",
  "result_format": "string",
  "constraints": { "enum": ["hot", "warm", "cold"] } }
```

<Note>
  **`description` is the instruction the model reads, not a label.** Editing it is how you fix bad
  extractions — tighten the direction rather than renaming the field.
</Note>

Changing `result_format` or `constraints` changes the shape of the value on every future call. Past
calls keep whatever they were analysed with, so a consumer reading a warehouse column across a
format change will see both shapes — narrow an `enum` and older rows may hold values no longer in
the list.

<Warning>
  **Built-in values are only partly editable.** On an item Vocily ships, you may change
  `description` and `enabled`. `name`, `result_format` and `constraints` are refused
  with `409`: the name is the key on the call payload, and the sentiment filter's enum is built
  from the format and constraints, so readers elsewhere assume them. The description — what the
  model is actually told — is the part worth tuning, and is why these live here at all.
</Warning>

Renaming an item has the same consequence as renaming a group: the name is part of the key on the
call payload, `custom_analysis["Lead QA"]["Lead Temperature"]`.


## OpenAPI

````yaml developers/openapi.json PUT /v1/custom-analysis/items/{item_id}
openapi: 3.1.0
info:
  title: Vocily API
  description: >-
    Public REST API for Vocily. Build and configure an agent, publish a version
    and put it live, place outbound calls, and read back calls, chats and what
    the agent remembered. Authenticate with a workspace API key as a Bearer
    token.


    Some things stay in the dashboard, by design: creating an API key, buying or
    connecting a phone number, setting an agent's webhook URL, connecting
    WhatsApp and its templates, building HTTP tools, and running batch
    campaigns.
  version: v1
servers:
  - url: https://api.vocily.ai
    description: Production
security: []
paths:
  /v1/custom-analysis/items/{item_id}:
    put:
      tags:
        - custom-analysis
      summary: Update Custom Analysis Item
      description: Change a value. Send only the fields you are changing.
      operationId: update_custom_analysis_item_v1_custom_analysis_items__item_id__put
      parameters:
        - name: item_id
          in: path
          required: true
          schema:
            type: string
            title: Item Id
          description: The analysis item's id, from `GET /v1/custom-analysis`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicAnalysisItemUpdate'
            example:
              description: How ready the caller is to buy. Ignore polite interest.
      responses:
        '200':
          description: The updated item.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  category_id:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                  result_format:
                    type: string
                    enum:
                      - string
                      - number
                      - integer
                      - boolean
                      - array
                      - object
                  extraction_method:
                    type: string
                    enum:
                      - ai
                      - regex
                  required:
                    type: boolean
                  constraints:
                    type: object
                  fields:
                    type: array
                    items:
                      type: object
                  enabled:
                    type: boolean
                  is_system:
                    type: boolean
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
              example:
                name: Lead Temperature
                description: >-
                  How ready the caller is to buy, judged from what they said —
                  not from tone.
                extraction_method: ai
                result_format: string
                required: false
                constraints:
                  enum:
                    - hot
                    - warm
                fields: []
                enabled: true
                id: 00000010-0000-4000-8000-000000000010
                category_id: 0000000f-0000-4000-8000-00000000000f
                is_system: false
                created_at: '2026-09-16T19:38:04.238748Z'
                updated_at: '2026-09-16T19:38:04.251020Z'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                detail: Invalid API key
                code: UNAUTHORIZED
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded — honor `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                code: rate_limited
      security:
        - bearerAuth: []
components:
  schemas:
    PublicAnalysisItemUpdate:
      properties:
        name:
          anyOf:
            - maxLength: 255
              minLength: 1
              type: string
            - type: 'null'
          title: Name
          description: >-
            What to call this value. Renaming changes the key it arrives under
            on every future call.
        description:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Description
          description: >-
            **The instruction the model reads.** Tightening it is how you fix a
            bad extraction.
        extraction_method:
          anyOf:
            - type: string
              maxLength: 8
            - type: 'null'
          title: Extraction Method
          description: >-
            `regex` pulls the value out by pattern and costs nothing; anything
            else asks the model.
        result_format:
          anyOf:
            - type: string
              maxLength: 16
            - type: 'null'
          title: Result Format
          description: >-
            The shape of the value. Changing it changes the shape on every
            future call; past calls keep what they were analysed with.
        required:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Required
          description: Whether the model must produce a value.
        constraints:
          anyOf:
            - $ref: '#/components/schemas/CustomAnalysisConstraints'
            - type: 'null'
          description: >-
            Limits on the value. Narrowing an `enum` can leave older rows
            holding values no longer in the list.
        fields:
          anyOf:
            - items:
                $ref: '#/components/schemas/CustomAnalysisFieldSpec'
              type: array
            - type: 'null'
          title: Fields
          description: The inner fields, for an `object` or `array` value.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
          description: Turn it off without deleting it.
      additionalProperties: false
      type: object
      title: PublicAnalysisItemUpdate
    ApiError:
      type: object
      description: >-
        Error envelope. `code` is derived from the HTTP status, so branch on it
        for the CLASS of failure; the specific reason is `detail.code`. Every
        public refusal carries both.
      properties:
        detail:
          type: object
          description: >-
            The reason. `code` is the domain reason (e.g. `call_not_found`) and
            `message` is a sentence safe to log. On a `422` it also carries
            `errors[]`, one entry per rejected field — see
            `HTTPValidationError`.
          properties:
            code:
              type: string
              example: call_not_found
            message:
              type: string
              example: Call not found
          required:
            - code
            - message
        code:
          type: string
          description: Derived from the HTTP status, not the domain reason.
          example: NOT_FOUND
    HTTPValidationError:
      type: object
      title: HTTPValidationError
      description: >-
        A request the API could not read: a field of the wrong type, out of
        range, missing, or one we do not accept. Same envelope as every other
        error.
      properties:
        detail:
          type: object
          description: >-
            What was wrong, as `code`, a one-line `message`, and every offending
            field in `errors`.
          required:
            - code
            - message
            - errors
          properties:
            code:
              type: string
              enum:
                - validation_error
            message:
              type: string
              description: >-
                The first problem in one line, with a count of the rest — e.g.
                `model.temperature: Input should be less than or equal to 2 (and
                1 more)`.
            errors:
              type: array
              items:
                $ref: '#/components/schemas/ValidationError'
              description: >-
                One entry per offending field. **Every problem is reported at
                once**, not just the first, so a malformed body needs one round
                trip to fix rather than one per field.
        code:
          type: string
          enum:
            - VALIDATION_ERROR
          description: Derived from the HTTP status, as on every error.
    CustomAnalysisConstraints:
      properties:
        enum:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Enum
          description: >-
            The allowed values. Use this rather than describing a fixed set in
            prose.
        min_length:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Min Length
          description: Shortest acceptable string.
        max_length:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
          title: Max Length
          description: Longest acceptable string.
        format:
          anyOf:
            - type: string
            - type: 'null'
          title: Format
          description: A named string format, e.g. `email` or `date`.
        pattern:
          anyOf:
            - type: string
            - type: 'null'
          title: Pattern
          description: >-
            A regular expression the value must match. **Required when
            `extraction_method` is `regex`** — it is what does the extracting.
        minimum:
          anyOf:
            - type: number
            - type: 'null'
          title: Minimum
          description: Smallest acceptable number, inclusive.
        maximum:
          anyOf:
            - type: number
            - type: 'null'
          title: Maximum
          description: Largest acceptable number, inclusive.
        exclusive_minimum:
          anyOf:
            - type: number
            - type: 'null'
          title: Exclusive Minimum
          description: The value must be strictly greater than this.
        exclusive_maximum:
          anyOf:
            - type: number
            - type: 'null'
          title: Exclusive Maximum
          description: The value must be strictly less than this.
        multiple_of:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: 'null'
          title: Multiple Of
          description: The value must be a multiple of this.
        item_shape:
          anyOf:
            - type: string
            - type: 'null'
          title: Item Shape
          description: The shape of each element, for an array value.
        item_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Item Type
          description: The JSON type of each element, for an array value.
      additionalProperties: false
      type: object
      title: CustomAnalysisConstraints
      description: >-
        Every constraint any format can carry. Which ones are legal depends on
        the format.
    CustomAnalysisFieldSpec:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: The inner field's name.
        description:
          type: string
          minLength: 1
          title: Description
          description: The instruction the model reads for this inner field.
        type:
          type: string
          maxLength: 16
          title: Type
          description: The inner field's JSON type.
        required:
          type: boolean
          title: Required
          description: Whether it must be produced.
          default: false
        constraints:
          $ref: '#/components/schemas/CustomAnalysisConstraints'
          description: Limits on the inner field's value.
      type: object
      required:
        - name
        - description
        - type
      title: CustomAnalysisFieldSpec
      description: >-
        One property of an `object` item, or of each record in an `array` of
        fields.
    ValidationError:
      type: object
      title: ValidationError
      required:
        - field
        - message
        - type
      properties:
        field:
          type: string
          description: >-
            The offending field as a path from the root of your request —
            `voice.speed`, `variables[0].key`, or `query.limit` for a query
            parameter. **This is the field to read.**
        message:
          type: string
          description: What is wrong with it, in plain language.
        type:
          type: string
          description: >-
            A stable machine code for the kind of failure, e.g.
            `extra_forbidden` for a field we do not accept, `missing` for a
            required one, or `less_than_equal` for a number out of range. Switch
            on this rather than on `message`, which may be reworded.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key as a Bearer token, e.g. `Authorization: Bearer vk_…`.'

````