> For a complete page index, fetch https://developer.close.com/llms.txt

# Get a single EmailThread activity

GET https://api.close.com/api/v1/activity/emailthread/{id}/

Reference: https://developer.close.com/api/resources/activities/email-threads/get

## Authentication

- `Authorization` header (basic auth, required) — Use your API key as the username and leave the password empty.
- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `id` (string, required)

### Query parameters

- `_fields` (string, optional) — Comma-separated list of fields to include in the response.

## Response

### 200

Successful response

- `_type` (string, required)
- `activity_at` (datetime, required, nullable)
- `contact_id` (string, required, nullable)
- `created_by` (string, required, nullable)
- `date_created` (datetime, required)
- `date_updated` (datetime, required)
- `id` (string, required)
- `latest_normalized_subject` (string, required, nullable)
- `lead_id` (string, required, nullable)
- `n_emails` (integer, required, nullable)
- `organization_id` (string, required)
- `updated_by` (string, required, nullable)
- `user_id` (string, required, nullable)
- `users` (list of string, required)
- `comment_summary` (CommentSummary, optional, nullable)
- `created_by_name` (string, optional, nullable)
- `emails` (list of EmailInThread, optional)
- `importance` (EmailThreadActivityImportance, optional)
- `latest_emails` (list of EmailPreview, optional)
- `participants` (list of EmailIdentity, optional)
- `summary` (EmailThreadSummary, optional, nullable)
- `updated_by_name` (string, optional, nullable)
- `user_name` (string, optional, nullable)

## Errors

### 400 Bad Request Error

Bad request, such as a validation error.

- `Activities.email_threads_getRequestBadRequestError`
  - ErrorMessage: ErrorMessage
  - ValidationErrors: ValidationErrors
  - NestedValidationErrors: NestedValidationErrors

### 401 Unauthorized Error

Authentication is missing or invalid.

- `error` (string, required) — Error message.

### 403 Forbidden Error

Forbidden. Also returned when the API key lacks the required scope (`error_code` is `insufficient_scope`) or is inactive (`error_code` is `inactive_api_key`).

- `Activities.email_threads_getRequestForbiddenError`
  - ErrorMessage: ErrorMessage
  - ApiKeyError: ApiKeyError

### 404 Not Found Error

Not found.

- `error` (string, required) — Error message.

### 429 Too Many Requests Error

Too many requests. The global API rate limiter returns an empty body. Other rate and operation limits return a `RateLimitError` body. Wait for the number of seconds in the `retry-after` header before retrying.

- `error` (RateLimitErrorError, required)

## Types

### CommentSummary

- `comment_count` (integer, required)
- `thread_id` (string, required)

### EmailInThread

- `_type` (string, required)
- `activity_at` (datetime, required, nullable)
- `bcc` (list of string, required)
- `bulk_email_action_id` (string, required, nullable)
- `cc` (list of string, required)
- `contact_id` (string, required, nullable)
- `created_by` (string, required, nullable)
- `date_created` (datetime, required)
- `date_scheduled` (datetime, required, nullable)
- `date_sent` (datetime, required, nullable)
- `date_updated` (datetime, required)
- `direction` (enum, required, nullable) — Direction of communication. Outgoing means the communication flowing from the user to the lead/contact. Inbound means the opposite.
  - Allowed values: `incoming`, `outgoing`
- `followup_sequence_add_cc_bcc` (boolean, required)
- `followup_sequence_delay` (integer, required, nullable)
- `has_reply` (boolean, required)
- `id` (string, required)
- `in_reply_to_id` (string, required, nullable)
- `lead_id` (string, required, nullable)
- `message_ids` (list of string, required)
- `need_smtp_credentials` (boolean, required)
- `opens_summary` (string, required, nullable)
- `organization_id` (string, required)
- `references` (list of string, required)
- `send_as_id` (string, required, nullable)
- `sender` (string, required, nullable)
- `status` (enum, required) — Status of a message, such as Email or SMS.
  - Allowed values: `inbox`, `draft`, `scheduled`, `outbox`, `sent`, `error`
- `subject` (string, required, nullable)
- `template_id` (string, required, nullable)
- `thread_id` (string, required, nullable)
- `to` (list of string, required)
- `updated_by` (string, required, nullable)
- `user_id` (string, required, nullable)
- `users` (list of string, required)
- `agent_action_reason` (string, optional, nullable)
- `ai_draft` (map from string to any, optional, nullable)
- `attachments` (list of Attachment, optional, nullable)
- `body_html` (string, optional, nullable)
- `body_html_quoted` (list of QuotedEmailHTML, optional, nullable)
- `body_preview` (string, optional, nullable)
- `body_text` (string, optional, nullable)
- `body_text_quoted` (list of QuotedEmailText, optional, nullable)
- `created_by_agent_id` (string, optional, nullable)
- `created_by_name` (string, optional, nullable)
- `email_account_id` (string, optional, nullable)
- `envelope` (map from string to any, optional, nullable)
- `followup_sequence_id` (string, optional, nullable)
- `opens` (list of EmailOpen, optional, nullable)
- `send_attempts` (list of SendAttempt, optional, nullable)
- `sequence_id` (string, optional, nullable)
- `sequence_name` (string, optional, nullable)
- `sequence_subscription_id` (string, optional, nullable)
- `template_name` (string, optional, nullable)
- `updated_by_name` (string, optional, nullable)
- `user_name` (string, optional, nullable)
- `agent_config_id` (string, optional, nullable, deprecated) — Deprecated. Use `created_by_agent_id` instead.

### EmailThreadActivityImportance

- ImportantEmailThread: ImportantEmailThread
- NotImportantEmailThread: NotImportantEmailThread

### EmailPreview

- `bcc` (list of string, required)
- `body_preview` (string, required, nullable)
- `cc` (list of string, required)
- `date_created` (datetime, required)
- `date_sent` (datetime, required, nullable)
- `date_updated` (datetime, required)
- `direction` (enum, required) — Direction of communication. Outgoing means the communication flowing from the user to the lead/contact. Inbound means the opposite.
  - Allowed values: `incoming`, `outgoing`
- `envelope` (EmailEnvelope, required, nullable)
- `has_attachments` (boolean, required, nullable)
- `id` (string, required, nullable)
- `opens_summary` (string, required, nullable)
- `send_as_id` (string, required, nullable)
- `sender` (string, required, nullable)
- `status` (enum, required) — Status of a message, such as Email or SMS.
  - Allowed values: `inbox`, `draft`, `scheduled`, `outbox`, `sent`, `error`
- `subject` (string, required, nullable)
- `to` (list of string, required)
- `user_id` (string, required, nullable)

### EmailIdentity

- `email` (string, required)
- `name` (string, required)

### EmailThreadSummary

- `expired_at` (datetime, required, nullable)
- `generated_at` (datetime, required, nullable)
- `status` (enum, required) — Status of an AI summary. `expired` means newer activity made the summary out of date.
  - Allowed values: `pending`, `success`, `failure`, `expired`
- `summary_html` (string, required, nullable)
- `summary_text` (string, required, nullable)
- `updated_at` (datetime, required)
- `feedback` (EmailThreadSummaryFeedback, optional)

### ErrorMessage

Error with a message.

- `error` (string, required) — Error message.

### ValidationErrors

Validation errors with the path of each invalid field.

- `errors` (list of ValidationErrorsErrorsItems, required)

### NestedValidationErrors

Validation errors nested by field. Some endpoints return only `errors` or only `field-errors`.

- `errors` (list of string, optional) — Errors that don't apply to a single field.
- `field-errors` (map from string to any, optional) — Errors keyed by field name. Each value is a message, a list of messages, or a nested object of the same shape for nested fields.

### ApiKeyError

The API key lacks the scope the request requires, or is inactive.

- `error` (string, required)
- `error_code` (enum, required)
  - Allowed values: `insufficient_scope`, `inactive_api_key`
- `required_scope` (string, optional) — API key scope the request requires. Present when `error_code` is `insufficient_scope`.

### RateLimitErrorError

- `message` (string, required, nullable)
- `rate_reset` (string, required) — Number of seconds until the rate limit resets.
- `allowed_limit` (integer, optional) — Maximum number of bulk actions allowed. Present when the bulk action limit was hit.
- `bulk_action_count` (integer, optional) — Number of bulk actions running. Present when the bulk action limit was hit.

### Attachment

- `content_type` (string, required, nullable) — MIME type of the file, e.g. `application/pdf`
- `filename` (string, required, nullable) — Name of the file, e.g. `contract.pdf`
- `size` (integer, required, nullable) — Size of the file in bytes
- `url` (string, required) — URL to download the file from Close
- `content_id` (string, optional, nullable) — MIME Content-ID field, referenced from the body HTML as a `cid:` link
- `inline_only` (boolean, optional) — Whether the attachment is embedded in the body HTML (e.g. a signature logo) rather than being standalone
- `thumbnail_url` (string, optional, nullable) — URL to download a thumbnail of the file. Only available for GIF, JPEG and PNG images.

### QuotedEmailHTML

- `expand` (boolean, required)
- `html` (string, required)

### QuotedEmailText

- `expand` (boolean, required)
- `text` (string, required)

### EmailOpen

- `ip_address` (string, required, nullable)
- `opened_at` (datetime, required)
- `opened_by` (string, required, nullable)
- `user_agent` (string, required, nullable)

### SendAttempt

- `date` (string, required)
- `error_class` (string, required, nullable)
- `error_message` (string, required)

### ImportantEmailThread

- `reason` (enum, required) — Why an Email Thread is considered important.
  - Allowed values: `manual`, `contains-manual-message`, `most-recent-communication`, `has-response`, `whitelisted`, `by-default`, `unset-initial-default`
- `type` ("important", required)

### NotImportantEmailThread

- `reason` (enum, required) — Why an Email Thread is considered not important.
  - Allowed values: `manual`, `scheduling-emails`, `automated-outbound`, `marketing-or-transactional`, `by-default`
- `type` ("not_important", required)

### EmailEnvelope

- `bcc` (list of EmailIdentity, required)
- `cc` (list of EmailIdentity, required)
- `date` (string, required, nullable)
- `from` (list of EmailIdentity, required)
- `in_reply_to` (string, required, nullable)
- `is_autoreply` (boolean, required)
- `message_id` (string, required, nullable)
- `reply_to` (list of EmailIdentity, required)
- `sender` (list of EmailIdentity, required)
- `subject` (string, required, nullable)
- `to` (list of EmailIdentity, required)

### EmailThreadSummaryFeedback

- `detail` (string, required, nullable)
- `given_at` (datetime, required)
- `rating` (enum, required) — A user's rating of an AI summary.
  - Allowed values: `positive`, `negative`

### ValidationErrorsErrorsItems

- `field` (list of ValidationErrorsErrorsItemsFieldItems, required) — Path of the invalid field. Empty for errors that don't apply to a field.
- `msg` (string, required)

### ValidationErrorsErrorsItemsFieldItems

- integer
- string

## Examples

**Response**

```json
{
  "_type": "EmailThread",
  "activity_at": "2014-12-07T04:10:46+00:00",
  "contact_id": null,
  "created_by": null,
  "date_created": "2014-12-07T04:10:46+00:00",
  "date_updated": "2014-12-07T04:11:00.476000+00:00",
  "id": "acti_giHHCV8uOnialksjdflaksjdflq5zXxWi6FQL88MoNH",
  "latest_normalized_subject": "Excited to have you on board!",
  "lead_id": "lead_5cIz6MHYMYEJLDTJRzoyfLHAMymuWlPweEMvslHoBf5",
  "n_emails": 3,
  "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH",
  "updated_by": null,
  "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
  "users": [
    "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA"
  ],
  "created_by_name": null,
  "emails": [
    {
      "_type": "Email",
      "activity_at": "2014-12-07T04:10:46+00:00",
      "bcc": [],
      "bulk_email_action_id": null,
      "cc": [],
      "contact_id": "cont_alksdjfalksdfj8NzQM56BzBZ8X2GWaowuifsOeWyeJ",
      "created_by": null,
      "date_created": "2014-12-07T04:10:46+00:00",
      "date_scheduled": null,
      "date_sent": "2014-12-07T04:10:46+00:00",
      "date_updated": "2014-12-07T04:11:00.459000+00:00",
      "direction": "outgoing",
      "followup_sequence_add_cc_bcc": false,
      "followup_sequence_delay": null,
      "has_reply": false,
      "id": "acti_12342j3451lk25iH1Rrtk9LWxwpUZmHygjww4c5iFw4",
      "in_reply_to_id": null,
      "lead_id": "lead_5cIz6MHYMYEJLDTJRzoyfLHAMymuWlPweEMvslHoBf5",
      "message_ids": [
        "<5483d346af89c_c0031a60fdc11130711c@ns5001546.ip-192-95-32.net.mail>"
      ],
      "need_smtp_credentials": false,
      "opens_summary": null,
      "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH",
      "references": [],
      "send_as_id": null,
      "sender": "Steli Efti <steli@close.com>",
      "status": "sent",
      "subject": "Excited to have you on board!",
      "template_id": null,
      "thread_id": "acti_giHHCV8uOniX2wuFmKY14VWqOEq5zXxWi6FQL88MoNH",
      "to": [
        "karen@example.com"
      ],
      "updated_by": null,
      "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
      "users": [],
      "attachments": [],
      "body_preview": "Hey Karen,\r\n\r\nThanks for signing up for Close. My name is Steli Efti and I'm\r\nthe CEO of Close. Please let me know if I can do anything to\r\nhelp make your trial into a massive success.\r\n\r\nAdditi",
      "created_by_name": null,
      "email_account_id": "emailacct_aslkdjfalksjdfCmLShmuvlPMFy7Ze61FVeEj1VXnlG",
      "envelope": {
        "bcc": [],
        "cc": [],
        "date": "Sun, 07 Dec 2014 04:10:46 +0000",
        "from": [
          {
            "email": "steli@close.com",
            "name": "Steli Efti"
          }
        ],
        "in_reply_to": null,
        "message_id": "<5483d346af89c_c0031a60fdc11130711c@ns5001546.ip-192-95-32.net.mail>",
        "reply_to": [],
        "sender": [
          {
            "email": "steli@close.com",
            "name": "Steli Efti"
          }
        ],
        "subject": "Excited to have you on board!",
        "to": [
          {
            "email": "karen@example.com",
            "name": null
          }
        ]
      },
      "opens": [],
      "send_attempts": [],
      "sequence_id": "seq_1BTljGuCooX0nbFoPihl07",
      "sequence_name": "My Sequence",
      "sequence_subscription_id": "sub_wRlAku35U53xEV7PcNY3Qo",
      "template_name": null,
      "updated_by_name": null,
      "user_name": "Steli Efti"
    },
    {
      "_type": "Email",
      "activity_at": "2014-11-28T17:26:00+00:00",
      "bcc": [],
      "bulk_email_action_id": null,
      "cc": [],
      "contact_id": "cont_Hw4160e5c61QoFpEkvbUeGYJ0uDMLODYfrBRLWDFHh6",
      "created_by": null,
      "date_created": "2014-11-28T17:26:00+00:00",
      "date_scheduled": null,
      "date_sent": "2014-11-28T17:26:00+00:00",
      "date_updated": "2014-11-28T17:26:47.740000+00:00",
      "direction": "outgoing",
      "followup_sequence_add_cc_bcc": false,
      "followup_sequence_delay": null,
      "has_reply": false,
      "id": "acti_3ANoOJE7DkTwxG9s1TY3SP3VhiJFeua3gt85nuzb0by",
      "in_reply_to_id": null,
      "lead_id": "lead_5cIz6MHYMYEJLDTJRzoyfLHAMymuWlPweEMvslHoBf5",
      "message_ids": [
        "<5478b0283055a_724e3fb94e13cb5c60513397@ns5001376.ip-192-95-32.net.mail>"
      ],
      "need_smtp_credentials": false,
      "opens_summary": null,
      "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH",
      "references": [],
      "send_as_id": null,
      "sender": "Steli Efti <steli@close.com>",
      "status": "sent",
      "subject": "Excited to have you on board!",
      "template_id": null,
      "thread_id": "acti_giHHCV8uOniX2wuFmKY14VWqOEq5zXxWi6FQL88MoNH",
      "to": [
        "carlos@abc.com"
      ],
      "updated_by": null,
      "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
      "users": [],
      "attachments": [],
      "body_preview": "Hey Carlos,\r\n\r\nThanks for signing up for Close. My name is Steli Efti and I'm\r\nthe CEO of Close. Please let me know if I can do anything to\r\nhelp make your trial into a massive success.\r\n\r\nAddit",
      "created_by_name": null,
      "email_account_id": "emailacct_eLq7Zxa3CPKgapCmLShmuvlPMFy7Ze61FVeEj1VXnlG",
      "envelope": {
        "bcc": [],
        "cc": [],
        "date": "Fri, 28 Nov 2014 17:26:00 +0000",
        "from": [
          {
            "email": "steli@close.com",
            "name": "Steli Efti"
          }
        ],
        "in_reply_to": null,
        "message_id": "<5478b0283055a_724e3fb94e13cb5c60513397@ns5001376.ip-192-95-32.net.mail>",
        "reply_to": [],
        "sender": [
          {
            "email": "steli@close.com",
            "name": "Steli Efti"
          }
        ],
        "subject": "Excited to have you on board!",
        "to": [
          {
            "email": "carlos@abc.com",
            "name": null
          }
        ]
      },
      "opens": [],
      "send_attempts": [],
      "sequence_id": null,
      "sequence_name": null,
      "sequence_subscription_id": null,
      "template_name": null,
      "updated_by_name": null,
      "user_name": "Steli Efti"
    },
    {
      "_type": "Email",
      "activity_at": "2014-11-26T10:15:44+00:00",
      "bcc": [],
      "bulk_email_action_id": null,
      "cc": [],
      "contact_id": "cont_6d0dRVHWGMvsJLFjAms1xTL0LCeQoRVWyZtpQs0Y98S",
      "created_by": null,
      "date_created": "2014-11-26T10:15:44+00:00",
      "date_scheduled": null,
      "date_sent": "2014-11-26T10:15:44+00:00",
      "date_updated": "2014-11-26T10:17:58.234000+00:00",
      "direction": "outgoing",
      "followup_sequence_add_cc_bcc": false,
      "followup_sequence_delay": null,
      "has_reply": false,
      "id": "acti_lcAFcE1n7vbkjtlcwpSSLGpheZKBSrmrPFcCM9S13q0",
      "in_reply_to_id": null,
      "lead_id": "lead_5cIz6MHYMYEJLDTJRzoyfLHAMymuWlPweEMvslHoBf5",
      "message_ids": [
        "<5475a850a030a_620f1ba3e246281806c1@ns5000834.ip-142-4-219.net.mail>"
      ],
      "need_smtp_credentials": false,
      "opens_summary": null,
      "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH",
      "references": [],
      "send_as_id": null,
      "sender": "Steli Efti <steli@close.com>",
      "status": "sent",
      "subject": "Excited to have you on board!",
      "template_id": null,
      "thread_id": "acti_giHHCV8uOniX2wuFmKY14VWqOEq5zXxWi6FQL88MoNH",
      "to": [
        "ohad@abc.com"
      ],
      "updated_by": null,
      "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
      "users": [],
      "attachments": [],
      "body_preview": "Hey TrueAccord,\r\n\r\nThanks for signing up for Close. My name is Steli Efti and I'm\r\nthe CEO of Close. Please let me know if I can do anything to\r\nhelp make your trial into a massive success.\r\n\r\nA",
      "created_by_name": null,
      "email_account_id": "emailacct_eLq7Zxa3CPKgapCmLShmuvlPMFy7Ze61FVeEj1VXnlG",
      "envelope": {
        "bcc": [],
        "cc": [],
        "date": "Wed, 26 Nov 2014 10:15:44 +0000",
        "from": [
          {
            "email": "steli@close.com",
            "name": "Steli Efti"
          }
        ],
        "in_reply_to": null,
        "message_id": "<5475a850a030a_620f1ba3e246281806c1@ns5000834.ip-142-4-219.net.mail>",
        "reply_to": [],
        "sender": [
          {
            "email": "steli@close.com",
            "name": "Steli Efti"
          }
        ],
        "subject": "Excited to have you on board!",
        "to": [
          {
            "email": "ohad@trueaccord.com",
            "name": null
          }
        ]
      },
      "opens": [],
      "send_attempts": [],
      "sequence_id": null,
      "sequence_name": null,
      "sequence_subscription_id": null,
      "template_name": null,
      "updated_by_name": null,
      "user_name": "Steli Efti"
    }
  ],
  "participants": [
    {
      "email": "steli@close.com",
      "name": "Steli Efti"
    }
  ],
  "updated_by_name": null,
  "user_name": "Steli Efti"
}
```

**SDK Code**

```python activities.email_threads_get_example
import requests

url = "https://api.close.com/api/v1/activity/emailthread/id/"

response = requests.get(url, auth=("<CLOSE_API_KEY>", ""))

print(response.json())
```

```javascript activities.email_threads_get_example
const url = 'https://api.close.com/api/v1/activity/emailthread/id/';
const credentials = btoa("<CLOSE_API_KEY>:");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

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

```go activities.email_threads_get_example
package main

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

func main() {

	url := "https://api.close.com/api/v1/activity/emailthread/id/"

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

	req.SetBasicAuth("<CLOSE_API_KEY>", "")

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

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

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

}
```

```ruby activities.email_threads_get_example
require 'uri'
require 'net/http'

url = URI("https://api.close.com/api/v1/activity/emailthread/id/")

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

request = Net::HTTP::Get.new(url)
request.basic_auth("<CLOSE_API_KEY>", "")

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

```java activities.email_threads_get_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.close.com/api/v1/activity/emailthread/id/")
  .basicAuth("<CLOSE_API_KEY>", "")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.close.com/api/v1/activity/emailthread/id/', [
  'headers' => [
  ],
    'auth' => ['<CLOSE_API_KEY>', ''],
]);

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

```csharp activities.email_threads_get_example
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://api.close.com/api/v1/activity/emailthread/id/");
client.Authenticator = new HttpBasicAuthenticator("<CLOSE_API_KEY>", "");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```