Agent

Update a chat button

Changed on

Requires the agent:write scope.

patch/chat_buttons/{id}

Request

  • Base URL: https://api.meetdarwin.ai/v1
  • URL: https://api.meetdarwin.ai/v1/chat_buttons/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

Headers

Idempotency-Keystring

Retry safely: the first response is replayed for 24 hours (not for streamed answers).

Request body

labelstring

What the visitor reads on the button.

messagestring

send: the visitor's first message. fill: typed into the chat box for them to edit. agent: what the agent is told, so it speaks first. outcome: the form's id (out_…).

behavior'send' | 'fill' | 'agent' | 'outcome'

What a click does once the chat opens. Default send. outcome opens one of the agent's forms; message is its out_… id.

style'brand' | 'soft' | 'outline' | 'link'

Default brand: the chat's own colors.

size'sm' | 'md' | 'lg' | 'custom'
corners'match' | 'square' | 'pill' | 'custom'

match: the same corners as the chat.

width'auto' | 'full'

auto fits the label; full fills the width of what it is pasted into.

nofollowboolean

Adds rel="nofollow" to the button's link.

Response

OK

idstring required
object'chat_button' required
labelstring required
messagestring required
behavior'send' | 'fill' | 'agent' | 'outcome' required
style'brand' | 'soft' | 'outline' | 'link' required
size'sm' | 'md' | 'lg' | 'custom' required
corners'match' | 'square' | 'pill' | 'custom' required
width'auto' | 'full' required
nofollowboolean required
linkstring required
htmlstring required

The paste-in HTML: a plain link that opens the chat already on the page.

Example response

{
  "id": "btn_k3j9x2m4p7"
}

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status