# How to Use the Unassign Team Member from Chat API

In DoubleTick, conversations that are assigned to a team member stay with that agent until the assignment is changed or removed. There are situations where you may want to remove that assignment entirely, such as when a conversation has been resolved, when you want to make a chat available for redistribution, or when a bot flow needs to reset ownership before rerouting the customer. DoubleTick lets you do this manually or through the **Unassign Team Member from Chat API**. This article walks you through both options.

***

#### <mark style="color:$primary;">**What the Unassign Team Member from Chat API Does**</mark>

For teams that need to remove assignments programmatically, DoubleTick provides the **Unassign Team Member from Chat API**. This is useful in cases such as automatically freeing up a conversation after a bot marks it as resolved, clearing assignments as part of a bulk operation, or building unassignment logic into a workflow your team manages externally.

In simple terms, the API sends an instruction to DoubleTick saying: remove the assigned team member from this customer's chat. DoubleTick then processes the request and returns the conversation to an unassigned state.

***

#### <mark style="color:$primary;">**How to Use the Unassign Team Member from Chat API**</mark>

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

The full API reference is available at the DoubleTick documentation portal. You can access it here:

&#x20;[**Unassign Team Member from Chat API**](https://docs.doubletick.io/reference/unassign-team-member-from-chat)

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

* Enter the customer's phone number in the <mark style="color:red;">**`customerPhoneNumber`**</mark> field. This is the number of the person whose chat you want to unassign. The number must include the country code.
* Enter your WhatsApp Business Account number in the <mark style="color:red;">**`wabaNumber`**</mark> field with the country code. This tells DoubleTick which connected number the conversation belongs to.
* 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** response confirming that the team member has been unassigned from that conversation.

***

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

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

If you want the unassignment to happen automatically at a certain point in a conversation, you can add this 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 unassignment.
* 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 **Unassign Team Member**.
* 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 API and remove the team member assignment from that chat.

***

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

The **Unassign Team Member from Chat API** gives your team precise control over conversation ownership, whether you are clearing assignments one at a time, resetting ownership within a bot flow, or managing it through an external system. 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-unassign-team-member-from-chat-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.
