> ## Documentation Index
> Fetch the complete documentation index at: https://docs.teli.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Unassign Thread

> Remove a user assignment from an SMS conversation thread

# Unassign Thread

Remove the user assignment from an SMS conversation thread. The thread remains completed — AI responses are **not** reactivated.

## Endpoint

```
POST /v1/threads/unassign
```

## Authentication

<ParamField header="X-API-Key" type="string" required>
  Your API key
</ParamField>

## Request Body

<ParamField body="campaign_id" type="string" required>
  The campaign ID containing the thread
</ParamField>

<ParamField body="phone_number" type="string" required>
  The contact's phone number (E.164 format recommended, e.g. `+15551234567`)
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the unassignment was successful
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable result message
</ResponseField>

<ResponseField name="thread_id" type="string">
  The thread identifier (format: `{phone_number}_{campaign_id}`)
</ResponseField>

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://partner.teli.ai/api/proxy/v1/threads/unassign" \
    -H "X-API-Key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "campaign_id": "camp_abc123",
      "phone_number": "+15551234567"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://partner.teli.ai/api/proxy/v1/threads/unassign',
    {
      method: 'POST',
      headers: {
        'X-API-Key': 'YOUR_API_KEY',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        campaign_id: 'camp_abc123',
        phone_number: '+15551234567'
      })
    }
  );
  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://partner.teli.ai/api/proxy/v1/threads/unassign',
      headers={'X-API-Key': 'YOUR_API_KEY'},
      json={
          'campaign_id': 'camp_abc123',
          'phone_number': '+15551234567'
      }
  )
  data = response.json()
  ```
</CodeGroup>

## Example Response

```json theme={null}
{
  "success": true,
  "message": "Thread unassigned",
  "thread_id": "+15551234567_camp_abc123",
  "powered_by": "Teli"
}
```

## Error Responses

```json 400 theme={null}
{
  "error": "campaign_id and phone_number are required",
  "success": false,
  "powered_by": "Teli"
}
```

```json 404 theme={null}
{
  "error": "Thread not found",
  "success": false,
  "powered_by": "Teli"
}
```

## Important Notes

* **AI does not restart** — unassigning a thread does not reactivate the AI agent or drip messages. The thread remains in a completed state.
* **Admin visibility** — once unassigned, the thread is no longer visible to non-admin users (since they only see threads assigned to them).
* **Re-assignment** — you can assign the thread to a different user by calling the [Assign Thread](/partner-api/threads/assign) endpoint again.

## Related Endpoints

* [Assign Thread](/partner-api/threads/assign) - Assign a thread to a user
* [Get Campaign Contacts](/partner-api/threads/contacts) - List contacts with assignment info
