2020-02-23 07:24:29 +00:00
{
2021-05-05 15:09:00 +00:00
"swagger" : "2.0" ,
2020-02-23 07:24:29 +00:00
"info" : {
2020-03-11 10:49:13 +00:00
"description" : "This is the API documentation for Chatwoot server." ,
2020-02-23 07:24:29 +00:00
"version" : "1.0.0" ,
"title" : "Chatwoot" ,
"termsOfService" : "https://www.chatwoot.com/terms-of-service/" ,
"contact" : {
"email" : "support@chatwoot.com"
} ,
"license" : {
"name" : "MIT License" ,
"url" : "https://opensource.org/licenses/MIT"
2020-03-11 10:49:13 +00:00
}
2020-02-23 07:24:29 +00:00
} ,
2020-03-11 10:49:13 +00:00
"host" : "app.chatwoot.com" ,
"basePath" : "/api/v1/" ,
"schemes" : [
"https"
] ,
"produces" : [
"application/json; charset=utf-8"
] ,
"consumes" : [
"application/json; charset=utf-8"
] ,
2020-06-25 18:05:16 +00:00
"securityDefinitions" : {
"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."
} ,
"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."
} ,
"superAdminApiKey" : {
"type" : "apiKey" ,
"in" : "header" ,
"name" : "api_access_token" ,
"description" : "This token is only for the system admin or obtained via rails console. This token is to be used rarely for cases like creating a pre verified user through api from external system."
}
} ,
"security" : [
{
"userApiKey" : [
]
}
] ,
2020-02-23 07:24:29 +00:00
"paths" : {
2020-04-20 06:25:06 +00:00
"/accounts/{account_id}/inboxes" : {
2021-05-11 17:08:46 +00:00
"get" : {
"tags" : [
"Inbox"
] ,
"operationId" : "listAllInboxes" ,
"summary" : "List all inboxes" ,
"description" : "List all inboxes available in the current account" ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/inbox"
}
} ,
"404" : {
"description" : "Inbox not found"
} ,
"403" : {
"description" : "Access denied"
}
}
}
} ,
"/accounts/{account_id}/inboxes/" : {
2020-03-11 10:49:13 +00:00
"post" : {
2020-02-23 07:24:29 +00:00
"tags" : [
2020-04-20 06:25:06 +00:00
"Inbox"
2020-02-23 07:24:29 +00:00
] ,
2020-04-20 06:25:06 +00:00
"operationId" : "inboxCreation" ,
"summary" : "Create an inbox" ,
2020-03-11 10:49:13 +00:00
"description" : "You can create more than one website inbox in each account" ,
2020-02-23 07:24:29 +00:00
"parameters" : [
{
2020-03-11 10:49:13 +00:00
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object" ,
"properties" : {
2020-04-20 06:25:06 +00:00
"name" : {
"type" : "string" ,
"description" : "The name of the inbox"
} ,
"avatar" : {
"type" : "file" ,
"description" : "File for avatar image"
} ,
"channel" : {
2020-03-11 10:49:13 +00:00
"type" : "object" ,
"properties" : {
2020-04-20 06:25:06 +00:00
"type" : {
2020-03-11 10:49:13 +00:00
"type" : "string" ,
2020-04-20 06:25:06 +00:00
"enum" : [
"web_widget"
]
2020-03-11 10:49:13 +00:00
} ,
"website_url" : {
"type" : "string" ,
"description" : "URL at which the widget will be loaded"
} ,
2020-04-20 06:25:06 +00:00
"welcome_title" : {
2020-03-11 10:49:13 +00:00
"type" : "string" ,
2020-04-20 06:25:06 +00:00
"description" : "Welcome title to be displayed on the widget"
} ,
"welcome_tagline" : {
"type" : "string" ,
"description" : "Welcome tagline to be displayed on the widget"
} ,
"agent_away_message" : {
"type" : "string" ,
"description" : "A message which will be sent if there is not agent available. This is not available if agentbot is connected"
} ,
2020-03-11 10:49:13 +00:00
"widget_color" : {
"type" : "string" ,
"description" : "A Hex-color string used to customize the widget"
}
}
}
}
2020-02-23 07:24:29 +00:00
}
}
] ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
2020-03-11 10:49:13 +00:00
"$ref" : "#/definitions/inbox"
2020-02-23 07:24:29 +00:00
}
} ,
2020-03-11 10:49:13 +00:00
"404" : {
"description" : "Inbox not found"
} ,
"403" : {
"description" : "Access denied"
2020-02-23 07:24:29 +00:00
}
}
}
} ,
2020-04-07 04:49:19 +00:00
"/accounts/{account_id}/inboxes/{id}" : {
2020-03-11 10:49:13 +00:00
"patch" : {
2020-02-23 07:24:29 +00:00
"tags" : [
2020-03-11 10:49:13 +00:00
"Inbox"
2020-02-23 07:24:29 +00:00
] ,
2020-04-07 04:49:19 +00:00
"operationId" : "updateInbox" ,
"summary" : "Update Inbox" ,
"description" : "Add avatar and disable auto assignment for an inbox" ,
2020-02-23 07:24:29 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "number" ,
2020-03-11 10:49:13 +00:00
"description" : "ID of the inbox" ,
2020-02-23 07:24:29 +00:00
"required" : true
} ,
{
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2020-03-11 10:49:13 +00:00
"type" : "object" ,
"properties" : {
2020-04-20 06:25:06 +00:00
"name" : {
"type" : "string" ,
"description" : "The name of the inbox"
} ,
2020-03-11 10:49:13 +00:00
"enable_auto_assignment" : {
"type" : "boolean" ,
"required" : true ,
"description" : "Enable Auto Assignment"
2020-04-07 04:49:19 +00:00
} ,
"avatar" : {
"type" : "file" ,
"required" : false ,
"description" : "Image file for avatar"
2020-04-20 06:25:06 +00:00
} ,
"channel" : {
"type" : "object" ,
"properties" : {
"website_url" : {
"type" : "string" ,
"description" : "URL at which the widget will be loaded"
} ,
"welcome_title" : {
"type" : "string" ,
"description" : "Welcome title to be displayed on the widget"
} ,
"welcome_tagline" : {
"type" : "string" ,
"description" : "Welcome tagline to be displayed on the widget"
} ,
"agent_away_message" : {
"type" : "string" ,
"description" : "A message which will be sent if there is not agent available. This is not available if agentbot is connected"
} ,
"widget_color" : {
"type" : "string" ,
"description" : "A Hex-color string used to customize the widget"
}
}
2020-03-11 10:49:13 +00:00
}
}
2020-02-23 07:24:29 +00:00
}
}
] ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
2020-03-11 10:49:13 +00:00
"$ref" : "#/definitions/inbox"
2020-02-23 07:24:29 +00:00
}
} ,
"404" : {
2020-03-11 10:49:13 +00:00
"description" : "Inbox not found"
2020-02-23 07:24:29 +00:00
} ,
"403" : {
"description" : "Access denied"
}
}
}
2020-02-23 19:21:31 +00:00
} ,
2020-04-07 05:11:18 +00:00
"/accounts/{account_id}/inboxes/{id}/set_agent_bot" : {
2020-04-10 11:12:37 +00:00
"post" : {
2020-04-07 05:11:18 +00:00
"tags" : [
"Inbox"
] ,
2020-04-10 11:12:37 +00:00
"operationId" : "updateAgentBot" ,
"summary" : "Add or remove agent bot" ,
"description" : "To add an agent bot pass agent_bot id, to remove agent bot from an inbox pass null" ,
2020-04-07 05:11:18 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "number" ,
"description" : "ID of the inbox" ,
"required" : true
} ,
{
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object" ,
"properties" : {
2020-04-10 11:12:37 +00:00
"agent_bot" : {
"type" : "number" ,
2020-04-07 05:11:18 +00:00
"required" : true ,
2020-04-10 11:12:37 +00:00
"description" : "Agent bot ID"
2020-04-07 05:11:18 +00:00
}
}
}
}
] ,
"responses" : {
2020-04-10 11:12:37 +00:00
"204" : {
"description" : "Success"
2020-04-07 05:11:18 +00:00
} ,
"404" : {
2020-04-10 11:12:37 +00:00
"description" : "Inbox not found, Agent bot not found"
2020-04-07 05:11:18 +00:00
} ,
"403" : {
"description" : "Access denied"
}
}
}
} ,
"/agent_bots" : {
"get" : {
"tags" : [
"AgentBot"
] ,
"operationId" : "listAgentBots" ,
"summary" : "List all agentbots" ,
"description" : "List all available agentbots for the current installation" ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/agent_bot"
}
} ,
"404" : {
"description" : "Inbox not found, Agent bot not found"
} ,
"403" : {
"description" : "Access denied"
}
}
}
} ,
2020-04-07 04:49:19 +00:00
"/accounts/{account_id}/conversations" : {
2020-02-23 19:21:31 +00:00
"get" : {
"tags" : [
"Conversation"
] ,
2020-09-23 09:57:41 +00:00
"operationId" : "conversationSearch" ,
"description" : "Search for conversations containing a messages with the query string" ,
"summary" : "Conversations Search" ,
2020-02-23 19:21:31 +00:00
"parameters" : [
2020-09-23 09:57:41 +00:00
{
"name" : "q" ,
"in" : "query" ,
"type" : "string"
} ,
2020-02-23 19:21:31 +00:00
{
2020-03-11 10:49:13 +00:00
"name" : "assignee_type" ,
2020-02-23 19:21:31 +00:00
"in" : "query" ,
2020-03-11 10:49:13 +00:00
"type" : "string" ,
"enum" : [
"me" ,
"unassigned" ,
"all"
2020-09-23 09:57:41 +00:00
]
2020-03-11 10:49:13 +00:00
} ,
{
"name" : "status" ,
"in" : "query" ,
"type" : "string" ,
"enum" : [
"open" ,
"resolved" ,
"bot"
2020-09-23 09:57:41 +00:00
]
2020-03-11 10:49:13 +00:00
} ,
{
"name" : "page" ,
"in" : "query" ,
2020-09-23 09:57:41 +00:00
"type" : "integer"
2020-03-11 10:49:13 +00:00
} ,
{
"name" : "inbox_id" ,
"in" : "query" ,
"type" : "integer"
} ,
{
"name" : "labels" ,
"in" : "query" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
2021-05-11 14:50:52 +00:00
} ,
{
"$ref" : "#/parameters/account_id"
2020-02-23 19:21:31 +00:00
}
] ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/conversation_list"
}
} ,
"400" : {
"description" : "Bad Request Error" ,
"schema" : {
"$ref" : "#/definitions/bad_request_error"
}
2020-04-10 11:12:37 +00:00
} ,
"description" : "Access denied"
}
} ,
"post" : {
"tags" : [
"Conversation"
] ,
"operationId" : "newConversation" ,
"summary" : "Create New Conversation" ,
2021-05-11 17:08:46 +00:00
"description" : "Creating a conversation in chatwoot requires a source id. \n\n Learn more about source_id: https://github.com/chatwoot/chatwoot/wiki/Building-on-Top-of-Chatwoot:-Importing-Existing-Contacts-and-Creating-Conversations" ,
2020-06-25 18:05:16 +00:00
"security" : [
{
"userApiKey" : [
]
} ,
{
"agentBotApiKey" : [
]
}
] ,
2020-04-10 11:12:37 +00:00
"parameters" : [
2021-05-11 14:50:52 +00:00
{
"$ref" : "#/parameters/account_id"
} ,
2020-04-10 11:12:37 +00:00
{
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object" ,
"properties" : {
"source_id" : {
2021-05-11 17:08:46 +00:00
"$ref" : "#/parameters/source_id"
} ,
"inbox_id" : {
"type" : "string" ,
"description" : "Id of inbox in which the conversation is created <br/> Allowed Inbox Types: Website, Phone, Api, Email "
} ,
"contact_id" : {
2020-04-10 11:12:37 +00:00
"type" : "string" ,
2021-05-11 17:08:46 +00:00
"description" : "Contact Id for which conversation is created"
2021-01-07 08:17:38 +00:00
} ,
"additional_attributes" : {
"type" : "object" ,
"description" : "Lets you specify attributes like browser information"
2020-04-10 11:12:37 +00:00
}
}
}
}
] ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "number" ,
"description" : "ID of the conversation"
} ,
"account_id" : {
"type" : "number" ,
"description" : "Account Id"
} ,
"inbox_id" : {
"type" : "number" ,
"description" : "ID of the inbox"
}
}
}
} ,
"403" : {
"description" : "Access denied"
2020-02-23 19:21:31 +00:00
}
}
}
} ,
2021-05-11 14:50:52 +00:00
"/accounts/{account_id}/conversations/{converstion_id}" : {
"parameters" : [
{
"$ref" : "#/parameters/account_id"
} ,
{
"$ref" : "#/parameters/conversation_id"
}
] ,
2020-02-23 19:21:31 +00:00
"get" : {
"tags" : [
"Conversation"
] ,
2021-05-11 14:50:52 +00:00
"operationId" : "get-details-of-a-conversation" ,
2020-02-23 19:21:31 +00:00
"summary" : "Conversation Details" ,
"description" : "Get all details regarding a conversation with all messages in the conversation" ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/conversation_show"
}
} ,
"404" : {
"description" : "Conversation not found"
} ,
"403" : {
"description" : "Access denied"
}
}
}
} ,
2021-05-11 14:50:52 +00:00
"/accounts/{account_id}/conversations/{conversation_id}/toggle_status" : {
"parameters" : [
{
"$ref" : "#/parameters/account_id"
} ,
{
"$ref" : "#/parameters/conversation_id"
}
] ,
2020-02-23 19:21:31 +00:00
"post" : {
"tags" : [
"Conversation"
] ,
2021-05-11 14:50:52 +00:00
"operationId" : "toggle-status-of-a-conversation" ,
2020-02-23 19:21:31 +00:00
"summary" : "Toggle Status" ,
"description" : "Toggles the status of the conversation between open and resolved" ,
2020-06-25 18:05:16 +00:00
"security" : [
{
"userApiKey" : [
]
} ,
{
"agentBotApiKey" : [
]
}
] ,
2020-02-23 19:21:31 +00:00
"parameters" : [
2020-03-11 10:49:13 +00:00
{
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object" ,
"properties" : {
"status" : {
"type" : "string" ,
"enum" : [
"open" ,
2020-06-25 18:05:16 +00:00
"resolved" ,
"bot"
2020-03-11 10:49:13 +00:00
] ,
"required" : true ,
"description" : "The status of the conversation"
}
}
}
2020-02-23 19:21:31 +00:00
}
] ,
"responses" : {
2020-03-11 10:49:13 +00:00
"200" : {
2020-02-23 19:21:31 +00:00
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/conversation_status_toggle"
}
} ,
"404" : {
"description" : "Conversation not found"
} ,
2021-05-11 14:50:52 +00:00
"401" : {
"description" : "Unauthorized"
2020-02-23 19:21:31 +00:00
}
}
}
} ,
2021-05-11 17:08:46 +00:00
"/accounts/{account_id}/conversations/{id}/messages" : {
"post" : {
"tags" : [
"Messages"
] ,
"operationId" : "conversationNewMessageAttachment" ,
"summary" : "Create New Message Attachment" ,
"description" : "Create an attachment Message" ,
"consumes" : [
"multipart/form-data"
] ,
"security" : [
{
"userApiKey" : [
]
} ,
{
"agentBotApiKey" : [
]
}
] ,
"parameters" : [
{
"$ref" : "#/parameters/account_id"
} ,
{
"$ref" : "#/parameters/conversation_id"
} ,
{
"in" : "formData" ,
"name" : "content" ,
"type" : "string" ,
"description" : "The content of the message" ,
"required" : true
} ,
{
"in" : "formData" ,
"name" : "message_type" ,
"type" : "string" ,
"enum" : [
"outgoing" ,
"incoming"
]
} ,
{
"in" : "formData" ,
"name" : "private" ,
"type" : "boolean" ,
"description" : "Flag to identify if it is a private note"
} ,
{
"in" : "formData" ,
"name" : "attachments" ,
"type" : "array" ,
"description" : "The files to be uploaded." ,
"items" : {
"type" : "file"
}
}
] ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/generic_id"
} ,
{
"$ref" : "#/definitions/message"
}
]
}
} ,
"404" : {
"description" : "Conversation not found"
} ,
"403" : {
"description" : "Access denied"
}
}
}
} ,
2021-05-11 14:50:52 +00:00
"/accounts/{account_id}/conversations/{converstion_id}/messages" : {
"parameters" : [
{
"$ref" : "#/parameters/account_id"
} ,
{
"$ref" : "#/parameters/conversation_id"
}
] ,
2020-03-11 10:49:13 +00:00
"get" : {
"tags" : [
"Messages"
] ,
2021-05-11 14:50:52 +00:00
"operationId" : "list-all-messages" ,
2020-03-11 10:49:13 +00:00
"summary" : "Get messages" ,
"description" : "List all messages of a conversation" ,
"responses" : {
"200" : {
"description" : "Array of messages" ,
"type" : "array" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/generic_id"
} ,
{
"$ref" : "#/definitions/message"
}
]
}
} ,
"404" : {
"description" : "Conversation not found"
} ,
2021-05-11 14:50:52 +00:00
"401" : {
"description" : "Unauthorized"
2020-03-11 10:49:13 +00:00
}
}
} ,
2020-02-23 19:21:31 +00:00
"post" : {
"tags" : [
2020-03-11 10:49:13 +00:00
"Messages"
2020-02-23 19:21:31 +00:00
] ,
2021-05-11 14:50:52 +00:00
"operationId" : "create-a-new-message-in-a-conversation" ,
2020-03-11 10:49:13 +00:00
"summary" : "Create New Message" ,
2021-05-11 14:50:52 +00:00
"description" : "Create a new message in the conversation" ,
2020-06-25 18:05:16 +00:00
"security" : [
{
"userApiKey" : [
]
} ,
{
"agentBotApiKey" : [
]
}
] ,
2020-02-23 19:21:31 +00:00
"parameters" : [
2020-03-11 10:49:13 +00:00
{
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/conversation_message_create"
}
2020-02-23 19:21:31 +00:00
}
] ,
"responses" : {
"200" : {
2020-03-11 10:49:13 +00:00
"description" : "Success" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/generic_id"
} ,
{
"$ref" : "#/definitions/message"
}
]
}
2020-02-23 19:21:31 +00:00
} ,
"404" : {
2020-03-11 10:49:13 +00:00
"description" : "Conversation not found"
2020-02-23 19:21:31 +00:00
} ,
"403" : {
"description" : "Access denied"
}
}
}
} ,
2021-05-11 14:50:52 +00:00
"/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}" : {
"parameters" : [
{
"$ref" : "#/parameters/account_id"
} ,
{
"$ref" : "#/parameters/conversation_id"
} ,
{
"$ref" : "#/parameters/message_id"
}
] ,
"delete" : {
"tags" : [
"Messages"
] ,
"operationId" : "delete-a-message" ,
"summary" : "Delete a message" ,
"description" : "Delete a message and it's attachments from the conversation." ,
"responses" : {
"200" : {
"description" : "Success"
} ,
"401" : {
"description" : "Unauthorized"
} ,
"404" : {
"description" : "The message or conversation does not exist in the account"
}
}
}
} ,
"/accounts/{account_id}/conversations/{conversation_id}/labels" : {
"parameters" : [
{
"$ref" : "#/parameters/account_id"
} ,
{
"$ref" : "#/parameters/conversation_id"
}
] ,
2020-02-23 19:21:31 +00:00
"get" : {
"tags" : [
2021-05-11 14:50:52 +00:00
"Conversation Labels"
2020-02-23 19:21:31 +00:00
] ,
2021-05-11 14:50:52 +00:00
"operationId" : "list-all-labels-of-a-conversation" ,
2020-02-23 19:21:31 +00:00
"summary" : "List Labels" ,
"description" : "Lists all the labels of a conversation" ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/conversation_labels"
}
} ,
"404" : {
"description" : "Conversation not found"
} ,
2021-05-11 14:50:52 +00:00
"401" : {
"description" : "Unauthorized"
2020-02-23 19:21:31 +00:00
}
}
} ,
"post" : {
"tags" : [
2021-05-11 14:50:52 +00:00
"Conversation Labels"
2020-02-23 19:21:31 +00:00
] ,
2021-05-11 14:50:52 +00:00
"operationId" : "conversation-add-labels" ,
2020-03-03 19:11:21 +00:00
"summary" : "Add Labels" ,
2021-05-11 14:50:52 +00:00
"description" : "Add labels to a conversation. Note that this API would overwrite the existing list of labels associated to the conversation." ,
2020-02-23 19:21:31 +00:00
"parameters" : [
{
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object" ,
"properties" : {
"labels" : {
"type" : "array" ,
2021-05-11 14:50:52 +00:00
"description" : "Array of labels (comma-separated strings)" ,
2020-02-23 19:21:31 +00:00
"properties" : {
"type" : "string"
}
}
}
}
}
] ,
"responses" : {
2020-03-11 10:49:13 +00:00
"200" : {
2020-02-23 19:21:31 +00:00
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/conversation_labels"
}
} ,
"404" : {
"description" : "Conversation not found"
} ,
2021-05-11 14:50:52 +00:00
"401" : {
"description" : "Unauthorized"
2020-02-23 19:21:31 +00:00
}
}
}
} ,
2021-05-11 14:50:52 +00:00
"/accounts/{account_id}/conversations/{conversation_id}/assignments" : {
"parameters" : [
{
"$ref" : "#/parameters/account_id"
} ,
{
"$ref" : "#/parameters/conversation_id"
}
] ,
2020-02-23 19:21:31 +00:00
"post" : {
"tags" : [
2021-05-11 14:50:52 +00:00
"Conversation Assignment"
2020-02-23 19:21:31 +00:00
] ,
2021-05-11 14:50:52 +00:00
"operationId" : "assign-a-conversation" ,
2020-02-23 19:21:31 +00:00
"summary" : "Assign Conversation" ,
2021-05-05 15:09:00 +00:00
"description" : "Assign a conversation to an agent or a team" ,
2020-02-23 19:21:31 +00:00
"parameters" : [
{
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object" ,
"properties" : {
"assignee_id" : {
2021-05-05 15:09:00 +00:00
"type" : "number" ,
"description" : "Id of the assignee user"
} ,
"team_id" : {
"type" : "number" ,
"description" : "Id of the team. If the assignee_id is present, this param would be ignored"
2020-02-23 19:21:31 +00:00
}
}
}
}
] ,
"responses" : {
2020-03-11 10:49:13 +00:00
"200" : {
2020-02-23 19:21:31 +00:00
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/user"
}
} ,
"404" : {
"description" : "Conversation not found"
} ,
2021-05-11 14:50:52 +00:00
"401" : {
"description" : "Unauthorized"
2020-02-23 19:21:31 +00:00
}
}
}
} ,
2020-04-07 04:49:19 +00:00
"/accounts/{account_id}/contacts" : {
2020-03-11 10:49:13 +00:00
"get" : {
"tags" : [
"Contact"
] ,
"operationId" : "contactList" ,
2021-05-13 08:02:19 +00:00
"description" : "Listing all the contacts with pagination (Page size = 15)" ,
2020-03-11 10:49:13 +00:00
"summary" : "List Contacts" ,
"parameters" : [
{
2021-05-13 08:02:19 +00:00
"$ref" : "#/parameters/contact_sort_param"
} ,
{
"$ref" : "#/parameters/page"
2020-03-11 10:49:13 +00:00
}
] ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/contact_list"
}
} ,
"400" : {
"description" : "Bad Request Error" ,
"schema" : {
"$ref" : "#/definitions/bad_request_error"
}
}
}
} ,
2020-02-23 19:21:31 +00:00
"post" : {
"tags" : [
2020-03-11 10:49:13 +00:00
"Contact"
2020-02-23 19:21:31 +00:00
] ,
2020-03-11 10:49:13 +00:00
"operationId" : "contactCreate" ,
"description" : "Create New Contact" ,
2020-08-17 07:37:12 +00:00
"summary" : "Create Contact" ,
2020-03-11 10:49:13 +00:00
"parameters" : [
{
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/contact_create"
}
}
] ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/extended_contact"
}
} ,
"400" : {
"description" : "Bad Request Error" ,
"schema" : {
"$ref" : "#/definitions/bad_request_error"
}
}
}
}
} ,
2020-04-07 04:49:19 +00:00
"/accounts/{account_id}/contacts/{id}" : {
2020-03-11 10:49:13 +00:00
"get" : {
"tags" : [
"Contact"
] ,
"operationId" : "contactDetails" ,
"summary" : "Show Contact" ,
2020-02-23 19:21:31 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "number" ,
2020-03-11 10:49:13 +00:00
"description" : "id of the contact" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/extended_contact"
}
} ,
"404" : {
"description" : "Contact not found"
} ,
"403" : {
"description" : "Access denied"
}
}
} ,
"put" : {
"tags" : [
"Contact"
] ,
"operationId" : "contactUpdate" ,
"summary" : "Update Contact" ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "number" ,
"description" : "id of the contact" ,
2020-02-23 19:21:31 +00:00
"required" : true
} ,
{
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2020-03-11 10:49:13 +00:00
"$ref" : "#/definitions/contact_update"
2020-02-23 19:21:31 +00:00
}
}
] ,
"responses" : {
"204" : {
"description" : "Success" ,
"schema" : {
2020-03-11 10:49:13 +00:00
"$ref" : "#/definitions/contact_base"
2020-02-23 19:21:31 +00:00
}
} ,
"404" : {
2020-03-11 10:49:13 +00:00
"description" : "Contact not found"
} ,
"403" : {
"description" : "Access denied"
}
}
}
} ,
2020-04-07 04:49:19 +00:00
"/accounts/{account_id}/contacts/{id}/conversations" : {
2020-03-11 10:49:13 +00:00
"get" : {
"tags" : [
"Contact"
] ,
"operationId" : "contactConversations" ,
"summary" : "Conversations" ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "number" ,
"description" : "id of the contact" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/contact_conversations"
}
} ,
"404" : {
"description" : "Contact not found"
2020-02-23 19:21:31 +00:00
} ,
"403" : {
"description" : "Access denied"
}
}
}
2020-08-18 06:44:37 +00:00
} ,
"/accounts/{account_id}/contacts/search" : {
"get" : {
"tags" : [
"Contact"
] ,
"operationId" : "contactSearch" ,
2021-05-13 08:02:19 +00:00
"description" : "Search the contacts using a search key, currently supports email search (Page size = 15)" ,
2020-08-18 06:44:37 +00:00
"summary" : "Search Contacts" ,
"parameters" : [
{
"name" : "q" ,
"in" : "query" ,
"type" : "string"
2021-05-13 08:02:19 +00:00
} ,
{
"$ref" : "#/parameters/contact_sort_param"
} ,
{
"$ref" : "#/parameters/page"
2020-08-18 06:44:37 +00:00
}
] ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"type" : "object" ,
"properties" : {
"payload" : {
"$ref" : "#/definitions/contact_list"
}
}
}
} ,
"401" : {
"description" : "Authentication error" ,
"schema" : {
"$ref" : "#/definitions/bad_request_error"
}
}
}
}
} ,
"/accounts/{account_id}/contacts/{id}/contact_inboxes" : {
"post" : {
"tags" : [
"Contact"
] ,
"operationId" : "contactInboxCreation" ,
"description" : "Create a contact inbox record for an inbox" ,
"summary" : "Create contact inbox" ,
"parameters" : [
{
2021-01-14 15:06:04 +00:00
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object" ,
"properties" : {
"inbox_id" : {
"type" : "number" ,
"description" : "The id of the inbox" ,
"required" : true
2021-05-11 17:08:46 +00:00
} ,
"source_id" : {
"$ref" : "#/parameters/source_id"
2021-01-14 15:06:04 +00:00
}
}
}
2020-08-18 06:44:37 +00:00
}
] ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/contact_inboxes"
}
} ,
"401" : {
"description" : "Authentication error" ,
"schema" : {
"$ref" : "#/definitions/bad_request_error"
}
} ,
"422" : {
"description" : "Incorrect payload"
}
}
}
} ,
2021-05-11 17:08:46 +00:00
"/accounts/{account_id}/contacts/{id}/contactable_inboxes" : {
"get" : {
"tags" : [
"Contact"
] ,
"operationId" : "contactableInboxesGet" ,
"description" : "Get List of contactable Inboxes" ,
"summary" : "Get Contactable Inboxes" ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/contactable_inboxes"
}
} ,
"401" : {
"description" : "Authentication error" ,
"schema" : {
"$ref" : "#/definitions/bad_request_error"
}
} ,
"422" : {
"description" : "Incorrect payload"
}
}
}
} ,
2020-08-18 06:44:37 +00:00
"/profile" : {
"get" : {
"tags" : [
"Profile"
] ,
"operationId" : "fetchProfile" ,
"summary" : "Fetch user profile" ,
"description" : "Get the user profile details" ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/user"
}
} ,
"401" : {
"description" : "Unauthorized"
}
}
}
2021-05-05 15:09:00 +00:00
} ,
"/accounts/{account_id}/teams" : {
"parameters" : [
{
"$ref" : "#/parameters/account_id"
}
] ,
"get" : {
"tags" : [
"Teams"
] ,
"operationId" : "list-all-teams" ,
"summary" : "List all teams" ,
"description" : "List all teams available in the current account" ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/team"
}
} ,
"401" : {
"description" : "Unauthorized"
}
}
} ,
"post" : {
"tags" : [
"Teams"
] ,
"operationId" : "create-a-team" ,
"summary" : "Create a team" ,
"description" : "Create a team in the account" ,
"parameters" : [
{
"$ref" : "#/parameters/account_id"
} ,
{
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/team_create_update_payload"
}
}
] ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/team"
}
} ,
"401" : {
"description" : "Unauthorized"
}
}
}
} ,
"/accounts/{account_id}/teams/{id}" : {
"parameters" : [
{
"$ref" : "#/parameters/account_id"
} ,
{
"$ref" : "#/parameters/team_id"
}
] ,
"get" : {
"tags" : [
"Teams"
] ,
"operationId" : "get-details-of-a-single-team" ,
"summary" : "Get a team details" ,
"description" : "Get the details of a team in the account" ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/team"
}
} ,
"401" : {
"description" : "Unauthorized"
} ,
"404" : {
"description" : "The given team id does not exist in the account"
}
}
} ,
"patch" : {
"tags" : [
"Teams"
] ,
"operationId" : "update-a-team" ,
"summary" : "Update a team" ,
"description" : "Update a team's attributes" ,
"parameters" : [
{
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/team_create_update_payload"
}
}
] ,
"responses" : {
"200" : {
"description" : "Success" ,
"schema" : {
"$ref" : "#/definitions/team"
}
} ,
"401" : {
"description" : "Unauthorized"
}
}
} ,
"delete" : {
"tags" : [
"Teams"
] ,
2021-05-11 14:50:52 +00:00
"operationId" : "delete-a-team" ,
2021-05-05 15:09:00 +00:00
"summary" : "Delete a team" ,
"description" : "Delete a team from the account" ,
"responses" : {
"200" : {
"description" : "Success"
} ,
"401" : {
"description" : "Unauthorized"
} ,
"404" : {
"description" : "The team does not exist in the account"
}
}
}
2020-02-23 07:24:29 +00:00
}
} ,
"definitions" : {
"bad_request_error" : {
"title" : "data" ,
"type" : "object" ,
"properties" : {
"description" : {
"type" : "string"
} ,
"errors" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/request_error"
}
}
}
} ,
"request_error" : {
"type" : "object" ,
"properties" : {
"field" : {
"type" : "string"
} ,
"message" : {
"type" : "string"
} ,
"code" : {
"type" : "string"
}
}
} ,
2020-02-23 19:21:31 +00:00
"generic_id" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "number"
}
}
} ,
2020-02-23 07:24:29 +00:00
"contact" : {
"type" : "object" ,
"properties" : {
"email" : {
2020-03-11 10:49:13 +00:00
"type" : "string" ,
"description" : "Email address of the contact"
2020-02-23 07:24:29 +00:00
} ,
"name" : {
2020-03-11 10:49:13 +00:00
"type" : "string" ,
"description" : "The name of the contact"
2020-02-23 07:24:29 +00:00
} ,
"phone_number" : {
2020-03-11 10:49:13 +00:00
"type" : "string" ,
"description" : "Phone number of the contact"
2020-02-23 07:24:29 +00:00
} ,
"thumbnail" : {
2020-03-11 10:49:13 +00:00
"type" : "string" ,
"description" : "Avatar URL of the contact"
2020-02-23 07:24:29 +00:00
} ,
"additional_attributes" : {
2020-03-11 10:49:13 +00:00
"type" : "object" ,
"description" : "The object containing additional attributes related to the contact"
2020-08-18 06:44:37 +00:00
} ,
"contact_inboxes" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/contact_inboxes"
}
2020-02-23 07:24:29 +00:00
}
}
} ,
"conversation" : {
"type" : "object" ,
"properties" : {
2020-03-11 10:49:13 +00:00
"id" : {
"type" : "number" ,
"description" : "ID of the conversation"
} ,
2020-02-23 07:24:29 +00:00
"messages" : {
2020-03-11 10:49:13 +00:00
"type" : "array"
2020-02-23 07:24:29 +00:00
} ,
2020-04-10 11:12:37 +00:00
"account_id" : {
"type" : "number" ,
"description" : "Account Id"
} ,
2020-02-23 07:24:29 +00:00
"inbox_id" : {
2020-03-11 10:49:13 +00:00
"type" : "number" ,
"description" : "ID of the inbox"
2020-02-23 07:24:29 +00:00
} ,
"status" : {
"type" : "string" ,
"enum" : [
"open" ,
2020-03-11 10:49:13 +00:00
"resolved" ,
"bot"
] ,
"description" : "The status of the conversation"
2020-02-23 07:24:29 +00:00
} ,
"timestamp" : {
2020-03-11 10:49:13 +00:00
"type" : "string" ,
"description" : "The time at which conversation was created"
2020-02-23 07:24:29 +00:00
} ,
2020-09-10 13:49:15 +00:00
"contact_last_seen_at" : {
2020-02-23 07:24:29 +00:00
"type" : "string"
} ,
"agent_last_seen_at" : {
"type" : "agent_last_seen_at"
} ,
"unread_count" : {
2020-03-11 10:49:13 +00:00
"type" : "number" ,
"description" : "The number of unread messages"
} ,
"additional_attributes" : {
"type" : "object" ,
"description" : "The object containing additional attributes related to the conversation"
2020-02-23 07:24:29 +00:00
}
}
} ,
2020-02-23 19:21:31 +00:00
"message" : {
"type" : "object" ,
"properties" : {
"content" : {
2020-03-11 10:49:13 +00:00
"type" : "string" ,
"description" : "The text content of the message"
2020-02-23 19:21:31 +00:00
} ,
2020-04-10 11:12:37 +00:00
"content_type" : {
"type" : "string" ,
"enum" : [
"text" ,
"input_select" ,
"cards" ,
"form"
] ,
"description" : "The type of the template message"
} ,
"content_attributes" : {
"type" : "object" ,
"description" : "The content attributes for each content_type"
} ,
2020-02-23 19:21:31 +00:00
"message_type" : {
2020-03-11 10:49:13 +00:00
"type" : "string" ,
"enum" : [
"incoming" ,
"outgoing" ,
"activity" ,
"template"
] ,
"description" : "The type of the message"
2020-02-23 19:21:31 +00:00
} ,
"created_at" : {
2020-03-11 10:49:13 +00:00
"type" : "integer" ,
"description" : "The time at which message was created"
2020-02-23 19:21:31 +00:00
} ,
"private" : {
2020-03-11 10:49:13 +00:00
"type" : "boolean" ,
"description" : "The flags which shows whether the message is private or not"
2020-02-23 19:21:31 +00:00
} ,
"attachment" : {
2020-03-11 10:49:13 +00:00
"type" : "object" ,
"description" : "The file object attached to the image"
} ,
"sender" : {
"type" : "object" ,
"description" : "User/Agent/AgentBot object"
} ,
"conversation_id" : {
"type" : "number" ,
"description" : "ID of the conversation"
2020-02-23 19:21:31 +00:00
}
}
} ,
"user" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "number"
} ,
"uid" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
} ,
2020-08-18 06:44:37 +00:00
"available_name" : {
"type" : "string"
} ,
"display_name" : {
"type" : "string"
} ,
2020-02-23 19:21:31 +00:00
"email" : {
"type" : "string"
} ,
"account_id" : {
"type" : "number"
} ,
"role" : {
"type" : "string" ,
"enum" : [
"agent" ,
"administrator"
]
} ,
"confirmed" : {
"type" : "boolean"
} ,
2020-08-18 06:44:37 +00:00
"accounts" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/account"
}
2020-02-23 19:21:31 +00:00
}
}
} ,
2020-03-11 10:49:13 +00:00
"inbox" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "number" ,
"description" : "ID of the inbox"
} ,
2020-06-25 18:05:16 +00:00
"name" : {
"type" : "string" ,
"description" : "The name of the inbox"
} ,
"website_url" : {
"type" : "string" ,
"description" : "Website URL"
} ,
2020-03-11 10:49:13 +00:00
"channel_type" : {
"type" : "string" ,
"description" : "The type of the inbox"
} ,
"avatar_url" : {
"type" : "string" ,
"description" : "The avatar image of the inbox"
} ,
"widget_color" : {
"type" : "string" ,
"description" : "Widget Color used for customization of the widget"
} ,
"website_token" : {
"type" : "string" ,
"description" : "Website Token"
} ,
"enable_auto_assignment" : {
"type" : "boolean" ,
"description" : "The flag which shows whether Auto Assignment is enabled or not"
2020-03-16 07:02:34 +00:00
} ,
"web_widget_script" : {
"type" : "string" ,
"description" : "Script used to load the website widget"
2020-04-20 06:25:06 +00:00
} ,
"welcome_title" : {
"type" : "string" ,
"description" : "Welcome title to be displayed on the widget"
} ,
"welcome_tagline" : {
"type" : "string" ,
"description" : "Welcome tagline to be displayed on the widget"
} ,
2020-08-18 06:44:37 +00:00
"greeting_enabled" : {
"type" : "boolean" ,
"description" : "The flag which shows whether greeting is enabled"
} ,
"greeting_message" : {
2020-04-20 06:25:06 +00:00
"type" : "string" ,
2020-08-18 06:44:37 +00:00
"description" : "A greeting message when the user starts the conversation"
2020-03-11 10:49:13 +00:00
}
}
} ,
2020-04-07 05:11:18 +00:00
"agent_bot" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "number" ,
"description" : "ID of the agent bot"
} ,
"description" : {
"type" : "string" ,
"description" : "The description about the agent bot"
} ,
"name" : {
"type" : "string" ,
"description" : "The name of the agent bot"
} ,
"outgoing_url" : {
"type" : "string" ,
"description" : "The webhook URL for the bot"
}
}
} ,
2020-08-18 06:44:37 +00:00
"contact_inboxes" : {
"type" : "object" ,
"properties" : {
"source_id" : {
"type" : "string" ,
"description" : "Contact Inbox Source Id"
} ,
"inbox" : {
"$ref" : "#/definitions/inbox"
}
}
} ,
2021-05-11 17:08:46 +00:00
"contactable_inboxes" : {
"type" : "object" ,
"properties" : {
"source_id" : {
"type" : "string" ,
"description" : "Contact Inbox Source Id"
} ,
"inbox" : {
"$ref" : "#/definitions/inbox"
}
}
} ,
2020-08-18 06:44:37 +00:00
"account" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "number" ,
"description" : "Account ID"
} ,
"name" : {
"type" : "string" ,
"description" : "Name of the account"
} ,
"role" : {
"type" : "string" ,
"enum" : [
"administrator" ,
"agent"
] ,
"description" : "The user role in the account"
}
}
} ,
2021-05-05 15:09:00 +00:00
"team" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "number" ,
"description" : "The id of the team"
} ,
"name" : {
"type" : "string" ,
"description" : "The name of the team"
} ,
"description" : {
"type" : "string" ,
"description" : "The description about the team"
} ,
"allow_auto_assign" : {
"type" : "boolean" ,
"description" : "If this setting is turned on, the system would automatically assign the conversation to an agent in the team while assigning the conversation to a team"
} ,
"account_id" : {
"type" : "number" ,
"description" : "The id of the account with the team is a part of"
} ,
"is_member" : {
"type" : "boolean" ,
"description" : "This field shows whether the current user is a part of the team"
}
}
} ,
2020-02-23 07:24:29 +00:00
"extended_contact" : {
"allOf" : [
{
"$ref" : "#/definitions/contact"
} ,
{
"type" : "object" ,
"properties" : {
"id" : {
2020-03-11 10:49:13 +00:00
"type" : "number" ,
"description" : "Id of the user"
2020-02-23 07:24:29 +00:00
} ,
"availability_status" : {
"type" : "string" ,
"enum" : [
"online" ,
"offline"
2020-03-11 10:49:13 +00:00
] ,
"description" : "Availability status of the user"
2020-02-23 07:24:29 +00:00
}
}
}
]
} ,
"contact_base" : {
"allOf" : [
{
2020-02-23 19:21:31 +00:00
"$ref" : "#/definitions/generic_id"
2020-02-23 07:24:29 +00:00
} ,
{
2020-02-23 19:21:31 +00:00
"$ref" : "#/definitions/contact"
2020-02-23 07:24:29 +00:00
}
]
} ,
"contact_list" : {
"type" : "array" ,
2020-02-23 19:21:31 +00:00
"description" : "array of contacts" ,
2020-02-23 07:24:29 +00:00
"items" : {
"allOf" : [
{
2020-02-23 19:21:31 +00:00
"$ref" : "#/definitions/generic_id"
2020-02-23 07:24:29 +00:00
} ,
{
2020-02-23 19:21:31 +00:00
"$ref" : "#/definitions/contact"
2020-02-23 07:24:29 +00:00
}
]
}
} ,
"contact_conversations" : {
"type" : "array" ,
2020-02-23 19:21:31 +00:00
"description" : "array of conversations" ,
2020-02-23 07:24:29 +00:00
"items" : {
"allOf" : [
{
"$ref" : "#/definitions/conversation"
} ,
{
"type" : "object" ,
"properties" : {
"meta" : {
"type" : "object" ,
"properties" : {
"sender" : {
"type" : "object" ,
"properties" : {
"id" : {
2020-03-11 10:49:13 +00:00
"type" : "number" ,
"description" : "ID fo the sender"
2020-02-23 07:24:29 +00:00
} ,
"name" : {
2020-03-11 10:49:13 +00:00
"type" : "string" ,
"description" : "The name of the sender"
2020-02-23 07:24:29 +00:00
} ,
"thumbnail" : {
2020-03-11 10:49:13 +00:00
"type" : "string" ,
"description" : "Avatar URL of the contact"
2020-02-23 07:24:29 +00:00
} ,
"channel" : {
2020-03-11 10:49:13 +00:00
"type" : "string" ,
"description" : "Channel Type"
2020-02-23 07:24:29 +00:00
}
}
} ,
"assignee" : {
2020-02-23 19:21:31 +00:00
"$ref" : "#/definitions/user"
2020-02-23 07:24:29 +00:00
}
}
}
}
2020-02-23 19:21:31 +00:00
} ,
{
"type" : "object" ,
"properties" : {
"display_id" : {
"type" : "number"
}
}
2020-02-23 07:24:29 +00:00
}
]
}
} ,
2020-02-23 19:21:31 +00:00
"conversation_list" : {
"type" : "object" ,
"properties" : {
"data" : {
"type" : "object" ,
"properties" : {
"meta" : {
"type" : "object" ,
"properties" : {
"mine_count" : {
"type" : "number"
} ,
"unassigned_count" : {
"type" : "number"
} ,
"all_count" : {
"type" : "number"
}
}
} ,
"payload" : {
"type" : "array" ,
"description" : "array of conversations" ,
"items" : {
"allOf" : [
{
"$ref" : "#/definitions/generic_id"
} ,
{
"$ref" : "#/definitions/conversation"
} ,
{
"type" : "object" ,
"properties" : {
"meta" : {
"type" : "object" ,
"properties" : {
"sender" : {
"type" : "object" ,
"properties" : {
"id" : {
2020-03-11 10:49:13 +00:00
"type" : "number" ,
"description" : "ID fo the sender"
2020-02-23 19:21:31 +00:00
} ,
"name" : {
2020-03-11 10:49:13 +00:00
"type" : "string" ,
"description" : "The name of the sender"
2020-02-23 19:21:31 +00:00
} ,
"thumbnail" : {
2020-03-11 10:49:13 +00:00
"type" : "string" ,
"description" : "Avatar URL of the contact"
2020-02-23 19:21:31 +00:00
} ,
"channel" : {
2020-03-11 10:49:13 +00:00
"type" : "string" ,
"description" : "Channel Type"
2020-02-23 19:21:31 +00:00
}
}
} ,
"assignee" : {
"$ref" : "#/definitions/user"
}
}
}
}
}
]
}
}
}
}
}
} ,
"conversation_show" : {
"type" : "object" ,
2020-03-11 10:49:13 +00:00
"allOf" : [
{
"$ref" : "#/definitions/generic_id"
} ,
{
"$ref" : "#/definitions/conversation"
} ,
{
2020-02-23 19:21:31 +00:00
"type" : "object" ,
"properties" : {
2020-03-11 10:49:13 +00:00
"meta" : {
"type" : "object" ,
"properties" : {
"sender" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "number" ,
"description" : "ID fo the sender"
} ,
"name" : {
"type" : "string" ,
"description" : "The name of the sender"
} ,
"thumbnail" : {
"type" : "string" ,
"description" : "Avatar URL of the contact"
} ,
"channel" : {
"type" : "string" ,
"description" : "Channel Type"
}
}
} ,
"assignee" : {
"$ref" : "#/definitions/user"
}
2020-02-23 19:21:31 +00:00
}
}
}
}
2020-03-11 10:49:13 +00:00
]
2020-02-23 19:21:31 +00:00
} ,
"conversation_status_toggle" : {
"type" : "object" ,
"properties" : {
"meta" : {
"type" : "object"
} ,
"payload" : {
"type" : "object" ,
"properties" : {
"success" : {
"type" : "boolean"
} ,
"current_status" : {
"type" : "string" ,
"enum" : [
"open" ,
"resolved"
]
} ,
"conversation_id" : {
"type" : "number"
}
}
}
}
} ,
"conversation_labels" : {
"type" : "object" ,
"properties" : {
"payload" : {
"type" : "array" ,
2020-03-11 10:49:13 +00:00
"description" : "Array of labels" ,
2020-02-23 19:21:31 +00:00
"items" : {
"type" : "string"
}
}
}
} ,
"extended_message" : {
"allOf" : [
{
"$ref" : "#/definitions/generic_id"
} ,
{
"$ref" : "#/definitions/message"
} ,
{
"type" : "object" ,
"properties" : {
"source_id" : {
"type" : "number"
} ,
"sender" : {
"type" : "object"
}
}
}
]
} ,
2020-02-23 07:24:29 +00:00
"contact_create" : {
"type" : "object" ,
"properties" : {
"inbox_id" : {
2020-08-17 07:37:12 +00:00
"type" : "number" ,
"required" : true
} ,
"name" : {
"type" : "string"
} ,
"email" : {
"type" : "string"
} ,
"phone_number" : {
"type" : "string"
2020-02-23 07:24:29 +00:00
}
}
} ,
"contact_update" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
"email" : {
"type" : "string"
} ,
"phone_number" : {
"type" : "string"
}
}
2020-02-23 19:21:31 +00:00
} ,
"conversation_message_create" : {
"type" : "object" ,
"properties" : {
2020-04-10 11:12:37 +00:00
"content" : {
2020-03-11 10:49:13 +00:00
"type" : "string" ,
"description" : "The content of the message" ,
"required" : true
2020-02-23 19:21:31 +00:00
} ,
2020-08-17 07:37:12 +00:00
"message_type" : {
"type" : "string" ,
"enum" : [
"outgoing" ,
"incoming"
]
} ,
2020-02-23 19:21:31 +00:00
"private" : {
2020-03-11 10:49:13 +00:00
"type" : "boolean" ,
"description" : "Flag to identify if it is a private note"
2020-04-10 11:12:37 +00:00
} ,
"content_type" : {
"type" : "string" ,
"enum" : [
2020-08-25 17:34:02 +00:00
"input_email" ,
"cards" ,
2020-04-10 11:12:37 +00:00
"input_select" ,
"form" ,
2020-08-25 17:34:02 +00:00
"article"
] ,
"example" : "cards" ,
"description" : "if you want to create custom message types"
2020-04-10 11:12:37 +00:00
} ,
"content_attributes" : {
"type" : "object" ,
2020-08-25 17:34:02 +00:00
"description" : "attributes based on your content type"
2020-02-23 19:21:31 +00:00
}
}
2021-05-05 15:09:00 +00:00
} ,
"team_create_update_payload" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string" ,
"description" : "The name of the team"
} ,
"description" : {
"type" : "string" ,
"description" : "The description of the team"
} ,
"allow_auto_assign" : {
"type" : "boolean" ,
"description" : "If this setting is turned on, the system would automatically assign the conversation to an agent in the team while assigning the conversation to a team"
}
}
}
} ,
"parameters" : {
"account_id" : {
"in" : "path" ,
"name" : "account_id" ,
"schema" : {
"type" : "integer"
} ,
"required" : true ,
2021-05-11 14:50:52 +00:00
"description" : "The numeric ID of the account"
2021-05-05 15:09:00 +00:00
} ,
"team_id" : {
"in" : "path" ,
"name" : "id" ,
"schema" : {
"type" : "integer"
} ,
"required" : true ,
"description" : "The id of the team to be updated"
2021-05-11 14:50:52 +00:00
} ,
2021-05-11 17:08:46 +00:00
"source_id" : {
"type" : "string" ,
"description" : "Id of the session for which the conversation is created.\n\n\n\n Source Ids can be obtained through contactable inboxes API or via generated.<br/><br/>Website: Chatwoot generated string which can be obtained from webhook events. <br/> Phone Channels(Twilio): Phone number in e164 format <br/> Email Channels: Contact Email address <br/> API Channel: Any Random String"
} ,
2021-05-11 14:50:52 +00:00
"conversation_id" : {
"in" : "path" ,
"name" : "conversation_id" ,
"schema" : {
"type" : "integer"
} ,
"required" : true ,
"description" : "The numeric ID of the conversation"
} ,
"message_id" : {
"in" : "path" ,
"name" : "message_id" ,
"schema" : {
"type" : "integer"
} ,
"required" : true ,
"description" : "The numeric ID of the message"
2021-05-13 08:02:19 +00:00
} ,
"contact_sort_param" : {
"in" : "query" ,
"name" : "sort" ,
"schema" : {
"type" : "string" ,
"enum" : [
"name" ,
"email" ,
"phone_number" ,
"last_activity_at" ,
"-name" ,
"-email" ,
"-phone_number" ,
"-last_activity_at"
]
} ,
"required" : false ,
"description" : "The attribute by which list should be sorted"
} ,
"page" : {
"in" : "query" ,
"name" : "page" ,
"schema" : {
"type" : "integer" ,
"default" : 1
} ,
"required" : false ,
"description" : "The page parameter"
2020-02-23 07:24:29 +00:00
}
}
}