docs(api): document bearer token authentication (#15942)
Document `Authorization: Bearer <token>` for existing Chatwoot API tokens, available from v4.19.0. The OpenAPI auth option explains where to obtain user, agent bot, and platform app tokens while retaining `api_access_token` as a legacy option. Follow-up to https://github.com/chatwoot/chatwoot/pull/15941. Related: https://github.com/chatwoot/chatwoot/issues/1615 and https://linear.app/chatwoot/issue/CW-2866/chore-standardise-the-access-token-based-authentication-in-chatwoot. ## Why API consumers and generated clients should be able to discover the standard Bearer header and reuse their existing tokens without changing permissions. ## What this change does - Adds HTTP Bearer as a separate authentication alternative wherever existing API tokens are accepted. - Explains that Bearer authentication is available from Chatwoot v4.19.0 and where to get user, agent bot, and platform app tokens. - Recommends Bearer auth while keeping the `api_access_token` header supported ahead of a future deprecation. - Updates the attachment request example and generated OpenAPI JSON. ## Validation Open the generated API documentation and confirm Bearer and legacy API key options appear. On a v4.19.0 instance, authorize with an existing API token and call an allowed endpoint. Confirm the attachment example uses `Authorization: Bearer`.
This commit is contained in:
@@ -19,21 +19,33 @@ components:
|
||||
parameters:
|
||||
$ref: ./parameters/index.yml
|
||||
securitySchemes:
|
||||
userBearerAuth:
|
||||
type: http
|
||||
scheme: bearer
|
||||
description: 'Authenticate with `Authorization: Bearer <token>` using a user API token from **Profile Settings**. Available in Chatwoot `v4.19.0` and later.'
|
||||
agentBotBearerAuth:
|
||||
type: http
|
||||
scheme: bearer
|
||||
description: 'Authenticate with `Authorization: Bearer <token>` using an agent bot token from **Settings → Agent Bots**. Available in Chatwoot `v4.19.0` and later.'
|
||||
platformAppBearerAuth:
|
||||
type: http
|
||||
scheme: bearer
|
||||
description: 'Authenticate with `Authorization: Bearer <token>` using a platform app token from **Super Admin**. Available in Chatwoot `v4.19.0` and later.'
|
||||
userApiKey:
|
||||
type: apiKey
|
||||
in: header
|
||||
name: api_access_token
|
||||
description: This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.
|
||||
description: 'Find your API token in **Profile Settings**. The `api_access_token` header remains supported, but will be deprecated in a future release. For new integrations, use Bearer authentication.'
|
||||
agentBotApiKey:
|
||||
type: apiKey
|
||||
in: header
|
||||
name: api_access_token
|
||||
description: This token should be provided by system admin or obtained via rails console. This token can be used to build bot integrations and can only access limited apis.
|
||||
description: 'Find your agent bot token in **Settings → Agent Bots**. For new integrations, use Bearer authentication in Chatwoot `v4.19.0` and later. Agent bot tokens can access only bot-permitted APIs.'
|
||||
platformAppApiKey:
|
||||
type: apiKey
|
||||
in: header
|
||||
name: api_access_token
|
||||
description: This token can be obtained by the system admin after creating a platformApp. This token should be used to provision agent bots, accounts, users and their roles.
|
||||
description: 'Create a platform app in **Super Admin** to get its token. For new integrations, use Bearer authentication in Chatwoot `v4.19.0` and later. Platform app tokens can provision agent bots, accounts, users, and roles.'
|
||||
tags:
|
||||
- name: Accounts
|
||||
description: Account management APIs
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: get-account-details
|
||||
summary: Get account details
|
||||
description: Get the details of the current account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: update-account
|
||||
summary: Update account
|
||||
description: Update account details, settings, and custom attributes
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: create-an-account-agent-bot
|
||||
summary: Create an Agent Bot
|
||||
description: Create an agent bot in the account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: delete-an-account-agent-bot
|
||||
summary: Delete an AgentBot
|
||||
description: Delete an AgentBot from the account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
responses:
|
||||
200:
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: list-all-account-agent-bots
|
||||
summary: List all AgentBots
|
||||
description: List all agent bots available for the current account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: get-details-of-a-single-account-agent-bot
|
||||
summary: Get an agent bot details
|
||||
description: Get the details of an agent bot in the account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: update-an-account-agent-bot
|
||||
summary: Update an agent bot
|
||||
description: Update an agent bot's attributes
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: add-new-agent-to-account
|
||||
summary: Add a New Agent
|
||||
description: Add a new Agent to Account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: delete-agent-from-account
|
||||
summary: Remove an Agent from Account
|
||||
description: Remove an Agent from Account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: get-account-agents
|
||||
summary: List Agents in Account
|
||||
description: Get Details of Agents in an Account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
responses:
|
||||
200:
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: update-agent-in-account
|
||||
summary: Update Agent in Account
|
||||
description: Update an Agent in Account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: add-new-article-to-account
|
||||
summary: Add a new article
|
||||
description: Add a new article to portal
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: get-account-audit-logs
|
||||
summary: List Audit Logs in Account
|
||||
description: Get Details of Audit Log entries for an Account. This endpoint is only available in Enterprise editions and requires the audit_logs feature to be enabled.
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- name: page
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: add-new-automation-rule-to-account
|
||||
summary: Add a new automation rule
|
||||
description: Add a new automation rule to account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: delete-automation-rule-from-account
|
||||
summary: Remove a automation rule from account
|
||||
description: Remove a automation rule from account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
|
||||
@@ -7,6 +7,7 @@ parameters:
|
||||
- $ref: '#/components/parameters/page'
|
||||
description: Get details of automation rules in an Account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: get-details-of-a-single-automation-rule
|
||||
summary: Get a automation rule details
|
||||
description: Get the details of a automation rule in the account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: update-automation-rule-in-account
|
||||
summary: Update automation rule in Account
|
||||
description: Update a automation rule in account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
|
||||
@@ -4,6 +4,7 @@ get:
|
||||
operationId: getAccountBrandedEmailLayout
|
||||
summary: Get account branded email layout
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Get the account-scoped Liquid HTML layout used as the fallback for branded email replies.
|
||||
parameters:
|
||||
@@ -27,6 +28,7 @@ patch:
|
||||
operationId: updateAccountBrandedEmailLayout
|
||||
summary: Update account branded email layout
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Update or clear the account-scoped Liquid HTML layout used as the fallback for branded email replies.
|
||||
parameters:
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: create-campaign
|
||||
summary: Create a campaign
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: >-
|
||||
Create a campaign. For a supported messaging inbox, provide scheduled_at to schedule a one-off campaign; omitting it makes the campaign eligible for the next scheduler run. Website campaigns use trigger_rules instead. Channel-specific campaign availability and requirements still apply.
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: delete-campaign
|
||||
summary: Delete a campaign
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: >-
|
||||
Delete a campaign from the account.
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: list-campaigns
|
||||
summary: List campaigns
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: >-
|
||||
List all campaigns in the account. The response is an unpaginated array.
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: get-campaign
|
||||
summary: Get a campaign
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: >-
|
||||
Retrieve a campaign using its account-scoped ID.
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: update-campaign
|
||||
summary: Update a campaign
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: >-
|
||||
Update campaign fields, including scheduled_at to reschedule an active one-off campaign. Completed campaigns cannot be updated.
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: add-new-canned-response-to-account
|
||||
summary: Add a New Canned Response
|
||||
description: Add a new Canned Response to Account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: delete-canned-response-from-account
|
||||
summary: Remove a Canned Response from Account
|
||||
description: Remove a Canned Response from Account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: get-account-canned-response
|
||||
summary: List all Canned Responses in an Account
|
||||
description: Get Details of Canned Responses in an Account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: update-canned-response-in-account
|
||||
summary: Update Canned Response in Account
|
||||
description: Update a Canned Response in Account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: add-new-category-to-account
|
||||
summary: Add a new category
|
||||
description: Add a new category to portal
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -13,6 +13,7 @@ post:
|
||||
description: ID of the contact
|
||||
required: true
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -5,6 +5,7 @@ get:
|
||||
description: Get List of contactable Inboxes
|
||||
summary: Get Contactable Inboxes
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
|
||||
@@ -21,6 +21,7 @@ get:
|
||||
type: number
|
||||
description: ID of the contact
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
|
||||
@@ -13,6 +13,7 @@ get:
|
||||
operationId: contactDetails
|
||||
summary: Show Contact
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Get a contact belonging to the account using ID
|
||||
responses:
|
||||
@@ -41,6 +42,7 @@ put:
|
||||
operationId: contactUpdate
|
||||
summary: Update Contact
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Update a contact belonging to the account using ID
|
||||
requestBody:
|
||||
@@ -75,6 +77,7 @@ delete:
|
||||
operationId: contactDelete
|
||||
summary: Delete Contact
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Delete a contact belonging to the account using ID
|
||||
responses:
|
||||
|
||||
@@ -5,6 +5,7 @@ post:
|
||||
description: Filter contacts with custom filter options and pagination
|
||||
summary: Contact Filter
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
|
||||
@@ -14,6 +14,7 @@ get:
|
||||
summary: List Labels
|
||||
description: Lists all the labels of a contact
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
@@ -42,6 +43,7 @@ post:
|
||||
summary: Add Labels
|
||||
description: Add labels to a contact. Note that this API would overwrite the existing list of labels associated to the conversation.
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -5,6 +5,7 @@ get:
|
||||
description: Listing all the resolved contacts with pagination (Page size = 15). Resolved contacts are the ones with a value for identifier, email or phone number
|
||||
summary: List Contacts
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
@@ -31,6 +32,7 @@ post:
|
||||
description: Create a new Contact
|
||||
summary: Create Contact
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: contactMerge
|
||||
summary: Merge Contacts
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: |
|
||||
Merge two contacts into a single contact. The base contact remains and receives all
|
||||
|
||||
@@ -5,6 +5,7 @@ get:
|
||||
description: Search the resolved contacts using a search key, currently supports email search (Page size = 15). Resolved contacts are the ones with a value for identifier, email or phone number
|
||||
summary: Search Contacts
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
|
||||
@@ -4,6 +4,8 @@ operationId: assign-a-conversation
|
||||
summary: Assign Conversation
|
||||
description: Assign a conversation to an agent or a team
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- agentBotBearerAuth: []
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
requestBody:
|
||||
|
||||
@@ -4,6 +4,8 @@ operationId: update-custom-attributes-of-a-conversation
|
||||
summary: Update Custom Attributes
|
||||
description: Updates the custom attributes of a conversation
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- agentBotBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: destroy-custom-attributes-of-a-conversation
|
||||
summary: Destroy Custom Attributes
|
||||
description: Removes the given custom attribute keys from a conversation
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: conversationFilter
|
||||
description: Filter conversations with custom filter options and pagination
|
||||
summary: Conversations Filter
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- name: page
|
||||
|
||||
@@ -8,6 +8,7 @@ get:
|
||||
description: List all the conversations with pagination
|
||||
summary: Conversations List
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- name: assignee_type
|
||||
@@ -71,6 +72,8 @@ post:
|
||||
summary: Create New Conversation
|
||||
description: "Creating a conversation in chatwoot requires a source id. \n\n Learn more about source_id: https://www.chatwoot.com/hc/user-guide/articles/1677839703-how-to-create-an-api-channel-inbox#send-messages-to-the-api-channel"
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- agentBotBearerAuth: []
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
requestBody:
|
||||
|
||||
@@ -3,6 +3,8 @@ tags:
|
||||
operationId: conversation-add-labels
|
||||
summary: Add Labels
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- agentBotBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Add labels to a conversation. Note that this API would overwrite the existing list of labels associated to the conversation.
|
||||
requestBody:
|
||||
|
||||
@@ -3,6 +3,8 @@ tags:
|
||||
operationId: list-all-labels-of-a-conversation
|
||||
summary: List Labels
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- agentBotBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Lists all the labels of a conversation
|
||||
responses:
|
||||
|
||||
@@ -15,7 +15,7 @@ description: |
|
||||
|
||||
```bash
|
||||
curl -X POST "https://app.chatwoot.com/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages" \
|
||||
-H "api_access_token: <your-api-token>" \
|
||||
-H "Authorization: Bearer <your-api-token>" \
|
||||
-F "content=Here is the screenshot" \
|
||||
-F "message_type=outgoing" \
|
||||
-F "private=false" \
|
||||
@@ -76,6 +76,8 @@ description: |
|
||||
}
|
||||
```
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- agentBotBearerAuth: []
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
requestBody:
|
||||
|
||||
@@ -5,6 +5,7 @@ post:
|
||||
summary: Create New Message Attachment
|
||||
description: Create an attachment message.
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: delete-a-message
|
||||
summary: Delete a message
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Delete a message and it's attachments from the conversation.
|
||||
responses:
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: list-all-messages
|
||||
summary: Get messages
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: List all messages of a conversation
|
||||
parameters:
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: update-message-status
|
||||
summary: Update message status
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: |
|
||||
Updates the delivery status of a single message. Available only for messages in
|
||||
|
||||
@@ -8,6 +8,7 @@ get:
|
||||
description: Get open, unassigned and all Conversation counts
|
||||
summary: Get Conversation Counts
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- name: status
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: get-conversation-reporting-events
|
||||
summary: Conversation Reporting Events
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Get reporting events for a specific conversation. This endpoint returns events such as first response time, resolution time, and other metrics for the conversation, sorted by creation time in ascending order.
|
||||
responses:
|
||||
|
||||
@@ -3,6 +3,8 @@ tags:
|
||||
operationId: get-details-of-a-conversation
|
||||
summary: Conversation Details
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- agentBotBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Get all details regarding a conversation with all messages in the conversation
|
||||
responses:
|
||||
|
||||
@@ -4,6 +4,8 @@ operationId: toggle-priority-of-a-conversation
|
||||
summary: Toggle Priority
|
||||
description: Toggles the priority of conversation
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- agentBotBearerAuth: []
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
requestBody:
|
||||
|
||||
@@ -10,6 +10,8 @@ description: |-
|
||||
of the value provided, snoozed conversations always reopen on the next
|
||||
reply from the contact.
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- agentBotBearerAuth: []
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
requestBody:
|
||||
|
||||
@@ -4,6 +4,8 @@ operationId: toggle-typing-status-of-a-conversation
|
||||
summary: Toggle Typing Status
|
||||
description: Toggles the typing status for a conversation.
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- agentBotBearerAuth: []
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
requestBody:
|
||||
|
||||
@@ -4,6 +4,8 @@ operationId: update-conversation
|
||||
summary: Update Conversation
|
||||
description: Update Conversation Attributes
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- agentBotBearerAuth: []
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
requestBody:
|
||||
|
||||
@@ -1,29 +1,27 @@
|
||||
post:
|
||||
tags:
|
||||
- Conversations
|
||||
operationId: conversationUpdateLastSeen
|
||||
summary: Update Last Seen
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: Updates the last seen of the conversation so that conversations will have the bubbles in the agents screen
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: ID of the conversation
|
||||
required: true
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'404':
|
||||
description: Contact not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
tags:
|
||||
- Conversations
|
||||
operationId: conversationUpdateLastSeen
|
||||
summary: Update Last Seen
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Updates the last seen of the conversation so that conversations will have the bubbles in the agents screen
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/conversation_show'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'404':
|
||||
description: Contact not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: add-new-custom-attribute-to-account
|
||||
summary: Add a new custom attribute
|
||||
description: Add a new custom attribute to account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: delete-custom-attribute-from-account
|
||||
summary: Remove a custom attribute from account
|
||||
description: Remove a custom attribute from account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
|
||||
@@ -12,6 +12,7 @@ parameters:
|
||||
required: true
|
||||
description: Get details of custom attributes in an Account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: get-details-of-a-single-custom-attribute
|
||||
summary: Get a custom attribute details
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Get the details of a custom attribute in the account
|
||||
parameters:
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: update-custom-attribute-in-account
|
||||
summary: Update custom attribute in Account
|
||||
description: Update a custom attribute in account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
|
||||
@@ -6,6 +6,7 @@ description: Create a custom filter in the account
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: delete-a-custom-filter
|
||||
summary: Delete a custom filter
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Delete a custom filter from the account
|
||||
responses:
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: list-all-filters
|
||||
summary: List all custom filters
|
||||
description: List all custom filters in a category of a user
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: get-details-of-a-single-custom-filter
|
||||
summary: Get a custom filter details
|
||||
description: Get the details of a custom filter in the account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: update-a-custom-filter
|
||||
summary: Update a custom filter
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Update a custom filter's attributes
|
||||
requestBody:
|
||||
|
||||
@@ -5,6 +5,7 @@ get:
|
||||
summary: Show Inbox Agent Bot
|
||||
description: See if an agent bot is associated to the Inbox
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: add-new-agent-to-inbox
|
||||
summary: Add a New Agent
|
||||
description: Add a new Agent to Inbox
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: delete-agent-in-inbox
|
||||
summary: Remove an Agent from Inbox
|
||||
description: Remove an Agent from Inbox
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: get-inbox-members
|
||||
summary: List Agents in Inbox
|
||||
description: Get Details of Agents in an Inbox
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/inbox_id'
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: update-agents-in-inbox
|
||||
summary: Update Agents in Inbox
|
||||
description: All agents except the one passed in params will be removed
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -5,6 +5,7 @@ get:
|
||||
summary: List all inboxes
|
||||
description: List all inboxes available in the current account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
@@ -40,6 +41,7 @@ post:
|
||||
summary: Create an inbox
|
||||
description: You can create more than one website inbox in each account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
|
||||
@@ -4,6 +4,7 @@ get:
|
||||
operationId: listWhatsappMessageTemplates
|
||||
summary: List WhatsApp message templates
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: List the cached message templates available for a native or Twilio WhatsApp inbox
|
||||
parameters:
|
||||
|
||||
@@ -4,6 +4,7 @@ post:
|
||||
operationId: updateAgentBot
|
||||
summary: Add or remove agent bot
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: To add an agent bot pass agent_bot id, to remove agent bot from an inbox pass null
|
||||
parameters:
|
||||
|
||||
@@ -4,6 +4,7 @@ get:
|
||||
operationId: GetInbox
|
||||
summary: Get an inbox
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Get an inbox available in the current account
|
||||
parameters:
|
||||
|
||||
@@ -4,6 +4,7 @@ get:
|
||||
operationId: GetInbox
|
||||
summary: Get an inbox
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Get an inbox available in the current account
|
||||
parameters:
|
||||
@@ -39,6 +40,7 @@ patch:
|
||||
operationId: updateInbox
|
||||
summary: Update Inbox
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Update an existing inbox
|
||||
parameters:
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: get-details-of-all-integrations
|
||||
summary: List all the Integrations
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Get the details of all Integrations available for the account
|
||||
responses:
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: create-an-integration-hook
|
||||
summary: Create an integration hook
|
||||
description: Create an integration hook
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: delete-an-integration-hook
|
||||
summary: Delete an Integration Hook
|
||||
description: Delete an Integration Hook
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: update-an-integrations-hook
|
||||
summary: Update an Integration Hook
|
||||
description: Update an Integration Hook
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: create-a-label
|
||||
summary: Create a label
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Create a label in the account
|
||||
requestBody:
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: delete-a-label
|
||||
summary: Delete a label
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Delete a label from the account
|
||||
responses:
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: list-all-labels
|
||||
summary: List all labels
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: List all labels available in the current account
|
||||
responses:
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: get-details-of-a-single-label
|
||||
summary: Get a label
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Get the details of a label in the account
|
||||
responses:
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: update-a-label
|
||||
summary: Update a label
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Update a label's attributes
|
||||
requestBody:
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: add-new-portal-to-account
|
||||
summary: Add a new portal
|
||||
description: Add a new portal to account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -6,6 +6,7 @@ parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
description: Get details of portals in an Account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: get-details-of-a-single-portal
|
||||
summary: Get a portal details
|
||||
description: Get the details of a portal in the account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
@@ -14,57 +15,56 @@ responses:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/portal_single'
|
||||
$ref: '#/components/schemas/portal_item'
|
||||
example:
|
||||
payload:
|
||||
id: 123
|
||||
archived: false
|
||||
color: "#1F93FF"
|
||||
config:
|
||||
allowed_locales:
|
||||
- code: "en"
|
||||
articles_count: 32
|
||||
categories_count: 9
|
||||
custom_domain: "chatwoot.help"
|
||||
header_text: "Handbook"
|
||||
homepage_link: "https://www.chatwoot.com"
|
||||
name: "Handbook"
|
||||
slug: "handbook"
|
||||
page_title: "Handbook"
|
||||
account_id: 123
|
||||
inbox:
|
||||
id: 123
|
||||
archived: false
|
||||
color: "#1F93FF"
|
||||
config:
|
||||
allowed_locales:
|
||||
- code: "en"
|
||||
articles_count: 32
|
||||
categories_count: 9
|
||||
custom_domain: "chatwoot.help"
|
||||
header_text: "Handbook"
|
||||
homepage_link: "https://www.chatwoot.com"
|
||||
name: "Handbook"
|
||||
slug: "handbook"
|
||||
page_title: "Handbook"
|
||||
name: "Chatwoot"
|
||||
website_url: "chatwoot.com"
|
||||
channel_type: "Channel::WebWidget"
|
||||
avatar_url: "https://example.com/avatar.png"
|
||||
widget_color: "#1F93FF"
|
||||
website_token: "4cWzuf9i9jxN9tbnv8K9STKU"
|
||||
enable_auto_assignment: true
|
||||
web_widget_script: "<script>...</script>"
|
||||
welcome_title: "Hi there ! 🙌🏼"
|
||||
welcome_tagline: "We make it simple to connect with us."
|
||||
greeting_enabled: true
|
||||
greeting_message: "Hey there 👋, Thank you for reaching out to us."
|
||||
channel_id: 123
|
||||
working_hours_enabled: true
|
||||
enable_email_collect: true
|
||||
csat_survey_enabled: true
|
||||
timezone: "America/Los_Angeles"
|
||||
business_name: "Chatwoot"
|
||||
hmac_mandatory: true
|
||||
logo:
|
||||
id: 123
|
||||
portal_id: 123
|
||||
file_type: "image/png"
|
||||
account_id: 123
|
||||
inbox:
|
||||
id: 123
|
||||
name: "Chatwoot"
|
||||
website_url: "chatwoot.com"
|
||||
channel_type: "Channel::WebWidget"
|
||||
avatar_url: "https://example.com/avatar.png"
|
||||
widget_color: "#1F93FF"
|
||||
website_token: "4cWzuf9i9jxN9tbnv8K9STKU"
|
||||
enable_auto_assignment: true
|
||||
web_widget_script: "<script>...</script>"
|
||||
welcome_title: "Hi there ! 🙌🏼"
|
||||
welcome_tagline: "We make it simple to connect with us."
|
||||
greeting_enabled: true
|
||||
greeting_message: "Hey there 👋, Thank you for reaching out to us."
|
||||
channel_id: 123
|
||||
working_hours_enabled: true
|
||||
enable_email_collect: true
|
||||
csat_survey_enabled: true
|
||||
timezone: "America/Los_Angeles"
|
||||
business_name: "Chatwoot"
|
||||
hmac_mandatory: true
|
||||
logo:
|
||||
id: 123
|
||||
portal_id: 123
|
||||
file_type: "image/png"
|
||||
account_id: 123
|
||||
file_url: "https://example.com/logo.png"
|
||||
blob_id: 123
|
||||
filename: "square.png"
|
||||
meta:
|
||||
all_articles_count: 32
|
||||
categories_count: 9
|
||||
default_locale: "en"
|
||||
file_url: "https://example.com/logo.png"
|
||||
blob_id: 123
|
||||
filename: "square.png"
|
||||
meta:
|
||||
all_articles_count: 32
|
||||
categories_count: 9
|
||||
default_locale: "en"
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
|
||||
@@ -4,6 +4,7 @@ operationId: update-portal-to-account
|
||||
summary: Update a portal
|
||||
description: Update a portal to account
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: get-account-reporting-events
|
||||
summary: Account Reporting Events
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Get paginated reporting events for the account. This endpoint returns reporting events such as first response time, resolution time, and other metrics. Only administrators can access this endpoint. Results are paginated with 25 items per page.
|
||||
parameters:
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: get-agent-summary-report
|
||||
summary: Get conversation statistics grouped by agent
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: |
|
||||
Get conversation statistics grouped by agent for a given date range.
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: get-channel-summary-report
|
||||
summary: Get conversation statistics grouped by channel type
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: |
|
||||
Get conversation counts grouped by channel type and status for a given date range.
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: get-account-conversation-metrics
|
||||
summary: Account Conversation Metrics
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Get conversation metrics for Account
|
||||
responses:
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: get-agent-conversation-metrics
|
||||
summary: Agent Conversation Metrics
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: Get conversation metrics for Agent
|
||||
responses:
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: get-first-response-time-distribution
|
||||
summary: Get first response time distribution by channel
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: |
|
||||
Get the distribution of first response times grouped by channel type.
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: get-inbox-label-matrix
|
||||
summary: Get inbox-label matrix report
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: |
|
||||
Get a matrix showing the count of conversations for each inbox-label combination.
|
||||
|
||||
@@ -3,6 +3,7 @@ tags:
|
||||
operationId: get-inbox-summary-report
|
||||
summary: Get conversation statistics grouped by inbox
|
||||
security:
|
||||
- userBearerAuth: []
|
||||
- userApiKey: []
|
||||
description: |
|
||||
Get conversation statistics grouped by inbox for a given date range.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user