Assign or unassign a user to/from multiple threads
const url = 'https://open-api.replyco.com/openapi/thread/assignuser';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'}, body: '{ "userId": "9b3e5f17-2c8d-4a6e-b1f9-7e4d2c6a8b53", "threadsIds": [ "7d2e9b14-5c3a-4f61-9a8e-2b6c0d4e1f37", "b2f8d4a1-6e3c-4b9f-8d7a-5a1c3e9f2b64" ] }'};
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/assignuser \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json-patch+json' \ --data '{ "userId": "9b3e5f17-2c8d-4a6e-b1f9-7e4d2c6a8b53", "threadsIds": [ "7d2e9b14-5c3a-4f61-9a8e-2b6c0d4e1f37", "b2f8d4a1-6e3c-4b9f-8d7a-5a1c3e9f2b64" ] }'Assigns a specific user to handle one or more threads, or unassigns users from threads. The user must belong to the same company as the threads. Previous assignments are overwritten.
To assign: Provide both UserId and ThreadsIds To unassign: Provide empty UserId or empty ThreadsIds
Note: Maximum 100 thread IDs per request.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Input model containing user ID and list of thread IDs
object
Threads to assign the user to. If empty, the user will be unassigned from all threads.
User to assign to the threads. If empty, the user will be unassigned from all threads.
Example
{ "userId": "9b3e5f17-2c8d-4a6e-b1f9-7e4d2c6a8b53", "threadsIds": [ "7d2e9b14-5c3a-4f61-9a8e-2b6c0d4e1f37", "b2f8d4a1-6e3c-4b9f-8d7a-5a1c3e9f2b64" ]}object
Threads to assign the user to. If empty, the user will be unassigned from all threads.
User to assign to the threads. If empty, the user will be unassigned from all threads.
Example generated
{ "threadsIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "userId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}object
Threads to assign the user to. If empty, the user will be unassigned from all threads.
User to assign to the threads. If empty, the user will be unassigned from all threads.
Example generated
{ "threadsIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "userId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}object
Threads to assign the user to. If empty, the user will be unassigned from all threads.
User to assign to the threads. If empty, the user will be unassigned from all threads.
Example generated
{ "threadsIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "userId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”User was successfully assigned or unassigned from threads
Invalid request (e.g., empty thread list, too many IDs)
User is not authenticated or authorized
User ID or one or more thread IDs were not found