From 470d51c91381b9d0e2ebd90c004a7cc50503539f Mon Sep 17 00:00:00 2001 From: Daniel Jimenez Date: Fri, 9 May 2025 14:39:40 +1200 Subject: [PATCH] fix: Security definitions for endpoints --- swagger/definitions/index.yml | 39 +- .../account_user/create_update_payload.yml | 11 + .../{create.yml => create_payload.yml} | 0 .../{update.yml => update_payload.yml} | 1 - ...message.yml => create_message_payload.yml} | 0 .../public/contact/create_update_payload.yml | 3 +- .../webhooks/create_update_payload.yml | 17 +- swagger/definitions/resource/account_user.yml | 14 + .../paths/application/agent_bots/create.yml | 2 + .../paths/application/agent_bots/delete.yml | 2 + .../paths/application/agent_bots/index.yml | 2 + swagger/paths/application/agent_bots/show.yml | 2 + .../paths/application/agent_bots/update.yml | 2 + .../application/contact_inboxes/create.yml | 2 + .../application/contactable_inboxes/get.yml | 2 + .../application/contacts/conversations.yml | 2 + swagger/paths/application/contacts/crud.yml | 8 +- swagger/paths/application/contacts/filter.yml | 124 ++-- .../application/contacts/labels/create.yml | 2 + .../application/contacts/labels/index.yml | 2 + .../application/contacts/list_create.yml | 8 +- swagger/paths/application/contacts/search.yml | 2 + .../conversation/custom_attributes.yml | 1 - .../paths/application/conversation/filter.yml | 1 - .../paths/application/conversation/index.yml | 2 + .../conversation/labels/create.yml | 2 + .../application/conversation/labels/index.yml | 2 + .../conversation/messages/create.yml | 2 +- .../messages/create_attachment.yml | 1 - .../conversation/messages/delete.yml | 2 + .../conversation/messages/index.yml | 2 + .../paths/application/conversation/meta.yml | 2 + .../paths/application/conversation/show.yml | 2 + .../conversation/update_last_seen.yml | 2 + .../application/custom_attributes/show.yml | 2 + .../application/custom_filters/create.yml | 2 + .../application/custom_filters/delete.yml | 2 + .../application/custom_filters/index.yml | 2 + .../paths/application/custom_filters/show.yml | 2 + .../application/custom_filters/update.yml | 2 + swagger/paths/application/inboxes/create.yml | 2 + .../application/inboxes/get_agent_bot.yml | 2 + swagger/paths/application/inboxes/index.yml | 2 + .../application/inboxes/set_agent_bot.yml | 2 + swagger/paths/application/inboxes/show.yml | 2 + swagger/paths/application/inboxes/update.yml | 2 + .../application/integrations/apps/show.yml | 2 + .../application/integrations/hooks/create.yml | 2 + .../application/integrations/hooks/delete.yml | 2 + .../application/integrations/hooks/update.yml | 2 + .../reports/conversation/account.yml | 2 + .../reports/conversation/agent.yml | 2 + swagger/paths/application/reports/index.yml | 2 + swagger/paths/application/reports/summary.yml | 2 + swagger/paths/application/teams/create.yml | 2 + swagger/paths/application/teams/delete.yml | 2 + swagger/paths/application/teams/index.yml | 2 + swagger/paths/application/teams/show.yml | 2 + swagger/paths/application/teams/update.yml | 2 + swagger/paths/application/webhooks/create.yml | 2 + swagger/paths/application/webhooks/delete.yml | 2 + swagger/paths/application/webhooks/index.yml | 2 + swagger/paths/application/webhooks/update.yml | 2 + swagger/paths/index.yml | 7 +- .../paths/platform/account_users/create.yml | 13 +- .../paths/platform/account_users/index.yml | 16 +- swagger/paths/profile/index.yml | 2 + .../public/inboxes/conversations/index.yml | 1 + .../public/inboxes/conversations/show.yml | 1 + .../inboxes/conversations/toggle_status.yml | 1 + .../inboxes/conversations/toggle_typing.yml | 1 + .../conversations/update_last_seen.yml | 1 + .../paths/public/inboxes/messages/index.yml | 1 + swagger/swagger.json | 539 ++++++++++++++++-- 74 files changed, 718 insertions(+), 191 deletions(-) create mode 100644 swagger/definitions/request/account_user/create_update_payload.yml rename swagger/definitions/request/contact/{create.yml => create_payload.yml} (100%) rename swagger/definitions/request/contact/{update.yml => update_payload.yml} (99%) rename swagger/definitions/request/conversation/{create_message.yml => create_message_payload.yml} (100%) create mode 100644 swagger/definitions/resource/account_user.yml diff --git a/swagger/definitions/index.yml b/swagger/definitions/index.yml index c4d3eddeb..97d7d69ce 100644 --- a/swagger/definitions/index.yml +++ b/swagger/definitions/index.yml @@ -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: diff --git a/swagger/definitions/request/account_user/create_update_payload.yml b/swagger/definitions/request/account_user/create_update_payload.yml new file mode 100644 index 000000000..5d9407b6f --- /dev/null +++ b/swagger/definitions/request/account_user/create_update_payload.yml @@ -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 diff --git a/swagger/definitions/request/contact/create.yml b/swagger/definitions/request/contact/create_payload.yml similarity index 100% rename from swagger/definitions/request/contact/create.yml rename to swagger/definitions/request/contact/create_payload.yml diff --git a/swagger/definitions/request/contact/update.yml b/swagger/definitions/request/contact/update_payload.yml similarity index 99% rename from swagger/definitions/request/contact/update.yml rename to swagger/definitions/request/contact/update_payload.yml index 4a12672a3..cd37b98b0 100644 --- a/swagger/definitions/request/contact/update.yml +++ b/swagger/definitions/request/contact/update_payload.yml @@ -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} - diff --git a/swagger/definitions/request/conversation/create_message.yml b/swagger/definitions/request/conversation/create_message_payload.yml similarity index 100% rename from swagger/definitions/request/conversation/create_message.yml rename to swagger/definitions/request/conversation/create_message_payload.yml diff --git a/swagger/definitions/request/public/contact/create_update_payload.yml b/swagger/definitions/request/public/contact/create_update_payload.yml index 48c6e4550..951f795ac 100644 --- a/swagger/definitions/request/public/contact/create_update_payload.yml +++ b/swagger/definitions/request/public/contact/create_update_payload.yml @@ -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 \ No newline at end of file + description: Custom attributes of the customer diff --git a/swagger/definitions/request/webhooks/create_update_payload.yml b/swagger/definitions/request/webhooks/create_update_payload.yml index 417843fe6..17cbe158a 100644 --- a/swagger/definitions/request/webhooks/create_update_payload.yml +++ b/swagger/definitions/request/webhooks/create_update_payload.yml @@ -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. diff --git a/swagger/definitions/resource/account_user.yml b/swagger/definitions/resource/account_user.yml new file mode 100644 index 000000000..cfc530383 --- /dev/null +++ b/swagger/definitions/resource/account_user.yml @@ -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 diff --git a/swagger/paths/application/agent_bots/create.yml b/swagger/paths/application/agent_bots/create.yml index 849c4e45c..bc97acb32 100644 --- a/swagger/paths/application/agent_bots/create.yml +++ b/swagger/paths/application/agent_bots/create.yml @@ -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: diff --git a/swagger/paths/application/agent_bots/delete.yml b/swagger/paths/application/agent_bots/delete.yml index 6c83548f1..84dcc6f55 100644 --- a/swagger/paths/application/agent_bots/delete.yml +++ b/swagger/paths/application/agent_bots/delete.yml @@ -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 diff --git a/swagger/paths/application/agent_bots/index.yml b/swagger/paths/application/agent_bots/index.yml index ec940d317..20b0bab82 100644 --- a/swagger/paths/application/agent_bots/index.yml +++ b/swagger/paths/application/agent_bots/index.yml @@ -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 diff --git a/swagger/paths/application/agent_bots/show.yml b/swagger/paths/application/agent_bots/show.yml index 8dd35c2c9..061908c2c 100644 --- a/swagger/paths/application/agent_bots/show.yml +++ b/swagger/paths/application/agent_bots/show.yml @@ -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 diff --git a/swagger/paths/application/agent_bots/update.yml b/swagger/paths/application/agent_bots/update.yml index 7db862830..0f988cb18 100644 --- a/swagger/paths/application/agent_bots/update.yml +++ b/swagger/paths/application/agent_bots/update.yml @@ -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: diff --git a/swagger/paths/application/contact_inboxes/create.yml b/swagger/paths/application/contact_inboxes/create.yml index 4758ee1a7..dc39f3366 100644 --- a/swagger/paths/application/contact_inboxes/create.yml +++ b/swagger/paths/application/contact_inboxes/create.yml @@ -12,6 +12,8 @@ post: type: number description: ID of the contact required: true + security: + - userApiKey: [] requestBody: required: true content: diff --git a/swagger/paths/application/contactable_inboxes/get.yml b/swagger/paths/application/contactable_inboxes/get.yml index 7c73c94a7..3f56f6939 100644 --- a/swagger/paths/application/contactable_inboxes/get.yml +++ b/swagger/paths/application/contactable_inboxes/get.yml @@ -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 diff --git a/swagger/paths/application/contacts/conversations.yml b/swagger/paths/application/contacts/conversations.yml index 8a97a99d2..e6c586298 100644 --- a/swagger/paths/application/contacts/conversations.yml +++ b/swagger/paths/application/contacts/conversations.yml @@ -20,6 +20,8 @@ get: schema: type: number description: ID of the contact + security: + - userApiKey: [] responses: '200': description: Success diff --git a/swagger/paths/application/contacts/crud.yml b/swagger/paths/application/contacts/crud.yml index 1f0da1031..9f76e4ba4 100644 --- a/swagger/paths/application/contacts/crud.yml +++ b/swagger/paths/application/contacts/crud.yml @@ -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': diff --git a/swagger/paths/application/contacts/filter.yml b/swagger/paths/application/contacts/filter.yml index 839d3b275..58b297d81 100644 --- a/swagger/paths/application/contacts/filter.yml +++ b/swagger/paths/application/contacts/filter.yml @@ -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' diff --git a/swagger/paths/application/contacts/labels/create.yml b/swagger/paths/application/contacts/labels/create.yml index 5cf4dc22f..8741c7ea7 100644 --- a/swagger/paths/application/contacts/labels/create.yml +++ b/swagger/paths/application/contacts/labels/create.yml @@ -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: diff --git a/swagger/paths/application/contacts/labels/index.yml b/swagger/paths/application/contacts/labels/index.yml index 529634c19..ddc4ee5c7 100644 --- a/swagger/paths/application/contacts/labels/index.yml +++ b/swagger/paths/application/contacts/labels/index.yml @@ -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 diff --git a/swagger/paths/application/contacts/list_create.yml b/swagger/paths/application/contacts/list_create.yml index 4a734d0ce..505fd8200 100644 --- a/swagger/paths/application/contacts/list_create.yml +++ b/swagger/paths/application/contacts/list_create.yml @@ -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 diff --git a/swagger/paths/application/contacts/search.yml b/swagger/paths/application/contacts/search.yml index 3487c1f5b..c44406e6c 100644 --- a/swagger/paths/application/contacts/search.yml +++ b/swagger/paths/application/contacts/search.yml @@ -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 diff --git a/swagger/paths/application/conversation/custom_attributes.yml b/swagger/paths/application/conversation/custom_attributes.yml index fbfe16db9..6e5786742 100644 --- a/swagger/paths/application/conversation/custom_attributes.yml +++ b/swagger/paths/application/conversation/custom_attributes.yml @@ -5,7 +5,6 @@ summary: Update Custom Attributes description: Updates the custom attributes of a conversation security: - userApiKey: [] - - agentBotApiKey: [] requestBody: required: true content: diff --git a/swagger/paths/application/conversation/filter.yml b/swagger/paths/application/conversation/filter.yml index dcd0a6bf7..fed44ec6f 100644 --- a/swagger/paths/application/conversation/filter.yml +++ b/swagger/paths/application/conversation/filter.yml @@ -5,7 +5,6 @@ description: Filter conversations with custom filter options and pagination summary: Conversations Filter security: - userApiKey: [] - - agentBotApiKey: [] parameters: - name: page in: query diff --git a/swagger/paths/application/conversation/index.yml b/swagger/paths/application/conversation/index.yml index e36040203..9144d0070 100644 --- a/swagger/paths/application/conversation/index.yml +++ b/swagger/paths/application/conversation/index.yml @@ -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 diff --git a/swagger/paths/application/conversation/labels/create.yml b/swagger/paths/application/conversation/labels/create.yml index 2f3a49fee..461bd3eac 100644 --- a/swagger/paths/application/conversation/labels/create.yml +++ b/swagger/paths/application/conversation/labels/create.yml @@ -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 diff --git a/swagger/paths/application/conversation/labels/index.yml b/swagger/paths/application/conversation/labels/index.yml index 95d47cf4a..518910cc6 100644 --- a/swagger/paths/application/conversation/labels/index.yml +++ b/swagger/paths/application/conversation/labels/index.yml @@ -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': diff --git a/swagger/paths/application/conversation/messages/create.yml b/swagger/paths/application/conversation/messages/create.yml index 0c98705a6..f8cd35f3c 100644 --- a/swagger/paths/application/conversation/messages/create.yml +++ b/swagger/paths/application/conversation/messages/create.yml @@ -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 diff --git a/swagger/paths/application/conversation/messages/create_attachment.yml b/swagger/paths/application/conversation/messages/create_attachment.yml index 6030ce6db..63acd0aa5 100644 --- a/swagger/paths/application/conversation/messages/create_attachment.yml +++ b/swagger/paths/application/conversation/messages/create_attachment.yml @@ -6,7 +6,6 @@ post: description: Create an attachment message. security: - userApiKey: [] - - agentBotApiKey: [] parameters: - $ref: '#/components/parameters/account_id' - $ref: '#/components/parameters/conversation_id' diff --git a/swagger/paths/application/conversation/messages/delete.yml b/swagger/paths/application/conversation/messages/delete.yml index 5019f86a1..73b1e495b 100644 --- a/swagger/paths/application/conversation/messages/delete.yml +++ b/swagger/paths/application/conversation/messages/delete.yml @@ -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': diff --git a/swagger/paths/application/conversation/messages/index.yml b/swagger/paths/application/conversation/messages/index.yml index 8468c63dc..fc6882b33 100644 --- a/swagger/paths/application/conversation/messages/index.yml +++ b/swagger/paths/application/conversation/messages/index.yml @@ -2,6 +2,8 @@ tags: - Messages operationId: list-all-messages summary: Get messages +security: + - userApiKey: [] description: List all messages of a conversation responses: '200': diff --git a/swagger/paths/application/conversation/meta.yml b/swagger/paths/application/conversation/meta.yml index d67591f42..811ebbf5e 100644 --- a/swagger/paths/application/conversation/meta.yml +++ b/swagger/paths/application/conversation/meta.yml @@ -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 diff --git a/swagger/paths/application/conversation/show.yml b/swagger/paths/application/conversation/show.yml index bf56ff8cd..a57c36051 100644 --- a/swagger/paths/application/conversation/show.yml +++ b/swagger/paths/application/conversation/show.yml @@ -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': diff --git a/swagger/paths/application/conversation/update_last_seen.yml b/swagger/paths/application/conversation/update_last_seen.yml index eca5215bc..a81f6f219 100644 --- a/swagger/paths/application/conversation/update_last_seen.yml +++ b/swagger/paths/application/conversation/update_last_seen.yml @@ -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 diff --git a/swagger/paths/application/custom_attributes/show.yml b/swagger/paths/application/custom_attributes/show.yml index b5360c068..9910f7f85 100644 --- a/swagger/paths/application/custom_attributes/show.yml +++ b/swagger/paths/application/custom_attributes/show.yml @@ -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' diff --git a/swagger/paths/application/custom_filters/create.yml b/swagger/paths/application/custom_filters/create.yml index 66f21dad8..5b7a6ca80 100644 --- a/swagger/paths/application/custom_filters/create.yml +++ b/swagger/paths/application/custom_filters/create.yml @@ -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: diff --git a/swagger/paths/application/custom_filters/delete.yml b/swagger/paths/application/custom_filters/delete.yml index 180a38c94..5553bbeae 100644 --- a/swagger/paths/application/custom_filters/delete.yml +++ b/swagger/paths/application/custom_filters/delete.yml @@ -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': diff --git a/swagger/paths/application/custom_filters/index.yml b/swagger/paths/application/custom_filters/index.yml index c515806ed..0c4f7578f 100644 --- a/swagger/paths/application/custom_filters/index.yml +++ b/swagger/paths/application/custom_filters/index.yml @@ -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 diff --git a/swagger/paths/application/custom_filters/show.yml b/swagger/paths/application/custom_filters/show.yml index 18c979772..cf298a4ad 100644 --- a/swagger/paths/application/custom_filters/show.yml +++ b/swagger/paths/application/custom_filters/show.yml @@ -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 diff --git a/swagger/paths/application/custom_filters/update.yml b/swagger/paths/application/custom_filters/update.yml index d7614f075..19db632d2 100644 --- a/swagger/paths/application/custom_filters/update.yml +++ b/swagger/paths/application/custom_filters/update.yml @@ -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 diff --git a/swagger/paths/application/inboxes/create.yml b/swagger/paths/application/inboxes/create.yml index cf3c6d5bf..f25a6d923 100644 --- a/swagger/paths/application/inboxes/create.yml +++ b/swagger/paths/application/inboxes/create.yml @@ -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: diff --git a/swagger/paths/application/inboxes/get_agent_bot.yml b/swagger/paths/application/inboxes/get_agent_bot.yml index 2e6555f90..f10d6b41f 100644 --- a/swagger/paths/application/inboxes/get_agent_bot.yml +++ b/swagger/paths/application/inboxes/get_agent_bot.yml @@ -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 diff --git a/swagger/paths/application/inboxes/index.yml b/swagger/paths/application/inboxes/index.yml index 03d1344d7..7856319ec 100644 --- a/swagger/paths/application/inboxes/index.yml +++ b/swagger/paths/application/inboxes/index.yml @@ -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: diff --git a/swagger/paths/application/inboxes/set_agent_bot.yml b/swagger/paths/application/inboxes/set_agent_bot.yml index d6670718e..8fda7b508 100644 --- a/swagger/paths/application/inboxes/set_agent_bot.yml +++ b/swagger/paths/application/inboxes/set_agent_bot.yml @@ -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' diff --git a/swagger/paths/application/inboxes/show.yml b/swagger/paths/application/inboxes/show.yml index ed325a376..5d145c56e 100644 --- a/swagger/paths/application/inboxes/show.yml +++ b/swagger/paths/application/inboxes/show.yml @@ -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' diff --git a/swagger/paths/application/inboxes/update.yml b/swagger/paths/application/inboxes/update.yml index f40902032..9e11984cd 100644 --- a/swagger/paths/application/inboxes/update.yml +++ b/swagger/paths/application/inboxes/update.yml @@ -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' diff --git a/swagger/paths/application/integrations/apps/show.yml b/swagger/paths/application/integrations/apps/show.yml index b62877300..96fab5b1b 100644 --- a/swagger/paths/application/integrations/apps/show.yml +++ b/swagger/paths/application/integrations/apps/show.yml @@ -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': diff --git a/swagger/paths/application/integrations/hooks/create.yml b/swagger/paths/application/integrations/hooks/create.yml index 994929995..11d43b140 100644 --- a/swagger/paths/application/integrations/hooks/create.yml +++ b/swagger/paths/application/integrations/hooks/create.yml @@ -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: diff --git a/swagger/paths/application/integrations/hooks/delete.yml b/swagger/paths/application/integrations/hooks/delete.yml index 381bac11d..60172b5d8 100644 --- a/swagger/paths/application/integrations/hooks/delete.yml +++ b/swagger/paths/application/integrations/hooks/delete.yml @@ -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' diff --git a/swagger/paths/application/integrations/hooks/update.yml b/swagger/paths/application/integrations/hooks/update.yml index 8345a8876..eaa80cf20 100644 --- a/swagger/paths/application/integrations/hooks/update.yml +++ b/swagger/paths/application/integrations/hooks/update.yml @@ -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' diff --git a/swagger/paths/application/reports/conversation/account.yml b/swagger/paths/application/reports/conversation/account.yml index 197db0ffe..d0fa9a3c3 100644 --- a/swagger/paths/application/reports/conversation/account.yml +++ b/swagger/paths/application/reports/conversation/account.yml @@ -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': diff --git a/swagger/paths/application/reports/conversation/agent.yml b/swagger/paths/application/reports/conversation/agent.yml index c69940de9..3cbf48403 100644 --- a/swagger/paths/application/reports/conversation/agent.yml +++ b/swagger/paths/application/reports/conversation/agent.yml @@ -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': diff --git a/swagger/paths/application/reports/index.yml b/swagger/paths/application/reports/index.yml index 1e50317c1..73aca86ea 100644 --- a/swagger/paths/application/reports/index.yml +++ b/swagger/paths/application/reports/index.yml @@ -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': diff --git a/swagger/paths/application/reports/summary.yml b/swagger/paths/application/reports/summary.yml index dda671bf7..20497cc52 100644 --- a/swagger/paths/application/reports/summary.yml +++ b/swagger/paths/application/reports/summary.yml @@ -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': diff --git a/swagger/paths/application/teams/create.yml b/swagger/paths/application/teams/create.yml index aa7924d50..b96068b11 100644 --- a/swagger/paths/application/teams/create.yml +++ b/swagger/paths/application/teams/create.yml @@ -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' diff --git a/swagger/paths/application/teams/delete.yml b/swagger/paths/application/teams/delete.yml index 03fcf2622..eae30ecba 100644 --- a/swagger/paths/application/teams/delete.yml +++ b/swagger/paths/application/teams/delete.yml @@ -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': diff --git a/swagger/paths/application/teams/index.yml b/swagger/paths/application/teams/index.yml index 915dbe3bc..85ac0ff8f 100644 --- a/swagger/paths/application/teams/index.yml +++ b/swagger/paths/application/teams/index.yml @@ -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': diff --git a/swagger/paths/application/teams/show.yml b/swagger/paths/application/teams/show.yml index fde018aa6..15869beda 100644 --- a/swagger/paths/application/teams/show.yml +++ b/swagger/paths/application/teams/show.yml @@ -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': diff --git a/swagger/paths/application/teams/update.yml b/swagger/paths/application/teams/update.yml index 90ecb5f67..5b620e888 100644 --- a/swagger/paths/application/teams/update.yml +++ b/swagger/paths/application/teams/update.yml @@ -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 diff --git a/swagger/paths/application/webhooks/create.yml b/swagger/paths/application/webhooks/create.yml index a10a9cf67..81d7bbf1a 100644 --- a/swagger/paths/application/webhooks/create.yml +++ b/swagger/paths/application/webhooks/create.yml @@ -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' diff --git a/swagger/paths/application/webhooks/delete.yml b/swagger/paths/application/webhooks/delete.yml index c508acb9b..07cfdbaf8 100644 --- a/swagger/paths/application/webhooks/delete.yml +++ b/swagger/paths/application/webhooks/delete.yml @@ -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': diff --git a/swagger/paths/application/webhooks/index.yml b/swagger/paths/application/webhooks/index.yml index d6876fac8..d385a9ad1 100644 --- a/swagger/paths/application/webhooks/index.yml +++ b/swagger/paths/application/webhooks/index.yml @@ -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': diff --git a/swagger/paths/application/webhooks/update.yml b/swagger/paths/application/webhooks/update.yml index fc3e3e94e..5e6a36782 100644 --- a/swagger/paths/application/webhooks/update.yml +++ b/swagger/paths/application/webhooks/update.yml @@ -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' diff --git a/swagger/paths/index.yml b/swagger/paths/index.yml index c8dfacaf4..3a6943b48 100644 --- a/swagger/paths/index.yml +++ b/swagger/paths/index.yml @@ -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: diff --git a/swagger/paths/platform/account_users/create.yml b/swagger/paths/platform/account_users/create.yml index d53f7c289..69d7c4b98 100644 --- a/swagger/paths/platform/account_users/create.yml +++ b/swagger/paths/platform/account_users/create.yml @@ -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 diff --git a/swagger/paths/platform/account_users/index.yml b/swagger/paths/platform/account_users/index.yml index 04b773c3c..dfcdded99 100644 --- a/swagger/paths/platform/account_users/index.yml +++ b/swagger/paths/platform/account_users/index.yml @@ -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: diff --git a/swagger/paths/profile/index.yml b/swagger/paths/profile/index.yml index e825b4956..17eda92d0 100644 --- a/swagger/paths/profile/index.yml +++ b/swagger/paths/profile/index.yml @@ -4,6 +4,8 @@ get: operationId: fetchProfile summary: Fetch user profile description: Get the user profile details + security: + - userApiKey: [] responses: '200': description: Success diff --git a/swagger/paths/public/inboxes/conversations/index.yml b/swagger/paths/public/inboxes/conversations/index.yml index c8e0c3648..3bfc89873 100644 --- a/swagger/paths/public/inboxes/conversations/index.yml +++ b/swagger/paths/public/inboxes/conversations/index.yml @@ -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 diff --git a/swagger/paths/public/inboxes/conversations/show.yml b/swagger/paths/public/inboxes/conversations/show.yml index 854b04063..320457c48 100644 --- a/swagger/paths/public/inboxes/conversations/show.yml +++ b/swagger/paths/public/inboxes/conversations/show.yml @@ -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 diff --git a/swagger/paths/public/inboxes/conversations/toggle_status.yml b/swagger/paths/public/inboxes/conversations/toggle_status.yml index 734c20cbe..bfbd41c70 100644 --- a/swagger/paths/public/inboxes/conversations/toggle_status.yml +++ b/swagger/paths/public/inboxes/conversations/toggle_status.yml @@ -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 diff --git a/swagger/paths/public/inboxes/conversations/toggle_typing.yml b/swagger/paths/public/inboxes/conversations/toggle_typing.yml index 784e96075..3152e844a 100644 --- a/swagger/paths/public/inboxes/conversations/toggle_typing.yml +++ b/swagger/paths/public/inboxes/conversations/toggle_typing.yml @@ -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 diff --git a/swagger/paths/public/inboxes/conversations/update_last_seen.yml b/swagger/paths/public/inboxes/conversations/update_last_seen.yml index 29ecfbe51..a3e199e73 100644 --- a/swagger/paths/public/inboxes/conversations/update_last_seen.yml +++ b/swagger/paths/public/inboxes/conversations/update_last_seen.yml @@ -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 diff --git a/swagger/paths/public/inboxes/messages/index.yml b/swagger/paths/public/inboxes/messages/index.yml index 4114855e9..68e34fed7 100644 --- a/swagger/paths/public/inboxes/messages/index.yml +++ b/swagger/paths/public/inboxes/messages/index.yml @@ -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 diff --git a/swagger/swagger.json b/swagger/swagger.json index 093abe05a..9e6c94a98 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -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"