> For a complete page index, fetch https://developer.close.com/llms.txt # List or filter all Email activities GET https://api.close.com/api/v1/activity/email/ You'll get one object per email message. Reference: https://developer.close.com/api/resources/activities/emails/list ## 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 `, where token is your auth token. ## Request ### Query parameters - `_limit` (integer, optional, default: 100) — Number of results to return. - `_skip` (integer, optional, default: 0) — Number of results to skip before returning, for pagination. - `id__in` (list of string, optional, nullable) — Filter by activity IDs (comma-separated) - `lead_id` (list of string, optional, nullable) — Filter by lead IDs (comma-separated) - `contact_id` (list of string, optional, nullable) — Filter by contact IDs (comma-separated) - `user_id` (list of string, optional, nullable) — Filter by user IDs (comma-separated) - `organization_id` (string, optional, nullable) - `_type` (list of string, optional, nullable) — Filter by activity type, e.g. Call (comma-separated) - `date_created__gte` (ActivityEmailGetParametersDateCreatedGte, optional) - `date_created__lte` (ActivityEmailGetParametersDateCreatedLte, optional) - `date_created__gt` (ActivityEmailGetParametersDateCreatedGt, optional) - `date_created__lt` (ActivityEmailGetParametersDateCreatedLt, optional) - `activity_at__gte` (ActivityEmailGetParametersActivityAtGte, optional) - `activity_at__lte` (ActivityEmailGetParametersActivityAtLte, optional) - `activity_at__gt` (ActivityEmailGetParametersActivityAtGt, optional) - `activity_at__lt` (ActivityEmailGetParametersActivityAtLt, optional) - `_fields` (string, optional) — Comma-separated list of fields to include in the response. ## Response ### 200 Successful response - `data` (list of EmailActivity, required) - `has_more` (boolean, required) ## Errors ### 400 Bad Request Error Bad request - `any` ### 401 Unauthorized Error Unauthorized - `any` ### 404 Not Found Error Not found - `any` ## Types ### ActivityEmailGetParametersDateCreatedGte ### ActivityEmailGetParametersDateCreatedLte ### ActivityEmailGetParametersDateCreatedGt ### ActivityEmailGetParametersDateCreatedLt ### ActivityEmailGetParametersActivityAtGte ### ActivityEmailGetParametersActivityAtLte ### ActivityEmailGetParametersActivityAtGt ### ActivityEmailGetParametersActivityAtLt ### EmailActivity - `_type` (string, required) - `activity_at` (datetime, required, nullable) - `bcc` (list of string, required) - `body_html` (string, required, nullable) - `body_text` (string, required, nullable) - `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) - `agent_config_id` (string, optional, nullable) - `attachments` (list of Attachment, optional, nullable) - `body_preview` (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) ### Attachment - `content_type` (string, required, nullable) - `filename` (string, required, nullable) - `size` (integer, required, nullable) - `url` (string, required) - `thumbnail_url` (string, optional, nullable) ### 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) ## Examples **Response** ```json { "data": [ { "_type": "Email", "activity_at": "2013-02-08T05:02:42.050000+00:00", "bcc": [], "body_html": "Cool!
\n
\nThis is rad. <3
\n

______________________________________________
Sent via Close – sales communication made simple", "body_text": "Cool!\n\nThis is rad. <3\n\n\n______________________________________________\nSent via http://close.com/ - sales communication made simple", "bulk_email_action_id": null, "cc": [], "contact_id": "cont_eXZwc2SVL4G3xSR85jnfPny2ykvoAQndSyi1Doa2YLO", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-08T05:02:42.050000+00:00", "date_scheduled": null, "date_sent": "2013-02-08T05:02:42.050000+00:00", "date_updated": "2013-02-08T05:03:16.281000+00:00", "direction": "outgoing", "followup_sequence_add_cc_bcc": false, "followup_sequence_delay": null, "has_reply": false, "id": "acti_C4DFcBED1FwLSDqn853hjc979h7DIuH2vwABzGWhRAO", "in_reply_to_id": null, "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "message_ids": [ "<20130208050314.11553.33819@ec2-54-245-86-79.us-west-2.compute.amazonaws.com>" ], "need_smtp_credentials": false, "opens_summary": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "references": [], "send_as_id": null, "sender": "phil@close.com", "status": "sent", "subject": "Testing testing!!!!", "template_id": null, "thread_id": "acti_C4DFcBED1FwLSDqn853hjc979h7DIuH2vwABzGWhRAO", "to": [ "phil@close.com" ], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "users": [], "attachments": [ { "content_type": "image/png", "filename": "screenshot.png", "size": 1108447, "url": "https://app.close.com/go/file/persisted/orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH/activity.email/acti_C4DFcBED1FwLSDqn853hjc979h7DIuH2vwABzGWhRAO/3iPCenL9lciJrKnjFucsJ8/screenshot.png" } ], "created_by_name": "Bruce Wayne", "envelope": { "bcc": [], "cc": [], "date": "Fri, 08 Feb 2013 05:03:15 +0000", "from": [ { "email": "phil@close.com", "name": "Phil Freo" } ], "in_reply_to": null, "message_id": "<20130208050314.11553.33819@ec2-54-245-86-79.us-west-2.compute.amazonaws.com>", "reply_to": [], "sender": [ { "email": "phil@close.com", "name": "Phil Freo" } ], "subject": "Testing testing!!!!", "to": [ { "email": "phil@close.com", "name": "" } ] }, "opens": [], "send_attempts": [], "sequence_id": "seq_1BTljGuCooX0nbFoPihl07", "sequence_name": "My Sequence", "sequence_subscription_id": "sub_wRlAku35U53xEV7PcNY3Qo", "updated_by_name": "Bruce Wayne", "user_name": "John Wayne", "body_text_quoted": [ { "expand": true, "text": "Cool!\n\nThis is rad. <3\n\n\n______________________________________________\nSent via http://close.com/ - sales communication made simple" } ] }, { "_type": "Email", "activity_at": "2013-02-01T00:54:51.274000+00:00", "bcc": [], "body_html": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!", "body_text": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!", "bulk_email_action_id": null, "cc": [], "contact_id": "cont_8NNOJnVwmHQEYuVOgJ4B4zU7g9RUxYH4JnPjza5Vr6t", "created_by": null, "date_created": "2013-02-01T00:54:51.274000+00:00", "date_scheduled": null, "date_sent": "2013-02-01T00:54:51.274000+00:00", "date_updated": "2013-02-01T00:56:04.184000+00:00", "direction": "incoming", "followup_sequence_add_cc_bcc": false, "followup_sequence_delay": null, "has_reply": false, "id": "acti_WuIVvTT9b3zLmOOWalxK0OrqtdkxEEdu4mNr1TPGb2o", "in_reply_to_id": null, "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "message_ids": [ "<20130201005451.14369.20369@ec2-54-245-86-79.us-west-2.compute.amazonaws.com>" ], "need_smtp_credentials": false, "opens_summary": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "references": [], "send_as_id": null, "sender": "karan@close.com", "status": "inbox", "subject": "Welcome to Close!", "template_id": null, "thread_id": "acti_WuIVvTT9b3zLmOOWalxK0OrqtdkxEEdu4mNr1TPGb2o", "to": [ "phil+sample@close.com" ], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "users": [], "attachments": [], "envelope": { "bcc": [], "cc": [], "date": "Fri, 01 Feb 2013 00:54:51 +0000", "from": [ { "email": "karan@close.com", "name": "" } ], "in_reply_to": null, "message_id": "<20130201005451.14369.20369@ec2-54-245-86-79.us-west-2.compute.amazonaws.com>", "reply_to": [], "sender": [ { "email": "karan@close.com", "name": "" } ], "subject": "Welcome to Close!", "to": [ { "email": "phil+sample@close.com", "name": "" } ] }, "opens": [], "send_attempts": [], "updated_by_name": "Bruce Wayne", "body_text_quoted": [ { "expand": true, "text": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!" } ] } ], "has_more": false } ``` **SDK Code** ```python activities.emails_list_example import requests url = "https://api.close.com/api/v1/activity/email/" response = requests.get(url, auth=("", "")) print(response.json()) ``` ```javascript activities.emails_list_example const url = 'https://api.close.com/api/v1/activity/email/'; const credentials = btoa(":"); 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.emails_list_example package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.close.com/api/v1/activity/email/" req, _ := http.NewRequest("GET", url, nil) req.SetBasicAuth("", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby activities.emails_list_example require 'uri' require 'net/http' url = URI("https://api.close.com/api/v1/activity/email/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request.basic_auth("", "") response = http.request(request) puts response.read_body ``` ```java activities.emails_list_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.close.com/api/v1/activity/email/") .basicAuth("", "") .asString(); ``` ```php activities.emails_list_example request('GET', 'https://api.close.com/api/v1/activity/email/', [ 'headers' => [ ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp activities.emails_list_example using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://api.close.com/api/v1/activity/email/"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); ```