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

# Update a call flow



## OpenAPI

````yaml /openapi.yaml patch /workspaces/{workspace}/call-flows/{flow}
openapi: 3.1.0
info:
  title: Contact Button API
  version: 1.0.0-alpha.1
  description: >
    API-first management and public agent actions for Contact Buttons and
    button.contact pages.

    API v1 is the first public contract. Existing private legacy API and browser
    workflows remain supported.
  contact:
    name: Contact Button
    url: https://learn.contactbutton.com
servers:
  - url: https://api.contactbutton.com/v1
    description: Production (canonical)
  - url: https://app.contactbutton.com/v1
    description: Backwards-compatible application-domain alias
security:
  - bearerAuth: []
tags:
  - name: Onboarding
    description: Human-verified agent onboarding.
  - name: Workspaces
  - name: Team
  - name: Pages
  - name: Domains
  - name: Buttons
  - name: Forms
  - name: Surveys
  - name: Apps
  - name: Knowledge
  - name: Booking
  - name: Telephony
    description: >-
      Bring-your-own-Telnyx setup, call flows, phone numbers, and voice
      interactions.
  - name: Reviews
    description: >-
      Send consented review requests through workspace-owned email, SMS, and
      WhatsApp channels.
  - name: Commerce
  - name: Engagement inbox
  - name: Public actions
    description: Public, rate-limited actions that may require human confirmation.
paths:
  /workspaces/{workspace}/call-flows/{flow}:
    parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      - $ref: '#/components/parameters/CallFlowId'
    patch:
      tags:
        - Telephony
      summary: Update a call flow
      operationId: updateCallFlow
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallFlowInput'
      responses:
        '200':
          $ref: '#/components/responses/Data'
        '409':
          $ref: '#/components/responses/Problem'
        '422':
          $ref: '#/components/responses/Problem'
components:
  parameters:
    WorkspaceId:
      name: workspace
      in: path
      required: true
      schema:
        type: string
        format: uuid
    CallFlowId:
      name: flow
      in: path
      required: true
      schema:
        type: string
        format: uuid
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: Stable 8–120 character key for safe mutation retries.
      schema:
        type: string
        minLength: 8
        maxLength: 120
  schemas:
    CallFlowInput:
      type: object
      required:
        - name
        - mode
        - language
        - tts_voice
        - max_recording_seconds
        - missed_call_sms_delay_seconds
      properties:
        name:
          type: string
          maxLength: 120
        mode:
          type: string
          enum:
            - ai_agent
            - forwarding
            - voicemail
            - callback
        provider_assistant_id:
          type:
            - string
            - 'null'
          maxLength: 255
          description: >-
            Required for ai_agent mode. Use an assistant ID from the connected
            Telnyx account.
        forwarding_number:
          type:
            - string
            - 'null'
          pattern: ^\+[1-9][0-9]{7,14}$
        caller_id_voice_number_id:
          type:
            - integer
            - 'null'
          deprecated: true
          description: >-
            Optional internal compatibility identifier. Omit unless returned by
            an authorized Contact Button client.
        greeting:
          type:
            - string
            - 'null'
          maxLength: 2000
          description: Required for voicemail and callback modes.
        language:
          type: string
          maxLength: 16
          example: en-US
        tts_voice:
          type: string
          maxLength: 120
          example: Telnyx.NaturalHD.astra
        notification_emails:
          type: array
          maxItems: 10
          items:
            type: string
            format: email
        notification_phones:
          type: array
          maxItems: 10
          items:
            type: string
            pattern: ^\+[1-9][0-9]{7,14}$
        max_recording_seconds:
          type: integer
          minimum: 10
          maximum: 300
        fallback_to_voicemail:
          type: boolean
          default: false
        missed_call_sms_enabled:
          type: boolean
          default: false
        missed_call_sms_template:
          type:
            - string
            - 'null'
          maxLength: 1000
        missed_call_sms_delay_seconds:
          type: integer
          minimum: 0
          maximum: 3600
          default: 30
        is_active:
          type: boolean
          default: true
    DataResponse:
      type: object
      required:
        - data
        - meta
      properties:
        data: {}
        meta:
          type: object
          properties:
            request_id:
              type: string
            next_cursor:
              type:
                - string
                - 'null'
    Problem:
      type: object
      required:
        - type
        - title
        - status
        - detail
        - instance
        - request_id
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        instance:
          type: string
        request_id:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
  responses:
    Data:
      description: Successful data envelope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DataResponse'
    Problem:
      description: RFC 9457-style problem details.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum personal access token
      description: >
        A Contact Button scoped bearer key. Send `Authorization: Bearer
        <token>`.

        Token abilities are enforced independently of workspace membership; both
        checks must pass.

        OAuth 2.0 authorization-code flows are not currently available.
      x-contact-button-token-abilities:
        workspaces:read: Read workspaces, teams, domains, settings, and connections.
        workspaces:write: >-
          Create and manage workspaces, teams, domains, settings, and
          connections.
        content:read: Read buttons, forms, lists, pages, booking types, and knowledge.
        content:write: Create, update, publish, and remove content.
        engagements:read: >-
          Read submissions, subscribers, bookings, callbacks, calls, reviews,
          and conversations.
        engagements:manage: Reply to and manage engagement records.
        actions:request: Request protected actions that can still require human confirmation.

````

## Related topics

- [List call flows](/api-reference/telephony/list-call-flows.md)
- [Create a call flow](/api-reference/telephony/create-a-call-flow.md)
- [Delete an unused call flow](/api-reference/telephony/delete-an-unused-call-flow.md)
- [Connect Telnyx](/guides/telnyx.md)
- [Update callback status](/api-reference/engagement-inbox/update-callback-status.md)
