> For the complete documentation index, see [llms.txt](https://docs.360dialog.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.360dialog.com/docs/inbox/inbox-api/managing-conversations.md).

# Managing conversations

Assign, tag and resolve chats from your own software.

Assignment, tags and resolved status are shared with the hosted Inbox. What your software sets, your team sees — and the other way round.

## Assign a chat

Assignment decides which Inbox user or group handles a chat. It only matters when more than one user works the same number — for example your team in the hosted Inbox, or a bot and a support team.

{% hint style="info" %}
If a single service user is the only thing working your Inbox, you do not need assignment. Skip to [Tag a chat](#tag-a-chat).
{% endhint %}

First look up the IDs of your [users](/docs/inbox/inbox-api/api-ref/users.md#get-api-v1-users) and [groups](/docs/inbox/inbox-api/api-ref/groups.md#get-api-v1-groups):

```bash
curl -H "Authorization: Token $SERVICE_TOKEN" $INBOX/api/v1/users/
curl -H "Authorization: Token $SERVICE_TOKEN" $INBOX/api/v1/groups/
```

Then assign:

```bash
curl -X PATCH $INBOX/api/v1/chat_assignment/$WA_ID/ \
  -H "Authorization: Token $SERVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"assigned_to_user": 12, "assigned_group": 3}'
```

Set either field to `null` to remove it. To see who a chat is assigned to, [`GET` the same URL](/docs/inbox/inbox-api/api-ref/assignment.md#get-api-v1-chat_assignment-wa_id).

Reference: [Update chat assignment](/docs/inbox/inbox-api/api-ref/assignment.md#patch-api-v1-chat_assignment-wa_id)

## Tag a chat

Tags label chats — *lead*, *complaint*, *VIP* — so they can be filtered and counted. They are typically used to track where a conversation stands, such as the stage of a sale or the status of a support case, or to mark what it is about, so your team and your software can pick out the right chats and report on them.

Create a tag once:

```bash
curl -X POST $INBOX/api/v1/tags/ \
  -H "Authorization: Token $SERVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "lead"}'
```

Reference: [Create tag](/docs/inbox/inbox-api/api-ref/tags.md#post-api-v1-tags)

Then put it on a chat, using the tag's `id`:

```bash
curl -X POST $INBOX/api/v1/chat_tagging/ \
  -H "Authorization: Token $SERVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"chat": "'"$WA_ID"'", "tag": 7}'
```

Reference: [Create chat tagging](/docs/inbox/inbox-api/api-ref/tags.md#post-api-v1-chat_tagging)

To remove it, delete the tagging. Its ID is the `tagging_id` in the chat's `tags`:

```bash
curl -X DELETE $INBOX/api/v1/chat_tagging/42/ -H "Authorization: Token $SERVICE_TOKEN"
```

Reference: [Delete chat tagging](/docs/inbox/inbox-api/api-ref/tags.md#delete-api-v1-chat_tagging-id)

To list chats with a tag, use [`GET /api/v1/chats/?chat_tag_id=7`](/docs/inbox/inbox-api/api-ref/chats.md#get-api-v1-chats).

## Resolve a chat

Mark a conversation as done:

```bash
curl -X PATCH $INBOX/api/v1/chats/$WA_ID/resolve/ \
  -H "Authorization: Token $SERVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"resolved": true}'
```

If the customer writes again, the chat can reopen on its own. Send `false` to reopen it yourself.

Reference: [Update resolved](/docs/inbox/inbox-api/api-ref/chats.md#patch-api-v1-chats-wa_id-resolve)

{% hint style="info" %}
If you use [Meta Business Agent](https://docs.360dialog.com/docs/mba), [`POST /api/v1/chats/{wa_id}/handover/`](/docs/inbox/inbox-api/api-ref/chats.md#post-api-v1-chats-wa_id-handover) gives the conversation back to it. The Inbox takes the conversation over simply by sending a message.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.360dialog.com/docs/inbox/inbox-api/managing-conversations.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
