How to hit the Chatwoot API

Chatwoot's API lives at https://app.chatwoot.com/api/v1 for Chatwoot Cloud, or on your own server if you self-host. Most paths include your account id.

Authentication

Copy your access token from Profile Settings in Chatwoot and send it as the api_access_token header. In the examples it's written {{CHATWOOT_TOKEN}}.

Full reference: https://developers.chatwoot.com/api-reference/introduction

Your profile

Includes your accounts and their ids.

curl https://app.chatwoot.com/api/v1/profile \
  -H "api_access_token: {{CHATWOOT_TOKEN}}"
Run in PostTaco

List conversations

curl "https://app.chatwoot.com/api/v1/accounts/{{ACCOUNT_ID}}/conversations?status=open" \
  -H "api_access_token: {{CHATWOOT_TOKEN}}"
Run in PostTaco

Reply in a conversation

curl -X POST https://app.chatwoot.com/api/v1/accounts/{{ACCOUNT_ID}}/conversations/{{CONVERSATION_ID}}/messages \
  -H "api_access_token: {{CHATWOOT_TOKEN}}" \
  -H "Content-Type: application/json" \
  -d '{"content": "Thanks — looking into it now.", "message_type": "outgoing"}'
Run in PostTaco