Merge multiple threads into one
POST
/openapi/thread/merge
const url = 'https://open-api.replyco.com/openapi/thread/merge';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'}, body: '[ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ]'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://open-api.replyco.com/openapi/thread/merge \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json-patch+json' \ --data '[ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ]'Merges multiple threads into a single thread. The first thread in the list becomes the parent, and all other threads become children. All messages from child threads are preserved and linked to the parent.
Requirements:
- Minimum 2 threads required
- Maximum 10 threads per merge operation
- All threads must belong to the same company
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”List of thread IDs to merge (first ID becomes the parent)
Array<string>
Example generated
[ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"]Array<string>
Example generated
[ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"]Array<string>
Example generated
[ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"]Array<string>
Example generated
[ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"]Responses
Section titled “Responses”Threads were successfully merged
Invalid request (e.g., less than 2 IDs, more than 10 IDs)
User is not authenticated or authorized
One or more thread IDs were not found