From 8fcdfe28a17607e8e19dc4d86284a4476e03a974 Mon Sep 17 00:00:00 2001 From: Pranav Date: Fri, 9 Jan 2026 15:25:03 -0800 Subject: [PATCH] Update swagger --- swagger/paths/application/contacts/merge.yml | 10 +-- swagger/swagger.json | 90 ++++++++++++++++++++ 2 files changed, 95 insertions(+), 5 deletions(-) diff --git a/swagger/paths/application/contacts/merge.yml b/swagger/paths/application/contacts/merge.yml index b01ccea78..994fbeb1d 100644 --- a/swagger/paths/application/contacts/merge.yml +++ b/swagger/paths/application/contacts/merge.yml @@ -6,11 +6,11 @@ post: security: - userApiKey: [] description: | - Merge two contacts into one. The base contact survives and receives all data - from the mergee contact. The mergee contact is permanently deleted after the merge. + Merge two contacts into a single contact. The base contact remains and receives all + data from the mergee contact. After the merge, the mergee contact is permanently deleted. - This operation is irreversible. All conversations, labels, and custom attributes - from the mergee contact will be transferred to the base contact. + This action is irreversible. All conversations, labels, and custom attributes from the + mergee contact will be moved to the base contact. requestBody: required: true content: @@ -23,7 +23,7 @@ post: properties: base_contact_id: type: integer - description: ID of the contact that will survive the merge and receive all data + description: ID of the contact that will remain after the merge and receive all data example: 1 mergee_contact_id: type: integer diff --git a/swagger/swagger.json b/swagger/swagger.json index 8d539c259..616696bae 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -3424,6 +3424,96 @@ } } }, + "/api/v1/accounts/{account_id}/actions/contact_merge": { + "parameters": [ + { + "$ref": "#/components/parameters/account_id" + } + ], + "post": { + "post": { + "tags": [ + "Contacts" + ], + "operationId": "contactMerge", + "summary": "Merge Contacts", + "security": [ + { + "userApiKey": [] + } + ], + "description": "Merge two contacts into a single contact. The base contact remains and receives all\ndata from the mergee contact. After the merge, the mergee contact is permanently deleted.\n\nThis action is irreversible. All conversations, labels, and custom attributes from the\nmergee contact will be moved to the base contact.\n", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "base_contact_id", + "mergee_contact_id" + ], + "properties": { + "base_contact_id": { + "type": "integer", + "description": "ID of the contact that will remain after the merge and receive all data", + "example": 1 + }, + "mergee_contact_id": { + "type": "integer", + "description": "ID of the contact that will be merged into the base contact and deleted", + "example": 2 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Contacts merged successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/contact_base" + } + } + } + }, + "400": { + "description": "Bad request - invalid contact IDs or contacts cannot be merged", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bad_request_error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bad_request_error" + } + } + } + }, + "404": { + "description": "One or both contacts not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bad_request_error" + } + } + } + } + } + } + } + }, "/api/v1/accounts/{account_id}/automation_rules": { "parameters": [ {