diff --git a/swagger/definitions/index.yml b/swagger/definitions/index.yml index db04e4677..8514a3957 100644 --- a/swagger/definitions/index.yml +++ b/swagger/definitions/index.yml @@ -110,8 +110,10 @@ conversation_message_create_payload: $ref: ./request/conversation/create_message_payload.yml # Inbox -inbox_create_update_payload: - $ref: ./request/inbox/create_update_payload.yml +inbox_create_payload: + $ref: ./request/inbox/create_payload.yml +inbox_update_payload: + $ref: ./request/inbox/update_payload.yml # Team team_create_update_payload: diff --git a/swagger/definitions/request/agent/update_payload.yml b/swagger/definitions/request/agent/update_payload.yml index e531b664c..fc8d1457d 100644 --- a/swagger/definitions/request/agent/update_payload.yml +++ b/swagger/definitions/request/agent/update_payload.yml @@ -7,10 +7,10 @@ properties: enum: ['agent', 'administrator'] description: Whether its administrator or agent example: 'agent' - availability: + availability_status: type: string enum: ['available', 'busy', 'offline'] - description: The availability setting of the agent. + description: The availability status of the agent. example: 'available' auto_offline: type: boolean diff --git a/swagger/definitions/request/automation_rule/create_update_payload.yml b/swagger/definitions/request/automation_rule/create_update_payload.yml index 20d362e48..091fa2aaa 100644 --- a/swagger/definitions/request/automation_rule/create_update_payload.yml +++ b/swagger/definitions/request/automation_rule/create_update_payload.yml @@ -36,6 +36,6 @@ properties: example: attribute_key: content filter_operator: contains - query_operator: nil + query_operator: OR values: - help diff --git a/swagger/definitions/request/contact/create_payload.yml b/swagger/definitions/request/contact/create_payload.yml index ac32de92f..7f74e501c 100644 --- a/swagger/definitions/request/contact/create_payload.yml +++ b/swagger/definitions/request/contact/create_payload.yml @@ -21,7 +21,7 @@ properties: phone_number: type: string description: phone number of the contact - example: +123456789 + example: '+123456789' avatar: type: string format: binary diff --git a/swagger/definitions/request/contact/update_payload.yml b/swagger/definitions/request/contact/update_payload.yml index e88353a1f..99bec3548 100644 --- a/swagger/definitions/request/contact/update_payload.yml +++ b/swagger/definitions/request/contact/update_payload.yml @@ -15,7 +15,7 @@ properties: phone_number: type: string description: phone number of the contact - example: +123456789 + example: '+123456789' avatar: type: string format: binary diff --git a/swagger/definitions/request/conversation/create_message_payload.yml b/swagger/definitions/request/conversation/create_message_payload.yml index 717b6c1bf..ef1a051c2 100644 --- a/swagger/definitions/request/conversation/create_message_payload.yml +++ b/swagger/definitions/request/conversation/create_message_payload.yml @@ -19,11 +19,11 @@ properties: type: string enum: ['text', 'input_email', 'cards', 'input_select', 'form', 'article'] description: Content type of the message - example: 'cards' + example: 'text' content_attributes: type: object description: Attributes based on the content type - example: { automation_rule_id: 1, in_reply_to: 1 } + example: {} campaign_id: type: integer description: The campaign id to which the message belongs diff --git a/swagger/definitions/request/inbox/create_update_payload.yml b/swagger/definitions/request/inbox/create_payload.yml similarity index 99% rename from swagger/definitions/request/inbox/create_update_payload.yml rename to swagger/definitions/request/inbox/create_payload.yml index cc21d6919..59584054c 100644 --- a/swagger/definitions/request/inbox/create_update_payload.yml +++ b/swagger/definitions/request/inbox/create_payload.yml @@ -23,7 +23,7 @@ properties: csat_survey_enabled: type: boolean description: Enable CSAT survey - example: tru + example: true enable_auto_assignment: type: boolean description: Enable Auto Assignment diff --git a/swagger/definitions/request/inbox/update_payload.yml b/swagger/definitions/request/inbox/update_payload.yml new file mode 100644 index 000000000..f625fc5b8 --- /dev/null +++ b/swagger/definitions/request/inbox/update_payload.yml @@ -0,0 +1,82 @@ +type: object +properties: + name: + type: string + description: The name of the inbox + example: 'Support' + avatar: + type: string + format: binary + description: Image file for avatar + greeting_enabled: + type: boolean + description: Enable greeting message + example: true + greeting_message: + type: string + description: Greeting message to be displayed on the widget + example: Hello, how can I help you? + enable_email_collect: + type: boolean + description: Enable email collection + example: true + csat_survey_enabled: + type: boolean + description: Enable CSAT survey + example: true + enable_auto_assignment: + type: boolean + description: Enable Auto Assignment + example: true + working_hours_enabled: + type: boolean + description: Enable working hours + example: true + out_of_office_message: + type: string + description: Out of office message to be displayed on the widget + example: We are currently out of office. Please leave a message and we will get back to you. + timezone: + type: string + description: Timezone of the inbox + example: 'America/New_York' + allow_messages_after_resolved: + type: boolean + description: Allow messages after conversation is resolved + example: true + lock_to_single_conversation: + type: boolean + description: Lock to single conversation + example: true + portal_id: + type: integer + description: Id of the help center portal to attach to the inbox + example: 1 + sender_name_type: + type: string + description: Sender name type for the inbox + enum: ['friendly', 'professional'] + example: 'friendly' + business_name: + type: string + description: Business name for the inbox + example: 'My Business' + channel: + type: object + properties: + website_url: + type: string + description: URL at which the widget will be loaded + example: 'https://example.com' + welcome_title: + type: string + description: Welcome title to be displayed on the widget + example: 'Welcome to our support' + welcome_tagline: + type: string + description: Welcome tagline to be displayed on the widget + example: 'We are here to help you' + widget_color: + type: string + description: A Hex-color string used to customize the widget + example: '#FF5733' diff --git a/swagger/definitions/request/portal/category_create_update_payload.yml b/swagger/definitions/request/portal/category_create_update_payload.yml index e935f74c7..67bb650cb 100644 --- a/swagger/definitions/request/portal/category_create_update_payload.yml +++ b/swagger/definitions/request/portal/category_create_update_payload.yml @@ -22,8 +22,8 @@ properties: example: en icon: type: string - description: The icon of the category, e.g. i-lucide-home - example: 'i-lucide-home' + description: The icon of the category as a string (emoji) + example: '📚' parent_category_id: type: integer description: To define parent category, e.g product documentation has multiple level features in sales category or in engineering category. diff --git a/swagger/definitions/request/portal/portal_create_update_payload.yml b/swagger/definitions/request/portal/portal_create_update_payload.yml index be075182d..56feadbda 100644 --- a/swagger/definitions/request/portal/portal_create_update_payload.yml +++ b/swagger/definitions/request/portal/portal_create_update_payload.yml @@ -1,9 +1,5 @@ type: object properties: - account_id: - type: integer - description: The account id of the portal - example: 1 color: type: string description: Header color for help-center in hex format diff --git a/swagger/definitions/request/public/contact/create_update_payload.yml b/swagger/definitions/request/public/contact/create_update_payload.yml index 19ad6c653..f4cacafe8 100644 --- a/swagger/definitions/request/public/contact/create_update_payload.yml +++ b/swagger/definitions/request/public/contact/create_update_payload.yml @@ -19,7 +19,7 @@ properties: phone_number: type: string description: Phone number of the contact - example: +123456789 + example: '+123456789' avatar: type: string format: binary diff --git a/swagger/index.yml b/swagger/index.yml index bbaefdbd4..f0a97f0a6 100644 --- a/swagger/index.yml +++ b/swagger/index.yml @@ -48,9 +48,6 @@ x-tagGroups: - Agents - Canned Responses - Contacts - - Contact Labels - - Conversation Assignment - - Conversation Labels - Conversations - Custom Attributes - Custom Filters diff --git a/swagger/parameters/portal_id.yml b/swagger/parameters/portal_id.yml index bb366550a..dcd1f8b32 100644 --- a/swagger/parameters/portal_id.yml +++ b/swagger/parameters/portal_id.yml @@ -1,6 +1,6 @@ in: path -name: portal_id +name: id schema: - type: integer + type: string required: true -description: The numeric ID of the portal +description: The slug identifier of the portal diff --git a/swagger/paths/application/contacts/labels.yml b/swagger/paths/application/contacts/labels.yml new file mode 100644 index 000000000..61be4a545 --- /dev/null +++ b/swagger/paths/application/contacts/labels.yml @@ -0,0 +1,79 @@ +parameters: + - $ref: '#/components/parameters/account_id' + - name: id + in: path + required: true + schema: + type: number + description: ID of the contact + +get: + tags: + - Contacts + operationId: list-all-labels-of-a-contact + summary: List Labels + description: Lists all the labels of a contact + security: + - userApiKey: [] + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/contact_labels' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/bad_request_error' + '404': + description: Contact not found + content: + application/json: + schema: + $ref: '#/components/schemas/bad_request_error' + +post: + tags: + - Contacts + 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: + application/json: + schema: + type: object + required: + - labels + properties: + labels: + type: array + description: Array of labels (comma-separated strings) + items: + type: string + example: ['support', 'billing'] + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/contact_labels' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/bad_request_error' + '404': + description: Contact not found + content: + application/json: + schema: + $ref: '#/components/schemas/bad_request_error' diff --git a/swagger/paths/application/contacts/labels/create.yml b/swagger/paths/application/contacts/labels/create.yml deleted file mode 100644 index 8741c7ea7..000000000 --- a/swagger/paths/application/contacts/labels/create.yml +++ /dev/null @@ -1,41 +0,0 @@ -tags: - - Contact Labels -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: - application/json: - schema: - type: object - required: - - labels - properties: - labels: - type: array - description: Array of labels (comma-separated strings) - items: - type: string - example: ['support', 'billing'] -responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/contact_labels' - '401': - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/bad_request_error' - '404': - description: Contact not found - content: - application/json: - schema: - $ref: '#/components/schemas/bad_request_error' diff --git a/swagger/paths/application/contacts/labels/index.yml b/swagger/paths/application/contacts/labels/index.yml deleted file mode 100644 index ddc4ee5c7..000000000 --- a/swagger/paths/application/contacts/labels/index.yml +++ /dev/null @@ -1,26 +0,0 @@ -tags: - - Contact Labels -operationId: list-all-labels-of-a-contact -summary: List Labels -description: Lists all the labels of a contact -security: - - userApiKey: [] -responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/contact_labels' - '401': - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/bad_request_error' - '404': - description: Contact not found - content: - application/json: - schema: - $ref: '#/components/schemas/bad_request_error' diff --git a/swagger/paths/application/conversation/assignments.yml b/swagger/paths/application/conversation/assignments.yml index 1ce1f484d..50fdacbf0 100644 --- a/swagger/paths/application/conversation/assignments.yml +++ b/swagger/paths/application/conversation/assignments.yml @@ -1,5 +1,5 @@ tags: - - Conversation Assignment + - Conversations operationId: assign-a-conversation summary: Assign Conversation description: Assign a conversation to an agent or a team diff --git a/swagger/paths/application/conversation/filter.yml b/swagger/paths/application/conversation/filter.yml index fed44ec6f..fdb318f6a 100644 --- a/swagger/paths/application/conversation/filter.yml +++ b/swagger/paths/application/conversation/filter.yml @@ -40,11 +40,11 @@ requestBody: enum: [AND, OR] example: - attribute_key: 'browser_language' - filter_operator: 'not_eq' + filter_operator: 'not_equal_to' values: ['en'] query_operator: 'AND' - attribute_key: 'status' - filter_operator: 'eq' + filter_operator: 'equal_to' values: ['pending'] query_operator: null diff --git a/swagger/paths/application/conversation/labels/create.yml b/swagger/paths/application/conversation/labels/create.yml index 461bd3eac..6df685ccd 100644 --- a/swagger/paths/application/conversation/labels/create.yml +++ b/swagger/paths/application/conversation/labels/create.yml @@ -1,5 +1,5 @@ tags: - - Conversation Labels + - Conversations operationId: conversation-add-labels summary: Add Labels security: diff --git a/swagger/paths/application/conversation/labels/index.yml b/swagger/paths/application/conversation/labels/index.yml index 518910cc6..5c8b3e597 100644 --- a/swagger/paths/application/conversation/labels/index.yml +++ b/swagger/paths/application/conversation/labels/index.yml @@ -1,5 +1,5 @@ tags: - - Conversation Labels + - Conversations operationId: list-all-labels-of-a-conversation summary: List Labels security: diff --git a/swagger/paths/application/inboxes/create.yml b/swagger/paths/application/inboxes/create.yml index c94039ff3..6f88b0d4a 100644 --- a/swagger/paths/application/inboxes/create.yml +++ b/swagger/paths/application/inboxes/create.yml @@ -13,7 +13,7 @@ post: content: application/json: schema: - $ref: '#/components/schemas/inbox_create_update_payload' + $ref: '#/components/schemas/inbox_create_payload' responses: '200': description: Success diff --git a/swagger/paths/application/inboxes/inbox_members/create.yml b/swagger/paths/application/inboxes/inbox_members/create.yml index 1298eda6a..1f1396bd3 100644 --- a/swagger/paths/application/inboxes/inbox_members/create.yml +++ b/swagger/paths/application/inboxes/inbox_members/create.yml @@ -24,7 +24,7 @@ requestBody: items: type: integer description: IDs of users to be added to the inbox - example: [1, 2, 3] + example: [1] responses: '200': description: Success diff --git a/swagger/paths/application/inboxes/inbox_members/update.yml b/swagger/paths/application/inboxes/inbox_members/update.yml index 49fd8bf83..18fc3f2c8 100644 --- a/swagger/paths/application/inboxes/inbox_members/update.yml +++ b/swagger/paths/application/inboxes/inbox_members/update.yml @@ -24,7 +24,7 @@ requestBody: items: type: integer description: IDs of users to be added to the inbox - example: [1, 2, 3] + example: [1] responses: '200': description: Success diff --git a/swagger/paths/application/inboxes/update.yml b/swagger/paths/application/inboxes/update.yml index 3894a1a6a..e076dd532 100644 --- a/swagger/paths/application/inboxes/update.yml +++ b/swagger/paths/application/inboxes/update.yml @@ -5,7 +5,7 @@ patch: summary: Update Inbox security: - userApiKey: [] - description: Add avatar and disable auto assignment for an inbox + description: Update an existing inbox parameters: - $ref: '#/components/parameters/account_id' - name: id @@ -19,7 +19,7 @@ patch: content: application/json: schema: - $ref: '#/components/schemas/inbox_create_update_payload' + $ref: '#/components/schemas/inbox_update_payload' responses: '200': description: Success diff --git a/swagger/paths/application/team_members/create.yml b/swagger/paths/application/team_members/create.yml index 4b649cb34..bea148f73 100644 --- a/swagger/paths/application/team_members/create.yml +++ b/swagger/paths/application/team_members/create.yml @@ -19,7 +19,7 @@ requestBody: items: type: integer description: IDs of users to be added to the team - example: [1, 2, 3] + example: [1] responses: '200': description: Success diff --git a/swagger/paths/application/team_members/update.yml b/swagger/paths/application/team_members/update.yml index c316dabc9..34a2de82f 100644 --- a/swagger/paths/application/team_members/update.yml +++ b/swagger/paths/application/team_members/update.yml @@ -19,7 +19,7 @@ requestBody: items: type: integer description: IDs of users to be added to the team - example: [1, 2, 3] + example: [1] responses: '200': description: Success diff --git a/swagger/paths/index.yml b/swagger/paths/index.yml index 3a6943b48..1753d38b3 100644 --- a/swagger/paths/index.yml +++ b/swagger/paths/index.yml @@ -151,14 +151,6 @@ - $ref: '#/components/parameters/message_id' patch: $ref: ./public/inboxes/messages/update.yml -/api/v1/accounts/{account_id}/contacts/{contact_identifier}/labels: - parameters: - - $ref: '#/components/parameters/account_id' - - $ref: '#/components/parameters/public_contact_identifier' - get: - $ref: ./application/contacts/labels/index.yml - post: - $ref: ./application/contacts/labels/create.yml # ---------------- end of public api routes-----------# @@ -256,6 +248,8 @@ $ref: ./application/contacts/crud.yml /api/v1/accounts/{account_id}/contacts/{id}/conversations: $ref: ./application/contacts/conversations.yml +/api/v1/accounts/{account_id}/contacts/{id}/labels: + $ref: ./application/contacts/labels.yml /api/v1/accounts/{account_id}/contacts/search: $ref: ./application/contacts/search.yml /api/v1/accounts/{account_id}/contacts/filter: @@ -265,6 +259,7 @@ /api/v1/accounts/{account_id}/contacts/{id}/contactable_inboxes: $ref: ./application/contactable_inboxes/get.yml + # Automation Rule /api/v1/accounts/{account_id}/automation_rules: parameters: @@ -297,11 +292,15 @@ $ref: ./application/portal/create.yml get: $ref: ./application/portal/index.yml +/api/v1/accounts/{account_id}/portals/{id}: + parameters: + - $ref: '#/components/parameters/account_id' + - $ref: '#/components/parameters/portal_id' patch: $ref: ./application/portal/update.yml # Help Center category -/api/v1/accounts/{account_id}/portals/{portal_id}/categories: +/api/v1/accounts/{account_id}/portals/{id}/categories: parameters: - $ref: '#/components/parameters/account_id' - $ref: '#/components/parameters/portal_id' @@ -309,7 +308,7 @@ $ref: ./application/category/create.yml # Help Center article -/api/v1/accounts/{account_id}/portals/{portal_id}/articles: +/api/v1/accounts/{account_id}/portals/{id}/articles: parameters: - $ref: '#/components/parameters/account_id' - $ref: '#/components/parameters/portal_id' diff --git a/swagger/swagger.json b/swagger/swagger.json index 3c6c7ade2..077b4e688 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -1515,136 +1515,6 @@ } } }, - "/api/v1/accounts/{account_id}/contacts/{contact_identifier}/labels": { - "parameters": [ - { - "$ref": "#/components/parameters/account_id" - }, - { - "$ref": "#/components/parameters/public_contact_identifier" - } - ], - "get": { - "tags": [ - "Contact Labels" - ], - "operationId": "list-all-labels-of-a-contact", - "summary": "List Labels", - "description": "Lists all the labels of a contact", - "security": [ - { - "userApiKey": [ - - ] - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/contact_labels" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/bad_request_error" - } - } - } - }, - "404": { - "description": "Contact not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/bad_request_error" - } - } - } - } - } - }, - "post": { - "tags": [ - "Contact Labels" - ], - "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": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "labels" - ], - "properties": { - "labels": { - "type": "array", - "description": "Array of labels (comma-separated strings)", - "items": { - "type": "string" - }, - "example": [ - "support", - "billing" - ] - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/contact_labels" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/bad_request_error" - } - } - } - }, - "404": { - "description": "Contact not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/bad_request_error" - } - } - } - } - } - } - }, "/survey/responses/{conversation_uuid}": { "parameters": [ { @@ -2994,6 +2864,142 @@ } } }, + "/api/v1/accounts/{account_id}/contacts/{id}/labels": { + "parameters": [ + { + "$ref": "#/components/parameters/account_id" + }, + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + }, + "description": "ID of the contact" + } + ], + "get": { + "tags": [ + "Contacts" + ], + "operationId": "list-all-labels-of-a-contact", + "summary": "List Labels", + "description": "Lists all the labels of a contact", + "security": [ + { + "userApiKey": [ + + ] + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/contact_labels" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bad_request_error" + } + } + } + }, + "404": { + "description": "Contact not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bad_request_error" + } + } + } + } + } + }, + "post": { + "tags": [ + "Contacts" + ], + "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": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "labels" + ], + "properties": { + "labels": { + "type": "array", + "description": "Array of labels (comma-separated strings)", + "items": { + "type": "string" + }, + "example": [ + "support", + "billing" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/contact_labels" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bad_request_error" + } + } + } + }, + "404": { + "description": "Contact not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bad_request_error" + } + } + } + } + } + } + }, "/api/v1/accounts/{account_id}/contacts/search": { "get": { "tags": [ @@ -3719,7 +3725,17 @@ } } } - }, + } + }, + "/api/v1/accounts/{account_id}/portals/{id}": { + "parameters": [ + { + "$ref": "#/components/parameters/account_id" + }, + { + "$ref": "#/components/parameters/portal_id" + } + ], "patch": { "tags": [ "Help Center" @@ -3768,7 +3784,7 @@ } } }, - "/api/v1/accounts/{account_id}/portals/{portal_id}/categories": { + "/api/v1/accounts/{account_id}/portals/{id}/categories": { "parameters": [ { "$ref": "#/components/parameters/account_id" @@ -3825,7 +3841,7 @@ } } }, - "/api/v1/accounts/{account_id}/portals/{portal_id}/articles": { + "/api/v1/accounts/{account_id}/portals/{id}/articles": { "parameters": [ { "$ref": "#/components/parameters/account_id" @@ -4254,7 +4270,7 @@ "example": [ { "attribute_key": "browser_language", - "filter_operator": "not_eq", + "filter_operator": "not_equal_to", "values": [ "en" ], @@ -4262,7 +4278,7 @@ }, { "attribute_key": "status", - "filter_operator": "eq", + "filter_operator": "equal_to", "values": [ "pending" ], @@ -4696,7 +4712,7 @@ ], "post": { "tags": [ - "Conversation Assignment" + "Conversations" ], "operationId": "assign-a-conversation", "summary": "Assign Conversation", @@ -4780,7 +4796,7 @@ ], "get": { "tags": [ - "Conversation Labels" + "Conversations" ], "operationId": "list-all-labels-of-a-conversation", "summary": "List Labels", @@ -4827,7 +4843,7 @@ }, "post": { "tags": [ - "Conversation Labels" + "Conversations" ], "operationId": "conversation-add-labels", "summary": "Add Labels", @@ -5045,7 +5061,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/inbox_create_update_payload" + "$ref": "#/components/schemas/inbox_create_payload" } } } @@ -5098,7 +5114,7 @@ ] } ], - "description": "Add avatar and disable auto assignment for an inbox", + "description": "Update an existing inbox", "parameters": [ { "$ref": "#/components/parameters/account_id" @@ -5118,7 +5134,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/inbox_create_update_payload" + "$ref": "#/components/schemas/inbox_update_payload" } } } @@ -5405,9 +5421,7 @@ }, "description": "IDs of users to be added to the inbox", "example": [ - 1, - 2, - 3 + 1 ] } } @@ -5499,9 +5513,7 @@ }, "description": "IDs of users to be added to the inbox", "example": [ - 1, - 2, - 3 + 1 ] } } @@ -6423,9 +6435,7 @@ }, "description": "IDs of users to be added to the team", "example": [ - 1, - 2, - 3 + 1 ] } } @@ -6511,9 +6521,7 @@ }, "description": "IDs of users to be added to the team", "example": [ - 1, - 2, - 3 + 1 ] } } @@ -8790,14 +8798,14 @@ "description": "Whether its administrator or agent", "example": "agent" }, - "availability": { + "availability_status": { "type": "string", "enum": [ "available", "busy", "offline" ], - "description": "The availability setting of the agent.", + "description": "The availability status of the agent.", "example": "available" }, "auto_offline": { @@ -8836,7 +8844,7 @@ "phone_number": { "type": "string", "description": "phone number of the contact", - "example": 123456789 + "example": "+123456789" }, "avatar": { "type": "string", @@ -8890,7 +8898,7 @@ "phone_number": { "type": "string", "description": "phone number of the contact", - "example": 123456789 + "example": "+123456789" }, "avatar": { "type": "string", @@ -9069,14 +9077,12 @@ "article" ], "description": "Content type of the message", - "example": "cards" + "example": "text" }, "content_attributes": { "type": "object", "description": "Attributes based on the content type", "example": { - "automation_rule_id": 1, - "in_reply_to": 1 } }, "campaign_id": { @@ -9114,7 +9120,7 @@ } } }, - "inbox_create_update_payload": { + "inbox_create_payload": { "type": "object", "properties": { "name": { @@ -9145,7 +9151,7 @@ "csat_survey_enabled": { "type": "boolean", "description": "Enable CSAT survey", - "example": "tru" + "example": true }, "enable_auto_assignment": { "type": "boolean", @@ -9237,6 +9243,115 @@ } } }, + "inbox_update_payload": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the inbox", + "example": "Support" + }, + "avatar": { + "type": "string", + "format": "binary", + "description": "Image file for avatar" + }, + "greeting_enabled": { + "type": "boolean", + "description": "Enable greeting message", + "example": true + }, + "greeting_message": { + "type": "string", + "description": "Greeting message to be displayed on the widget", + "example": "Hello, how can I help you?" + }, + "enable_email_collect": { + "type": "boolean", + "description": "Enable email collection", + "example": true + }, + "csat_survey_enabled": { + "type": "boolean", + "description": "Enable CSAT survey", + "example": true + }, + "enable_auto_assignment": { + "type": "boolean", + "description": "Enable Auto Assignment", + "example": true + }, + "working_hours_enabled": { + "type": "boolean", + "description": "Enable working hours", + "example": true + }, + "out_of_office_message": { + "type": "string", + "description": "Out of office message to be displayed on the widget", + "example": "We are currently out of office. Please leave a message and we will get back to you." + }, + "timezone": { + "type": "string", + "description": "Timezone of the inbox", + "example": "America/New_York" + }, + "allow_messages_after_resolved": { + "type": "boolean", + "description": "Allow messages after conversation is resolved", + "example": true + }, + "lock_to_single_conversation": { + "type": "boolean", + "description": "Lock to single conversation", + "example": true + }, + "portal_id": { + "type": "integer", + "description": "Id of the help center portal to attach to the inbox", + "example": 1 + }, + "sender_name_type": { + "type": "string", + "description": "Sender name type for the inbox", + "enum": [ + "friendly", + "professional" + ], + "example": "friendly" + }, + "business_name": { + "type": "string", + "description": "Business name for the inbox", + "example": "My Business" + }, + "channel": { + "type": "object", + "properties": { + "website_url": { + "type": "string", + "description": "URL at which the widget will be loaded", + "example": "https://example.com" + }, + "welcome_title": { + "type": "string", + "description": "Welcome title to be displayed on the widget", + "example": "Welcome to our support" + }, + "welcome_tagline": { + "type": "string", + "description": "Welcome tagline to be displayed on the widget", + "example": "We are here to help you" + }, + "widget_color": { + "type": "string", + "description": "A Hex-color string used to customize the widget", + "example": "#FF5733" + } + } + } + } + }, "team_create_update_payload": { "type": "object", "properties": { @@ -9404,7 +9519,7 @@ "example": { "attribute_key": "content", "filter_operator": "contains", - "query_operator": "nil", + "query_operator": "OR", "values": [ "help" ] @@ -9416,11 +9531,6 @@ "portal_create_update_payload": { "type": "object", "properties": { - "account_id": { - "type": "integer", - "description": "The account id of the portal", - "example": 1 - }, "color": { "type": "string", "description": "Header color for help-center in hex format", @@ -9504,8 +9614,8 @@ }, "icon": { "type": "string", - "description": "The icon of the category, e.g. i-lucide-home", - "example": "i-lucide-home" + "description": "The icon of the category as a string (emoji)", + "example": "📚" }, "parent_category_id": { "type": "integer", @@ -9611,7 +9721,7 @@ "phone_number": { "type": "string", "description": "Phone number of the contact", - "example": 123456789 + "example": "+123456789" }, "avatar": { "type": "string", @@ -10231,12 +10341,12 @@ }, "portal_id": { "in": "path", - "name": "portal_id", + "name": "id", "schema": { - "type": "integer" + "type": "string" }, "required": true, - "description": "The numeric ID of the portal" + "description": "The slug identifier of the portal" } }, "securitySchemes": { @@ -10277,9 +10387,6 @@ "Agents", "Canned Responses", "Contacts", - "Contact Labels", - "Conversation Assignment", - "Conversation Labels", "Conversations", "Custom Attributes", "Custom Filters",