fix: Security definitions for endpoints

This commit is contained in:
Daniel Jimenez
2025-05-13 14:29:02 +12:00
parent 444668c646
commit 470d51c913
74 changed files with 718 additions and 191 deletions
+22 -17
View File
@@ -1,11 +1,11 @@
## ---------- ERRORS ------------- ##
## ---------- ERRORS -------------- ##
## -------------------------------- ##
bad_request_error:
$ref: ./error/bad_request.yml
request_error:
$ref: ./error/request.yml
## ---------- RESOURCE ------------- ##
## ---------- RESOURCE ------------ ##
## -------------------------------- ##
generic_id:
@@ -46,6 +46,8 @@ webhook:
$ref: ./resource/webhook.yml
account:
$ref: ./resource/account.yml
account_user:
$ref: ./resource/account_user.yml
platform_account:
$ref: ./resource/platform_account.yml
team:
@@ -65,12 +67,15 @@ public_message:
public_inbox:
$ref: ./resource/public/inbox.yml
## ---------- REQUEST------------- ##
## ---------- REQUEST ------------- ##
## -------------------------------- ##
account_create_update_payload:
$ref: ./request/account/create_update_payload.yml
account_user_create_update_payload:
$ref: ./request/account_user/create_update_payload.yml
agent_bot_create_update_payload:
$ref: ./request/agent_bot/create_update_payload.yml
@@ -83,21 +88,21 @@ canned_response_create_update_payload:
custom_attribute_create_update_payload:
$ref: ./request/custom_attribute/create_update_payload.yml
## contact
contact_create:
$ref: ./request/contact/create.yml
contact_update:
$ref: ./request/contact/update.yml
## Contact
contact_create_payload:
$ref: ./request/contact/create_payload.yml
contact_update_payload:
$ref: ./request/contact/update_payload.yml
## conversation
conversation_message_create:
$ref: ./request/conversation/create_message.yml
## Conversation
conversation_message_create_payload:
$ref: ./request/conversation/create_message_payload.yml
# Team request Payload
# Team
team_create_update_payload:
$ref: ./request/team/create_update_payload.yml
# Custom Filter request Payload
# Custom Filter
custom_filter_create_update_payload:
$ref: ./request/custom_filter/create_update_payload.yml
@@ -134,10 +139,10 @@ public_message_update_payload:
public_conversation_create_payload:
$ref: ./request/public/conversation/create_payload.yml
## ---------- RESPONSE ------------- ##
## ---------- RESPONSE ------------ ##
## -------------------------------- ##
## contact
## Contact
extended_contact:
allOf:
- $ref: '#/components/schemas/contact'
@@ -164,7 +169,7 @@ contact_conversations:
contact_labels:
$ref: ./resource/extension/contact/labels.yml
## conversation
## Conversation
conversation_list:
$ref: ./resource/extension/conversation/list.yml
conversation_show:
@@ -174,7 +179,7 @@ conversation_status_toggle:
conversation_labels:
$ref: ./resource/extension/conversation/labels.yml
## report
## Report
account_summary:
$ref: './resource/reports/summary.yml'
agent_conversation_metrics:
@@ -0,0 +1,11 @@
type: object
required:
- user_id
- role
properties:
user_id:
type: integer
description: The ID of the user
role:
type: string
description: whether user is an administrator or agent
@@ -22,4 +22,3 @@ properties:
custom_attributes:
type: object
description: An object where you can store custom attributes for contact. example {"type":"customer", "age":30}
@@ -1,4 +1,3 @@
type: object
properties:
identifier:
@@ -21,4 +20,4 @@ properties:
description: The url to a jpeg, png file for the user avatar
custom_attributes:
type: object
description: Custom attributes of the customer
description: Custom attributes of the customer
@@ -7,12 +7,13 @@ properties:
type: array
items:
type: string
enum: [
"conversation_created",
"conversation_status_changed",
"conversation_updated",
"message_created",
"message_updated",
"webwidget_triggered"
]
enum:
[
'conversation_created',
'conversation_status_changed',
'conversation_updated',
'message_created',
'message_updated',
'webwidget_triggered',
]
description: The events you want to subscribe to.
@@ -0,0 +1,14 @@
type: array
description: 'Array of account users'
items:
type: object
properties:
account_id:
type: integer
description: The ID of the account
user_id:
type: integer
description: The ID of the user
role:
type: string
description: whether user is an administrator or agent
@@ -3,6 +3,8 @@ tags:
operationId: create-an-account-agent-bot
summary: Create an Agent Bot
description: Create an agent bot in the account
security:
- userApiKey: []
requestBody:
required: true
content:
@@ -3,6 +3,8 @@ tags:
operationId: delete-an-account-agent-bot
summary: Delete an AgentBot
description: Delete an AgentBot from the account
security:
- userApiKey: []
responses:
200:
description: Success
@@ -3,6 +3,8 @@ tags:
operationId: list-all-account-agent-bots
summary: List all AgentBots
description: List all agent bots available for the current account
security:
- userApiKey: []
responses:
'200':
description: Success
@@ -3,6 +3,8 @@ tags:
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:
- userApiKey: []
responses:
'200':
description: Success
@@ -3,6 +3,8 @@ tags:
operationId: update-an-account-agent-bot
summary: Update an agent bot
description: Update an agent bot's attributes
security:
- userApiKey: []
requestBody:
required: true
content:
@@ -12,6 +12,8 @@ post:
type: number
description: ID of the contact
required: true
security:
- userApiKey: []
requestBody:
required: true
content:
@@ -4,6 +4,8 @@ get:
operationId: contactableInboxesGet
description: Get List of contactable Inboxes
summary: Get Contactable Inboxes
security:
- userApiKey: []
parameters:
- $ref: '#/components/parameters/account_id'
- name: id
@@ -20,6 +20,8 @@ get:
schema:
type: number
description: ID of the contact
security:
- userApiKey: []
responses:
'200':
description: Success
+7 -1
View File
@@ -12,6 +12,8 @@ get:
- Contacts
operationId: contactDetails
summary: Show Contact
security:
- userApiKey: []
description: Get a contact belonging to the account using ID
responses:
'200':
@@ -38,13 +40,15 @@ put:
- Contacts
operationId: contactUpdate
summary: Update Contact
security:
- userApiKey: []
description: Update a contact belonging to the account using ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/contact_update'
$ref: '#/components/schemas/contact_update_payload'
responses:
'204':
description: Success
@@ -70,6 +74,8 @@ delete:
- Contacts
operationId: contactDelete
summary: Delete Contact
security:
- userApiKey: []
description: Delete a contact belonging to the account using ID
responses:
'200':
+62 -62
View File
@@ -1,64 +1,64 @@
tags:
- Contacts
operationId: contactFilter
description: Filter contacts with custom filter options and pagination
summary: Contact Filter
security:
- userApiKey: []
- agentBotApiKey: []
parameters:
- name: page
in: query
schema:
type: number
requestBody:
required: true
content:
application/json:
post:
tags:
- Contacts
operationId: contactFilter
description: Filter contacts with custom filter options and pagination
summary: Contact Filter
security:
- userApiKey: []
parameters:
- $ref: '#/components/parameters/account_id'
- name: page
in: query
schema:
type: object
properties:
payload:
type: array
items:
type: object
properties:
attribute_key:
type: string
description: filter attribute name
filter_operator:
type: string
description: filter operator name
enum: [equal_to, not_equal_to, contains, does_not_contain]
values:
type: array
items:
type: number
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
payload:
type: array
items:
type: object
properties:
attribute_key:
type: string
description: array of the attribute values to filter
query_operator:
type: string
description: query operator name
enum: [AND, OR]
example:
- attribute_key: 'name'
filter_operator: 'equal_to'
values: ['en']
query_operator: 'AND'
- attribute_key: 'country_code'
filter_operator: 'equal_to'
values: ['us']
query_operator: null
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/contact_list'
'400':
description: Bad Request Error
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'
description: filter attribute name
filter_operator:
type: string
description: filter operator name
enum: [equal_to, not_equal_to, contains, does_not_contain]
values:
type: array
items:
type: string
description: array of the attribute values to filter
query_operator:
type: string
description: query operator name
enum: [AND, OR]
example:
- attribute_key: 'name'
filter_operator: 'equal_to'
values: ['en']
query_operator: 'AND'
- attribute_key: 'country_code'
filter_operator: 'equal_to'
values: ['us']
query_operator: null
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/contact_list'
'400':
description: Bad Request Error
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'
@@ -3,6 +3,8 @@ tags:
operationId: contact-add-labels
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:
- userApiKey: []
requestBody:
required: true
content:
@@ -3,6 +3,8 @@ tags:
operationId: list-all-labels-of-a-contact
summary: List Labels
description: Lists all the labels of a contact
security:
- userApiKey: []
responses:
'200':
description: Success
@@ -2,8 +2,10 @@ get:
tags:
- Contacts
operationId: contactList
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
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:
- userApiKey: []
parameters:
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/contact_sort_param'
@@ -28,6 +30,8 @@ post:
operationId: contactCreate
description: Create a new Contact
summary: Create Contact
security:
- userApiKey: []
parameters:
- $ref: '#/components/parameters/account_id'
requestBody:
@@ -35,7 +39,7 @@ post:
content:
application/json:
schema:
$ref: '#/components/schemas/contact_create'
$ref: '#/components/schemas/contact_create_payload'
responses:
'200':
description: Success
@@ -4,6 +4,8 @@ get:
operationId: contactSearch
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:
- userApiKey: []
parameters:
- $ref: '#/components/parameters/account_id'
- name: q
@@ -5,7 +5,6 @@ summary: Update Custom Attributes
description: Updates the custom attributes of a conversation
security:
- userApiKey: []
- agentBotApiKey: []
requestBody:
required: true
content:
@@ -5,7 +5,6 @@ description: Filter conversations with custom filter options and pagination
summary: Conversations Filter
security:
- userApiKey: []
- agentBotApiKey: []
parameters:
- name: page
in: query
@@ -7,6 +7,8 @@ get:
operationId: conversationList
description: List all the conversations with pagination
summary: Conversations List
security:
- userApiKey: []
parameters:
- name: assignee_type
in: query
@@ -2,6 +2,8 @@ tags:
- Conversation Labels
operationId: conversation-add-labels
summary: Add Labels
security:
- userApiKey: []
description: Add labels to a conversation. Note that this API would overwrite the existing list of labels associated to the conversation.
requestBody:
required: true
@@ -2,6 +2,8 @@ tags:
- Conversation Labels
operationId: list-all-labels-of-a-conversation
summary: List Labels
security:
- userApiKey: []
description: Lists all the labels of a conversation
responses:
'200':
@@ -11,7 +11,7 @@ requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/conversation_message_create'
$ref: '#/components/schemas/conversation_message_create_payload'
responses:
'200':
description: Success
@@ -6,7 +6,6 @@ post:
description: Create an attachment message.
security:
- userApiKey: []
- agentBotApiKey: []
parameters:
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/conversation_id'
@@ -2,6 +2,8 @@ tags:
- Messages
operationId: delete-a-message
summary: Delete a message
security:
- userApiKey: []
description: Delete a message and it's attachments from the conversation.
responses:
'200':
@@ -2,6 +2,8 @@ tags:
- Messages
operationId: list-all-messages
summary: Get messages
security:
- userApiKey: []
description: List all messages of a conversation
responses:
'200':
@@ -7,6 +7,8 @@ get:
operationId: conversationListMeta
description: Get open, unassigned and all Conversation counts
summary: Get Conversation Counts
security:
- userApiKey: []
parameters:
- name: status
in: query
@@ -2,6 +2,8 @@ tags:
- Conversations
operationId: get-details-of-a-conversation
summary: Conversation Details
security:
- userApiKey: []
description: Get all details regarding a conversation with all messages in the conversation
responses:
'200':
@@ -3,6 +3,8 @@ post:
- 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
@@ -2,6 +2,8 @@ tags:
- Custom Attributes
operationId: get-details-of-a-single-custom-attribute
summary: Get a custom attribute details
security:
- userApiKey: []
description: Get the details of a custom attribute in the account
parameters:
- $ref: '#/components/parameters/account_id'
@@ -5,6 +5,8 @@ summary: Create a custom filter
description: Create a custom filter in the account
parameters:
- $ref: '#/components/parameters/account_id'
security:
- userApiKey: []
requestBody:
required: true
content:
@@ -2,6 +2,8 @@ tags:
- Custom Filters
operationId: delete-a-custom-filter
summary: Delete a custom filter
security:
- userApiKey: []
description: Delete a custom filter from the account
responses:
'200':
@@ -3,6 +3,8 @@ tags:
operationId: list-all-filters
summary: List all custom filters
description: List all custom filters in a category of a user
security:
- userApiKey: []
responses:
'200':
description: Success
@@ -3,6 +3,8 @@ tags:
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:
- userApiKey: []
responses:
'200':
description: Success
@@ -2,6 +2,8 @@ tags:
- Custom Filters
operationId: update-a-custom-filter
summary: Update a custom filter
security:
- userApiKey: []
description: Update a custom filter's attributes
requestBody:
required: true
@@ -4,6 +4,8 @@ post:
operationId: inboxCreation
summary: Create an inbox
description: You can create more than one website inbox in each account
security:
- userApiKey: []
parameters:
- $ref: '#/components/parameters/account_id'
requestBody:
@@ -4,6 +4,8 @@ get:
operationId: getInboxAgentBot
summary: Show Inbox Agent Bot
description: See if an agent bot is associated to the Inbox
security:
- userApiKey: []
parameters:
- $ref: '#/components/parameters/account_id'
- name: id
@@ -4,6 +4,8 @@ get:
operationId: listAllInboxes
summary: List all inboxes
description: List all inboxes available in the current account
security:
- userApiKey: []
parameters:
- $ref: '#/components/parameters/account_id'
responses:
@@ -3,6 +3,8 @@ post:
- Inboxes
operationId: updateAgentBot
summary: Add or remove agent bot
security:
- userApiKey: []
description: To add an agent bot pass agent_bot id, to remove agent bot from an inbox pass null
parameters:
- $ref: '#/components/parameters/account_id'
@@ -3,6 +3,8 @@ get:
- Inboxes
operationId: GetInbox
summary: Get an inbox
security:
- userApiKey: []
description: Get an inbox available in the current account
parameters:
- $ref: '#/components/parameters/account_id'
@@ -3,6 +3,8 @@ patch:
- Inboxes
operationId: updateInbox
summary: Update Inbox
security:
- userApiKey: []
description: Add avatar and disable auto assignment for an inbox
parameters:
- $ref: '#/components/parameters/account_id'
@@ -2,6 +2,8 @@ tags:
- Integrations
operationId: get-details-of-all-integrations
summary: List all the Integrations
security:
- userApiKey: []
description: Get the details of all Integrations available for the account
responses:
'200':
@@ -3,6 +3,8 @@ tags:
operationId: create-an-integration-hook
summary: Create an integration hook
description: Create an integration hook
security:
- userApiKey: []
parameters:
- $ref: '#/components/parameters/account_id'
requestBody:
@@ -3,6 +3,8 @@ tags:
operationId: delete-an-integration-hook
summary: Delete an Integration Hook
description: Delete an Integration Hook
security:
- userApiKey: []
parameters:
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/hook_id'
@@ -3,6 +3,8 @@ tags:
operationId: update-an-integrations-hook
summary: Update an Integration Hook
description: Update an Integration Hook
security:
- userApiKey: []
parameters:
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/hook_id'
@@ -2,6 +2,8 @@ tags:
- Reports
operationId: get-account-conversation-metrics
summary: Account Conversation Metrics
security:
- userApiKey: []
description: Get conversation metrics for Account
responses:
'200':
@@ -2,6 +2,8 @@ tags:
- Reports
operationId: get-agent-conversation-metrics
summary: Agent Conversation Metrics
security:
- userApiKey: []
description: Get conversation metrics for Agent
responses:
'200':
@@ -2,6 +2,8 @@ tags:
- Reports
operationId: list-all-conversation-statistics
summary: Get Account reports
security:
- userApiKey: []
description: Get Account reports for a specific type, metric and date range
responses:
'200':
@@ -2,6 +2,8 @@ tags:
- Reports
operationId: list-all-conversation-statistics-summary
summary: Get Account reports summary
security:
- userApiKey: []
description: Get Account reports summary for a specific type and date range
responses:
'200':
@@ -2,6 +2,8 @@ tags:
- Teams
operationId: create-a-team
summary: Create a team
security:
- userApiKey: []
description: Create a team in the account
parameters:
- $ref: '#/components/parameters/account_id'
@@ -2,6 +2,8 @@ tags:
- Teams
operationId: delete-a-team
summary: Delete a team
security:
- userApiKey: []
description: Delete a team from the account
responses:
'200':
@@ -2,6 +2,8 @@ tags:
- Teams
operationId: list-all-teams
summary: List all teams
security:
- userApiKey: []
description: List all teams available in the current account
responses:
'200':
+2
View File
@@ -2,6 +2,8 @@ tags:
- Teams
operationId: get-details-of-a-single-team
summary: Get a team details
security:
- userApiKey: []
description: Get the details of a team in the account
responses:
'200':
@@ -2,6 +2,8 @@ tags:
- Teams
operationId: update-a-team
summary: Update a team
security:
- userApiKey: []
description: Update a team's attributes
requestBody:
required: true
@@ -2,6 +2,8 @@ tags:
- Webhooks
operationId: create-a-webhook
summary: Add a webhook
security:
- userApiKey: []
description: Add a webhook subscription to the account
parameters:
- $ref: '#/components/parameters/account_id'
@@ -2,6 +2,8 @@ tags:
- Webhooks
operationId: delete-a-webhook
summary: Delete a webhook
security:
- userApiKey: []
description: Delete a webhook from the account
responses:
'200':
@@ -2,6 +2,8 @@ tags:
- Webhooks
operationId: list-all-webhooks
summary: List all webhooks
security:
- userApiKey: []
description: List all webhooks in the account
responses:
'200':
@@ -2,6 +2,8 @@ tags:
- Webhooks
operationId: update-a-webhook
summary: Update a webhook object
security:
- userApiKey: []
description: Update a webhook object in the account
parameters:
- $ref: '#/components/parameters/account_id'
+2 -5
View File
@@ -101,7 +101,7 @@
get:
$ref: ./public/inboxes/conversations/index.yml
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}:
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}:
parameters:
- $ref: '#/components/parameters/public_inbox_identifier'
- $ref: '#/components/parameters/public_contact_identifier'
@@ -259,10 +259,7 @@
/api/v1/accounts/{account_id}/contacts/search:
$ref: ./application/contacts/search.yml
/api/v1/accounts/{account_id}/contacts/filter:
parameters:
- $ref: '#/components/parameters/account_id'
post:
$ref: ./application/contacts/filter.yml
$ref: ./application/contacts/filter.yml
/api/v1/accounts/{account_id}/contacts/{id}/contact_inboxes:
$ref: ./application/contact_inboxes/create.yml
/api/v1/accounts/{account_id}/contacts/{id}/contactable_inboxes:
@@ -10,18 +10,7 @@ requestBody:
content:
application/json:
schema:
type: object
required:
- user_id
- role
properties:
user_id:
type: integer
description: The ID of the user
role:
type: string
description: whether user is an administrator or agent
$ref: '#/components/schemas/account_user_create_update_payload'
responses:
'200':
description: Success
+1 -15
View File
@@ -11,21 +11,7 @@ responses:
content:
application/json:
schema:
type: array
description: 'Array of account users'
items:
type: object
properties:
account_id:
type: integer
description: The ID of the account
user_id:
type: integer
description: The ID of the user
role:
type: string
description: whether user is an administrator or agent
$ref: '#/components/schemas/account_user'
'401':
description: Unauthorized
content:
+2
View File
@@ -4,6 +4,8 @@ get:
operationId: fetchProfile
summary: Fetch user profile
description: Get the user profile details
security:
- userApiKey: []
responses:
'200':
description: Success
@@ -3,6 +3,7 @@ tags:
operationId: list-all-contact-conversations
summary: List all conversations
description: List all conversations for the contact
security: []
responses:
'200':
description: Success
@@ -3,6 +3,7 @@ tags:
operationId: get-single-conversation
summary: Get a single conversation
description: Retrieves the details of a specific conversation
security: []
responses:
'200':
description: Success
@@ -3,6 +3,7 @@ tags:
operationId: resolve-conversation
summary: Resolve a conversation
description: Marks a conversation as resolved
security: []
responses:
'200':
description: Conversation resolved successfully
@@ -3,6 +3,7 @@ tags:
operationId: toggle-typing-status
summary: Toggle typing status
description: Toggles the typing status in a conversation
security: []
parameters:
- name: typing_status
in: query
@@ -3,6 +3,7 @@ tags:
operationId: update-last-seen
summary: Update last seen
description: Updates the last seen time of the contact in a conversation
security: []
responses:
'200':
description: Last seen updated successfully
@@ -3,6 +3,7 @@ tags:
operationId: list-all-converation-messages
summary: List all messages
description: List all messages in the conversation
security: []
responses:
'200':
description: Success
+477 -62
View File
@@ -235,25 +235,7 @@
"content": {
"application/json": {
"schema": {
"type": "array",
"description": "Array of account users",
"items": {
"type": "object",
"properties": {
"account_id": {
"type": "integer",
"description": "The ID of the account"
},
"user_id": {
"type": "integer",
"description": "The ID of the user"
},
"role": {
"type": "string",
"description": "whether user is an administrator or agent"
}
}
}
"$ref": "#/components/schemas/account_user"
}
}
}
@@ -289,21 +271,7 @@
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"user_id",
"role"
],
"properties": {
"user_id": {
"type": "integer",
"description": "The ID of the user"
},
"role": {
"type": "string",
"description": "whether user is an administrator or agent"
}
}
"$ref": "#/components/schemas/account_user_create_update_payload"
}
}
}
@@ -1122,6 +1090,9 @@
"operationId": "list-all-contact-conversations",
"summary": "List all conversations",
"description": "List all conversations for the contact",
"security": [
],
"responses": {
"200": {
"description": "Success",
@@ -1169,6 +1140,9 @@
"operationId": "get-single-conversation",
"summary": "Get a single conversation",
"description": "Retrieves the details of a specific conversation",
"security": [
],
"responses": {
"200": {
"description": "Success",
@@ -1222,6 +1196,9 @@
"operationId": "resolve-conversation",
"summary": "Resolve a conversation",
"description": "Marks a conversation as resolved",
"security": [
],
"responses": {
"200": {
"description": "Conversation resolved successfully",
@@ -1275,6 +1252,9 @@
"operationId": "toggle-typing-status",
"summary": "Toggle typing status",
"description": "Toggles the typing status in a conversation",
"security": [
],
"parameters": [
{
"name": "typing_status",
@@ -1332,6 +1312,9 @@
"operationId": "update-last-seen",
"summary": "Update last seen",
"description": "Updates the last seen time of the contact in a conversation",
"security": [
],
"responses": {
"200": {
"description": "Last seen updated successfully"
@@ -1421,6 +1404,9 @@
"operationId": "list-all-converation-messages",
"summary": "List all messages",
"description": "List all messages in the conversation",
"security": [
],
"responses": {
"200": {
"description": "Success",
@@ -1524,6 +1510,13 @@
"operationId": "list-all-labels-of-a-contact",
"summary": "List Labels",
"description": "Lists all the labels of a contact",
"security": [
{
"userApiKey": [
]
}
],
"responses": {
"200": {
"description": "Success",
@@ -1564,6 +1557,13 @@
"operationId": "contact-add-labels",
"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": [
{
"userApiKey": [
]
}
],
"requestBody": {
"required": true,
"content": {
@@ -1660,6 +1660,13 @@
"operationId": "list-all-account-agent-bots",
"summary": "List all AgentBots",
"description": "List all agent bots available for the current account",
"security": [
{
"userApiKey": [
]
}
],
"responses": {
"200": {
"description": "Success",
@@ -1694,6 +1701,13 @@
"operationId": "create-an-account-agent-bot",
"summary": "Create an Agent Bot",
"description": "Create an agent bot in the account",
"security": [
{
"userApiKey": [
]
}
],
"requestBody": {
"required": true,
"content": {
@@ -1744,6 +1758,13 @@
"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": [
{
"userApiKey": [
]
}
],
"responses": {
"200": {
"description": "Success",
@@ -1784,6 +1805,13 @@
"operationId": "update-an-account-agent-bot",
"summary": "Update an agent bot",
"description": "Update an agent bot's attributes",
"security": [
{
"userApiKey": [
]
}
],
"requestBody": {
"required": true,
"content": {
@@ -1824,6 +1852,13 @@
"operationId": "delete-an-account-agent-bot",
"summary": "Delete an AgentBot",
"description": "Delete an AgentBot from the account",
"security": [
{
"userApiKey": [
]
}
],
"responses": {
"200": {
"description": "Success"
@@ -2486,6 +2521,13 @@
],
"operationId": "get-details-of-a-single-custom-attribute",
"summary": "Get a custom attribute details",
"security": [
{
"userApiKey": [
]
}
],
"description": "Get the details of a custom attribute in the account",
"parameters": [
{
@@ -2663,8 +2705,15 @@
"Contacts"
],
"operationId": "contactList",
"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",
"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": [
{
"userApiKey": [
]
}
],
"parameters": [
{
"$ref": "#/components/parameters/account_id"
@@ -2706,6 +2755,13 @@
"operationId": "contactCreate",
"description": "Create a new Contact",
"summary": "Create Contact",
"security": [
{
"userApiKey": [
]
}
],
"parameters": [
{
"$ref": "#/components/parameters/account_id"
@@ -2716,7 +2772,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/contact_create"
"$ref": "#/components/schemas/contact_create_payload"
}
}
}
@@ -2766,6 +2822,13 @@
],
"operationId": "contactDetails",
"summary": "Show Contact",
"security": [
{
"userApiKey": [
]
}
],
"description": "Get a contact belonging to the account using ID",
"responses": {
"200": {
@@ -2806,13 +2869,20 @@
],
"operationId": "contactUpdate",
"summary": "Update Contact",
"security": [
{
"userApiKey": [
]
}
],
"description": "Update a contact belonging to the account using ID",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/contact_update"
"$ref": "#/components/schemas/contact_update_payload"
}
}
}
@@ -2856,6 +2926,13 @@
],
"operationId": "contactDelete",
"summary": "Delete Contact",
"security": [
{
"userApiKey": [
]
}
],
"description": "Delete a contact belonging to the account using ID",
"responses": {
"200": {
@@ -2917,6 +2994,13 @@
"description": "ID of the contact"
}
],
"security": [
{
"userApiKey": [
]
}
],
"responses": {
"200": {
"description": "Success",
@@ -2959,6 +3043,13 @@
"operationId": "contactSearch",
"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": [
{
"userApiKey": [
]
}
],
"parameters": [
{
"$ref": "#/components/parameters/account_id"
@@ -3008,11 +3099,6 @@
}
},
"/api/v1/accounts/{account_id}/contacts/filter": {
"parameters": [
{
"$ref": "#/components/parameters/account_id"
}
],
"post": {
"tags": [
"Contacts"
@@ -3024,15 +3110,13 @@
{
"userApiKey": [
]
},
{
"agentBotApiKey": [
]
}
],
"parameters": [
{
"$ref": "#/components/parameters/account_id"
},
{
"name": "page",
"in": "query",
@@ -3154,6 +3238,13 @@
"required": true
}
],
"security": [
{
"userApiKey": [
]
}
],
"requestBody": {
"required": true,
"content": {
@@ -3219,6 +3310,13 @@
"operationId": "contactableInboxesGet",
"description": "Get List of contactable Inboxes",
"summary": "Get Contactable Inboxes",
"security": [
{
"userApiKey": [
]
}
],
"parameters": [
{
"$ref": "#/components/parameters/account_id"
@@ -3837,6 +3935,13 @@
"operationId": "conversationListMeta",
"description": "Get open, unassigned and all Conversation counts",
"summary": "Get Conversation Counts",
"security": [
{
"userApiKey": [
]
}
],
"parameters": [
{
"name": "status",
@@ -3943,6 +4048,13 @@
"operationId": "conversationList",
"description": "List all the conversations with pagination",
"summary": "Conversations List",
"security": [
{
"userApiKey": [
]
}
],
"parameters": [
{
"name": "assignee_type",
@@ -4212,11 +4324,6 @@
{
"userApiKey": [
]
},
{
"agentBotApiKey": [
]
}
],
@@ -4335,6 +4442,13 @@
],
"operationId": "get-details-of-a-conversation",
"summary": "Conversation Details",
"security": [
{
"userApiKey": [
]
}
],
"description": "Get all details regarding a conversation with all messages in the conversation",
"responses": {
"200": {
@@ -4629,11 +4743,6 @@
{
"userApiKey": [
]
},
{
"agentBotApiKey": [
]
}
],
@@ -4797,6 +4906,13 @@
],
"operationId": "list-all-labels-of-a-conversation",
"summary": "List Labels",
"security": [
{
"userApiKey": [
]
}
],
"description": "Lists all the labels of a conversation",
"responses": {
"200": {
@@ -4837,6 +4953,13 @@
],
"operationId": "conversation-add-labels",
"summary": "Add Labels",
"security": [
{
"userApiKey": [
]
}
],
"description": "Add labels to a conversation. Note that this API would overwrite the existing list of labels associated to the conversation.",
"requestBody": {
"required": true,
@@ -4906,6 +5029,13 @@
"operationId": "listAllInboxes",
"summary": "List all inboxes",
"description": "List all inboxes available in the current account",
"security": [
{
"userApiKey": [
]
}
],
"parameters": [
{
"$ref": "#/components/parameters/account_id"
@@ -4956,6 +5086,13 @@
],
"operationId": "GetInbox",
"summary": "Get an inbox",
"security": [
{
"userApiKey": [
]
}
],
"description": "Get an inbox available in the current account",
"parameters": [
{
@@ -5013,6 +5150,13 @@
"operationId": "inboxCreation",
"summary": "Create an inbox",
"description": "You can create more than one website inbox in each account",
"security": [
{
"userApiKey": [
]
}
],
"parameters": [
{
"$ref": "#/components/parameters/account_id"
@@ -5111,6 +5255,13 @@
],
"operationId": "updateInbox",
"summary": "Update Inbox",
"security": [
{
"userApiKey": [
]
}
],
"description": "Add avatar and disable auto assignment for an inbox",
"parameters": [
{
@@ -5221,6 +5372,13 @@
"operationId": "getInboxAgentBot",
"summary": "Show Inbox Agent Bot",
"description": "See if an agent bot is associated to the Inbox",
"security": [
{
"userApiKey": [
]
}
],
"parameters": [
{
"$ref": "#/components/parameters/account_id"
@@ -5276,6 +5434,13 @@
],
"operationId": "updateAgentBot",
"summary": "Add or remove agent bot",
"security": [
{
"userApiKey": [
]
}
],
"description": "To add an agent bot pass agent_bot id, to remove agent bot from an inbox pass null",
"parameters": [
{
@@ -5678,6 +5843,13 @@
],
"operationId": "list-all-messages",
"summary": "Get messages",
"security": [
{
"userApiKey": [
]
}
],
"description": "List all messages of a conversation",
"responses": {
"200": {
@@ -5747,7 +5919,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/conversation_message_create"
"$ref": "#/components/schemas/conversation_message_create_payload"
}
}
}
@@ -5811,6 +5983,13 @@
],
"operationId": "delete-a-message",
"summary": "Delete a message",
"security": [
{
"userApiKey": [
]
}
],
"description": "Delete a message and it's attachments from the conversation.",
"responses": {
"200": {
@@ -5851,6 +6030,13 @@
],
"operationId": "get-details-of-all-integrations",
"summary": "List all the Integrations",
"security": [
{
"userApiKey": [
]
}
],
"description": "Get the details of all Integrations available for the account",
"responses": {
"200": {
@@ -5898,6 +6084,13 @@
"operationId": "create-an-integration-hook",
"summary": "Create an integration hook",
"description": "Create an integration hook",
"security": [
{
"userApiKey": [
]
}
],
"parameters": [
{
"$ref": "#/components/parameters/account_id"
@@ -5945,6 +6138,13 @@
"operationId": "update-an-integrations-hook",
"summary": "Update an Integration Hook",
"description": "Update an Integration Hook",
"security": [
{
"userApiKey": [
]
}
],
"parameters": [
{
"$ref": "#/components/parameters/account_id"
@@ -5993,6 +6193,13 @@
"operationId": "delete-an-integration-hook",
"summary": "Delete an Integration Hook",
"description": "Delete an Integration Hook",
"security": [
{
"userApiKey": [
]
}
],
"parameters": [
{
"$ref": "#/components/parameters/account_id"
@@ -6036,6 +6243,13 @@
"operationId": "fetchProfile",
"summary": "Fetch user profile",
"description": "Get the user profile details",
"security": [
{
"userApiKey": [
]
}
],
"responses": {
"200": {
"description": "Success",
@@ -6072,6 +6286,13 @@
],
"operationId": "list-all-teams",
"summary": "List all teams",
"security": [
{
"userApiKey": [
]
}
],
"description": "List all teams available in the current account",
"responses": {
"200": {
@@ -6106,6 +6327,13 @@
],
"operationId": "create-a-team",
"summary": "Create a team",
"security": [
{
"userApiKey": [
]
}
],
"description": "Create a team in the account",
"parameters": [
{
@@ -6161,6 +6389,13 @@
],
"operationId": "get-details-of-a-single-team",
"summary": "Get a team details",
"security": [
{
"userApiKey": [
]
}
],
"description": "Get the details of a team in the account",
"responses": {
"200": {
@@ -6201,6 +6436,13 @@
],
"operationId": "update-a-team",
"summary": "Update a team",
"security": [
{
"userApiKey": [
]
}
],
"description": "Update a team's attributes",
"requestBody": {
"required": true,
@@ -6241,6 +6483,13 @@
],
"operationId": "delete-a-team",
"summary": "Delete a team",
"security": [
{
"userApiKey": [
]
}
],
"description": "Delete a team from the account",
"responses": {
"200": {
@@ -6603,6 +6852,13 @@
"operationId": "list-all-filters",
"summary": "List all custom filters",
"description": "List all custom filters in a category of a user",
"security": [
{
"userApiKey": [
]
}
],
"responses": {
"200": {
"description": "Success",
@@ -6642,6 +6898,13 @@
"$ref": "#/components/parameters/account_id"
}
],
"security": [
{
"userApiKey": [
]
}
],
"requestBody": {
"required": true,
"content": {
@@ -6692,6 +6955,13 @@
"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": [
{
"userApiKey": [
]
}
],
"responses": {
"200": {
"description": "Success",
@@ -6731,6 +7001,13 @@
],
"operationId": "update-a-custom-filter",
"summary": "Update a custom filter",
"security": [
{
"userApiKey": [
]
}
],
"description": "Update a custom filter's attributes",
"requestBody": {
"required": true,
@@ -6771,6 +7048,13 @@
],
"operationId": "delete-a-custom-filter",
"summary": "Delete a custom filter",
"security": [
{
"userApiKey": [
]
}
],
"description": "Delete a custom filter from the account",
"responses": {
"200": {
@@ -6811,6 +7095,13 @@
],
"operationId": "list-all-webhooks",
"summary": "List all webhooks",
"security": [
{
"userApiKey": [
]
}
],
"description": "List all webhooks in the account",
"responses": {
"200": {
@@ -6845,6 +7136,13 @@
],
"operationId": "create-a-webhook",
"summary": "Add a webhook",
"security": [
{
"userApiKey": [
]
}
],
"description": "Add a webhook subscription to the account",
"parameters": [
{
@@ -6900,6 +7198,13 @@
],
"operationId": "update-a-webhook",
"summary": "Update a webhook object",
"security": [
{
"userApiKey": [
]
}
],
"description": "Update a webhook object in the account",
"parameters": [
{
@@ -6945,6 +7250,13 @@
],
"operationId": "delete-a-webhook",
"summary": "Delete a webhook",
"security": [
{
"userApiKey": [
]
}
],
"description": "Delete a webhook from the account",
"responses": {
"200": {
@@ -7015,6 +7327,13 @@
],
"operationId": "list-all-conversation-statistics",
"summary": "Get Account reports",
"security": [
{
"userApiKey": [
]
}
],
"description": "Get Account reports for a specific type, metric and date range",
"responses": {
"200": {
@@ -7101,6 +7420,13 @@
],
"operationId": "list-all-conversation-statistics-summary",
"summary": "Get Account reports summary",
"security": [
{
"userApiKey": [
]
}
],
"description": "Get Account reports summary for a specific type and date range",
"responses": {
"200": {
@@ -7160,6 +7486,13 @@
],
"operationId": "get-account-conversation-metrics",
"summary": "Account Conversation Metrics",
"security": [
{
"userApiKey": [
]
}
],
"description": "Get conversation metrics for Account",
"responses": {
"200": {
@@ -7239,6 +7572,13 @@
],
"operationId": "get-agent-conversation-metrics",
"summary": "Agent Conversation Metrics",
"security": [
{
"userApiKey": [
]
}
],
"description": "Get conversation metrics for Agent",
"responses": {
"200": {
@@ -8042,6 +8382,27 @@
}
}
},
"account_user": {
"type": "array",
"description": "Array of account users",
"items": {
"type": "object",
"properties": {
"account_id": {
"type": "integer",
"description": "The ID of the account"
},
"user_id": {
"type": "integer",
"description": "The ID of the user"
},
"role": {
"type": "string",
"description": "whether user is an administrator or agent"
}
}
}
},
"platform_account": {
"type": "object",
"properties": {
@@ -8321,7 +8682,61 @@
"properties": {
"name": {
"type": "string",
"description": "Name of the account"
"description": "Name of the account",
"example": "My Account"
},
"locale": {
"type": "string",
"description": "The locale of the account",
"example": "en"
},
"domain": {
"type": "string",
"description": "The domain of the account",
"example": "example.com"
},
"support_email": {
"type": "string",
"description": "The support email of the account",
"example": "support@example.com"
},
"status": {
"type": "string",
"enum": [
"active",
"suspended"
],
"description": "The status of the account",
"example": "active"
},
"limits": {
"type": "object",
"description": "The limits of the account",
"example": {
}
},
"custom_attributes": {
"type": "object",
"description": "The custom attributes of the account",
"example": {
}
}
}
},
"account_user_create_update_payload": {
"type": "object",
"required": [
"user_id",
"role"
],
"properties": {
"user_id": {
"type": "integer",
"description": "The ID of the user"
},
"role": {
"type": "string",
"description": "whether user is an administrator or agent"
}
}
},
@@ -8408,7 +8823,7 @@
}
}
},
"contact_create": {
"contact_create_payload": {
"type": "object",
"required": [
"inbox_id"
@@ -8448,7 +8863,7 @@
}
}
},
"contact_update": {
"contact_update_payload": {
"type": "object",
"properties": {
"name": {
@@ -8482,7 +8897,7 @@
}
}
},
"conversation_message_create": {
"conversation_message_create_payload": {
"type": "object",
"required": [
"content"