> ## 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 button (PUT compatibility)

> Compatibility alias for PATCH. PATCH is preferred because updates are partial.



## OpenAPI

````yaml /openapi.yaml put /workspaces/{workspace}/buttons/{button}
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}/buttons/{button}:
    parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      - $ref: '#/components/parameters/ButtonId'
    put:
      tags:
        - Buttons
      summary: Update a button (PUT compatibility)
      description: >-
        Compatibility alias for PATCH. PATCH is preferred because updates are
        partial.
      operationId: putButton
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ButtonInput'
      responses:
        '200':
          $ref: '#/components/responses/Data'
      deprecated: true
components:
  parameters:
    WorkspaceId:
      name: workspace
      in: path
      required: true
      schema:
        type: string
        format: uuid
    ButtonId:
      name: button
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    ButtonInput:
      type: object
      properties:
        title:
          type: string
        texts:
          type: object
        display_option:
          type: string
          enum:
            - columns
            - rows
            - stacked_buttons
            - icons_only
            - single_app
        template:
          readOnly: true
          oneOf:
            - $ref: '#/components/schemas/ButtonTemplateReference'
            - type: 'null'
        position:
          type: string
          enum:
            - bottom_right
            - bottom_left
            - top_right
            - top_left
        default_state:
          type: string
          enum:
            - text_button
            - closed_circle
            - button_with_text
        colors:
          type: object
          description: >-
            Launcher button and menu bar appearance. Existing buttons default to
            solid, fully opaque colors.
          properties:
            outside_color:
              type: string
              pattern: ^#[0-9a-fA-F]{6}$
              description: Solid launcher color and legacy fallback.
            button_background_type:
              type: string
              enum:
                - solid_color
                - gradient
              default: solid_color
            button_opacity:
              type: integer
              minimum: 0
              maximum: 100
              default: 100
            button_gradient_top_color:
              type: string
              pattern: ^#[0-9a-fA-F]{6}$
            button_gradient_top_opacity:
              type: integer
              minimum: 0
              maximum: 100
              default: 100
            button_gradient_bottom_color:
              type: string
              pattern: ^#[0-9a-fA-F]{6}$
            button_gradient_bottom_opacity:
              type: integer
              minimum: 0
              maximum: 100
              default: 100
            menu_bar_background_type:
              type: string
              enum:
                - solid_color
                - gradient
              default: solid_color
            menu_bar_color:
              type: string
              pattern: ^#[0-9a-fA-F]{6}$
            menu_bar_gradient_top_color:
              type: string
              pattern: ^#[0-9a-fA-F]{6}$
            menu_bar_gradient_top_opacity:
              type: integer
              minimum: 0
              maximum: 100
              default: 100
            menu_bar_gradient_bottom_color:
              type: string
              pattern: ^#[0-9a-fA-F]{6}$
            menu_bar_gradient_bottom_opacity:
              type: integer
              minimum: 0
              maximum: 100
              default: 100
        panel:
          $ref: '#/components/schemas/ButtonPanel'
        backgrounds:
          $ref: '#/components/schemas/ButtonBackgrounds'
        desktop:
          type: boolean
        tablet:
          type: boolean
          description: >-
            Visible from 768px through 1023px. Defaults to mobile for legacy
            payloads.
        mobile:
          type: boolean
        visibility:
          $ref: '#/components/schemas/DeviceVisibility'
        status:
          type: boolean
        launcher:
          $ref: '#/components/schemas/LauncherSettings'
        app_ids:
          type: array
          description: >-
            Unique app IDs in flat order. Supplying this without navigation
            creates a flat root menu.
          items:
            type: string
            format: uuid
        navigation:
          $ref: '#/components/schemas/ButtonNavigation'
        page_ids:
          type: array
          items:
            type: string
            format: uuid
    ButtonTemplateReference:
      type: object
      required:
        - key
        - version
      properties:
        key:
          type: string
          enum:
            - ecommerce
            - local-business
            - restaurant
            - omnichannel
            - social-links
            - click-to-call
            - contact-form
            - whatsapp-chat
        version:
          type: integer
          enum:
            - 1
    ButtonPanel:
      type: object
      description: >-
        Optional panel styling and owner-configured Messenger shell. A null
        layout preserves saved tabs while the legacy panel remains active.
      properties:
        version:
          type: integer
          enum:
            - 1
          readOnly: true
        layout:
          type:
            - string
            - 'null'
          enum:
            - messenger
            - null
        tabs:
          type: array
          items:
            $ref: '#/components/schemas/ButtonPanelTab'
        header:
          type: object
          properties:
            separator:
              type: object
              additionalProperties: false
              properties:
                style:
                  type: string
                  enum:
                    - straight
                    - wave
                    - curve
                    - arc
                    - angle
                depth:
                  type: string
                  enum:
                    - small
                    - medium
                    - large
            padding:
              type: object
              additionalProperties: false
              properties:
                preset:
                  type: string
                  enum:
                    - compact
                    - comfortable
                    - spacious
    ButtonBackgrounds:
      type: object
      additionalProperties: false
      properties:
        launcher:
          $ref: '#/components/schemas/ButtonBackground'
        panel:
          $ref: '#/components/schemas/ButtonBackground'
        chat:
          $ref: '#/components/schemas/ButtonBackground'
    DeviceVisibility:
      type: object
      required:
        - desktop
        - tablet
        - mobile
      additionalProperties: false
      description: >-
        Viewport visibility using mobile below 768px, tablet from 768px through
        1023px, and desktop at 1024px or wider.
      properties:
        desktop:
          type: boolean
        tablet:
          type: boolean
        mobile:
          type: boolean
    LauncherSettings:
      type: object
      description: >-
        Versioned launcher appearance. Legacy buttons are projected into this
        shape without opting into the new renderer.
      properties:
        version:
          type: integer
          enum:
            - 1
          default: 1
        shape:
          type: string
          enum:
            - circle
            - rounded_square
            - square
            - pill
        size:
          type: string
          enum:
            - compact
            - standard
            - large
            - custom
        width:
          type: integer
          minimum: 44
          maximum: 200
        height:
          type: integer
          minimum: 44
          maximum: 96
        background:
          type: object
          properties:
            type:
              type: string
              enum:
                - legacy
                - solid
                - linear_gradient
            color:
              type: string
              pattern: ^#[0-9a-fA-F]{6}$
            colors:
              type: array
              minItems: 2
              maxItems: 2
              items:
                type: string
                pattern: ^#[0-9a-fA-F]{6}$
            angle:
              type: integer
              minimum: 0
              maximum: 360
        border:
          type: object
          properties:
            width:
              type: integer
              minimum: 0
              maximum: 8
            color:
              type: string
              pattern: ^#[0-9a-fA-F]{6}$
            ring_width:
              type: integer
              minimum: 0
              maximum: 8
            ring_color:
              type: string
              pattern: ^#[0-9a-fA-F]{6}$
        icon:
          type: object
          properties:
            size:
              type: integer
              minimum: 16
              maximum: 48
            color:
              type: string
              pattern: ^#[0-9a-fA-F]{6}$
        device_overrides:
          type: object
          additionalProperties:
            type: object
        attention:
          $ref: '#/components/schemas/LauncherAttention'
        text:
          $ref: '#/components/schemas/LauncherText'
    ButtonNavigation:
      type: object
      description: >-
        Authoritative button-local tree. When app_ids is also supplied, the
        unique app sets must match. The configured safety cap applies to the
        total number of nodes across all levels.
      required:
        - items
      additionalProperties: false
      properties:
        items:
          type: array
          maxItems: 250
          items:
            $ref: '#/components/schemas/ButtonNavigationNode'
    DataResponse:
      type: object
      required:
        - data
        - meta
      properties:
        data: {}
        meta:
          type: object
          properties:
            request_id:
              type: string
            next_cursor:
              type:
                - string
                - 'null'
    ButtonPanelTab:
      type: object
      required:
        - id
        - label
        - icon
        - destination
      properties:
        id:
          type: string
          format: uuid
        label:
          type: string
          maxLength: 40
        icon:
          type: string
          enum:
            - home
            - apps
            - message
            - chat
            - help
            - search
            - phone
            - whatsapp
            - calendar
            - link
            - info
        destination:
          oneOf:
            - type: object
              required:
                - type
                - app_id
              properties:
                type:
                  type: string
                  enum:
                    - app
                app_id:
                  type: string
                  format: uuid
            - type: object
              required:
                - type
                - view
              properties:
                type:
                  type: string
                  enum:
                    - view
                view:
                  type: string
                  enum:
                    - navigation_root
            - type: object
              required:
                - type
                - page_id
              description: >-
                Native chat uses the linked published page's greeting and
                suggested replies.
              properties:
                type:
                  type: string
                  enum:
                    - chat
                page_id:
                  type: string
                  format: uuid
    ButtonBackground:
      type: object
      required:
        - type
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - solid
            - linear_gradient
            - image
            - transparent
        color:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
        colors:
          type: array
          minItems: 2
          maxItems: 2
          items:
            type: string
            pattern: ^#[0-9a-fA-F]{6}$
        angle:
          type: integer
          minimum: 0
          maximum: 360
        asset_id:
          type: string
          format: uuid
        fit:
          type: string
          enum:
            - cover
            - contain
        position:
          type: string
          enum:
            - center
            - top
            - bottom
            - left
            - right
        fallback_color:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
        overlay:
          type: object
          additionalProperties: false
          properties:
            color:
              type: string
              pattern: ^#[0-9a-fA-F]{6}$
            opacity:
              type: integer
              minimum: 0
              maximum: 100
    LauncherAttention:
      type: object
      properties:
        animation:
          type: string
          enum:
            - none
            - bounce
            - waggle
            - float
            - sheen
            - spin
            - fade
            - shockwave
            - pulse
            - blink
          default: none
        delay_ms:
          type: integer
          minimum: 0
          maximum: 30000
          default: 0
        play:
          type: string
          enum:
            - once_per_page
          default: once_per_page
    LauncherText:
      type: object
      properties:
        hide_after_ms:
          type:
            - integer
            - 'null'
          minimum: 1000
          maximum: 300000
          description: >-
            Collapse launcher text after this many milliseconds from its first
            visible render. Null disables the timer.
    ButtonNavigationNode:
      oneOf:
        - type: object
          required:
            - id
            - type
            - app_id
          additionalProperties: false
          properties:
            id:
              type: string
              format: uuid
            type:
              type: string
              enum:
                - app
            app_id:
              type: string
              format: uuid
        - type: object
          required:
            - id
            - type
            - label
            - children
          additionalProperties: false
          properties:
            id:
              type: string
              format: uuid
            type:
              type: string
              enum:
                - folder
            label:
              type: string
              minLength: 1
              maxLength: 80
            children:
              type: array
              items:
                $ref: '#/components/schemas/ButtonNavigationNode'
  responses:
    Data:
      description: Successful data envelope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DataResponse'
  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

- [Update a form (PUT compatibility)](/api-reference/forms/update-a-form-put-compatibility.md)
- [Update an app instance (PUT compatibility)](/api-reference/apps/update-an-app-instance-put-compatibility.md)
- [Backwards compatibility](/guides/backwards-compatibility.md)
- [Update a button](/api-reference/buttons/update-a-button.md)
- [Update a call flow](/api-reference/telephony/update-a-call-flow.md)
