# How to Use the Remove Collaborators API

Once a collaborator has been added to a conversation in DoubleTick, there may be situations where you need to remove them, such as when their involvement in the case is complete or when a handoff has taken place. While you can remove collaborators manually from within the chat, the Remove Chat Collaborators API lets you do this programmatically, making it possible to automate the process as part of a bot flow or backend workflow.

***

#### <mark style="color:$primary;">**What the Remove Collaborators API Does**</mark>

For teams that need more flexibility, DoubleTick provides a **Remove Chat Collaborators API**. This is a tool meant for technical use cases, such as automatically removing a collaborator from a conversation when a certain condition is met inside a bot, or building the action into a backend workflow your team manages.

In simple terms, the API sends an instruction to DoubleTick saying: remove this agent as a collaborator from this specific conversation. DoubleTick then processes that request and removes the collaborator accordingly.

***

#### <mark style="color:$primary;">**How to Use the Remove Collaborators API**</mark>

<figure><img src="/files/wiIj3BYrpLgMWQvk7oxh" alt=""><figcaption></figcaption></figure>

The full API reference is available at the DoubleTick documentation portal. You can access it here: <https://docs.doubletick.io/reference/public-chat-collaborators-remove>

To make the API work, you need to provide three phone numbers and one API key.

* Enter the **customer's phone number** — the number of the person whose conversation you want to remove a collaborator from. Include the country code.
* Enter your **WhatsApp API number** — the DoubleTick-connected number on which that conversation exists. Include the country code.
* Enter the **agent's phone number** — the phone number of the agent you want to remove as a collaborator. Include the country code.
* To find your **API key**, go to **Settings** inside DoubleTick, open the **Developer Documentation** section, and copy the key displayed there. Paste it into the **header field** in the API call.
* Once all values are filled in, click the **Try It** button on the documentation page to test the call.
* If the request is successful, you will see a **200 Success** response confirming that the collaborator has been removed from the conversation.

***

#### <mark style="color:$primary;">**Adding this API to a Bot or Workflow**</mark>

<figure><img src="/files/99H9Elz1siWax7fhUIoB" alt=""><figcaption></figcaption></figure>

If you want a collaborator to be removed automatically at a certain point in a conversation, you can add the Remove Chat Collaborators API as an action inside DoubleTick's **Bot Studio**.

* On the API documentation page, generate the **cURL** for your API call and copy it.
* Open the bot in **Bot Studio** where you want to add this step.
* Add a new action component and select **Call API** from the list.
* Connect this component to whichever step should trigger the collaborator removal.
* In the Call API component, click the API dropdown and select **Create New API**.
* Choose **Import from cURL**, paste the cURL you copied, and give the API a name such as **Remove Collaborator**.
* Save the API.

Once saved, the component will show all the headers and body parameters already filled in from your cURL. From this point, whenever the bot reaches that step during a live conversation, it will automatically call the Remove Chat Collaborators API and remove the specified agent from the conversation.

***

#### <mark style="color:$primary;">**Verifying the Collaborator Has Been Removed**</mark>

<figure><img src="/files/PLpAeAtS0mKyYe5Y8kQx" alt=""><figcaption></figcaption></figure>

After the API is called, you can verify that it worked by opening the relevant conversation in DoubleTick. Go to the **Chats** section, search for the customer's number, and open the conversation. The agent you removed should no longer appear as a collaborator on that chat.

***

#### <mark style="color:$primary;">**Summary**</mark>

The Remove Chat Collaborators API gives your team precise control over who is involved in a conversation at any given point, whether you are handling it as a one-time action from the documentation portal or automating it as part of a larger bot or workflow. If you run into any issues while setting this up, reach out to the **DoubleTick support team** for assistance.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.doubletick.io/developer-documentation/how-to-use-the-remove-collaborators-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
