> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.alsona.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.alsona.com/_mcp/server.

# Delete thread

DELETE https://alsona.com/rest/accounts/{account_id}/seats/{seat_id}/inbox/email/threads/{thread_id}

Delete a thread by ID.

Reference: https://api.alsona.com/api-reference/inbox/email/threads/delete-thread

## Authentication

- `X-API-KEY` header (required) — API Key authentication via header

## Request

### Path parameters

- `account_id` (string, required)
- `seat_id` (string, required)
- `thread_id` (string, required)

## Response

### 200

Successful response

- `success` (boolean, required)
- `thread` (EmailThread, optional)

## Types

### EmailThread

- `seat_id` (string, optional)
- `thread_id` (string, optional)
- `account_id` (string, optional)
- `campaign_id` (string, optional)
- `campaign_profile_id` (string, optional)
- `email` (string, optional)
- `email_from` (string, optional)
- `email_to` (string, optional)
- `sender` (string, optional)
- `first_name` (string, optional)
- `last_name` (string, optional)
- `job_title` (string, optional)
- `agent_outreach_mode` (enum, optional)
  - Allowed values: `auto`, `manual`
- `labels` (list of any, optional)
- `sentiment` (enum, optional)
  - Allowed values: `positive`, `neutral`, `negative`
- `sentiment_updated_at` (double, optional)
- `sentiment_by_campaign` (EmailThreadSentimentByCampaign, optional)
- `archived` (boolean, optional)
- `read` (boolean, optional)
- `bounced_at` (double, optional)
- `last_message_at` (double, optional)
- `created_at` (double, optional)
- `updated_at` (double, optional)

### EmailThreadSentimentByCampaign

## Examples

**Response**

```json
{
  "success": true,
  "thread": {
    "seat_id": "SEATXXXXXXXXXXXXXXXXXXXX",
    "thread_id": "XXXXXXXXXXXXXXXX",
    "account_id": "ACCOXXXXXXXXXXXXXXXXXXXX",
    "campaign_id": "CAMPXXXXXXXXXXXXXXXXXXXX",
    "campaign_profile_id": "ACoAAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "email_from": "jane@example.com",
    "email_to": "you@yourcompany.com",
    "first_name": "Jane",
    "last_name": "Doe",
    "read": true,
    "last_message_at": 1765307394000,
    "created_at": 1765310871912,
    "updated_at": 1765310871912
  }
}
```

**SDK Code**

```python Response
import requests

url = "https://alsona.com/rest/accounts/account_id/seats/seat_id/inbox/email/threads/thread_id"

headers = {"X-API-KEY": "<apiKey>"}

response = requests.delete(url, headers=headers)

print(response.json())
```

```javascript Response
const url = 'https://alsona.com/rest/accounts/account_id/seats/seat_id/inbox/email/threads/thread_id';
const options = {method: 'DELETE', headers: {'X-API-KEY': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Response
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://alsona.com/rest/accounts/account_id/seats/seat_id/inbox/email/threads/thread_id"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("X-API-KEY", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Response
require 'uri'
require 'net/http'

url = URI("https://alsona.com/rest/accounts/account_id/seats/seat_id/inbox/email/threads/thread_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["X-API-KEY"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://alsona.com/rest/accounts/account_id/seats/seat_id/inbox/email/threads/thread_id")
  .header("X-API-KEY", "<apiKey>")
  .asString();
```

```php Response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://alsona.com/rest/accounts/account_id/seats/seat_id/inbox/email/threads/thread_id', [
  'headers' => [
    'X-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Response
using RestSharp;

var client = new RestClient("https://alsona.com/rest/accounts/account_id/seats/seat_id/inbox/email/threads/thread_id");
var request = new RestRequest(Method.DELETE);
request.AddHeader("X-API-KEY", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Response
import Foundation

let headers = ["X-API-KEY": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://alsona.com/rest/accounts/account_id/seats/seat_id/inbox/email/threads/thread_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```