> For a complete page index, fetch https://developer.close.com/llms.txt # List or filter all SMS activities GET https://api.close.com/api/v1/activity/sms/ Get a list of matching SMS activities. MMS messages are considered SMS messages with attachments. Attachments have identical fields to email attachments (`url`, `filename`, `size` and `content_type`), a `media_id` uniquely identifying an attachment, and if Close was able to generate a thumbnail, a `thumbnail_url` too. Accessing `url` or `thumbnail_url` requires an authenticated session and leads to a temporarily signed S3 URL. Reference: https://developer.close.com/api/resources/activities/sms/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` (ActivitySmsGetParametersDateCreatedGte, optional) - `date_created__lte` (ActivitySmsGetParametersDateCreatedLte, optional) - `date_created__gt` (ActivitySmsGetParametersDateCreatedGt, optional) - `date_created__lt` (ActivitySmsGetParametersDateCreatedLt, optional) - `activity_at__gte` (ActivitySmsGetParametersActivityAtGte, optional) - `activity_at__lte` (ActivitySmsGetParametersActivityAtLte, optional) - `activity_at__gt` (ActivitySmsGetParametersActivityAtGt, optional) - `activity_at__lt` (ActivitySmsGetParametersActivityAtLt, optional) - `_fields` (string, optional) — Comma-separated list of fields to include in the response. ## Response ### 200 Successful response - `data` (list of SMSActivity, 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 ### ActivitySmsGetParametersDateCreatedGte ### ActivitySmsGetParametersDateCreatedLte ### ActivitySmsGetParametersDateCreatedGt ### ActivitySmsGetParametersDateCreatedLt ### ActivitySmsGetParametersActivityAtGte ### ActivitySmsGetParametersActivityAtLte ### ActivitySmsGetParametersActivityAtGt ### ActivitySmsGetParametersActivityAtLt ### SMSActivity - `_type` (string, required) - `activity_at` (datetime, required, nullable) - `caller_id_mode` (enum, required, nullable) — How a caller's outbound number is chosen. Fixed uses a single configured number; Auto lets Close select the best number per call/SMS (Managed by Close Caller ID). - Allowed values: `fixed`, `auto` - `caller_id_reason` (enum, required, nullable) — Why a number was chosen in Auto mode: reused from a prior communication (context), picked for geographic proximity (local_presence), or the default/oldest fallback. - Allowed values: `context`, `local_presence`, `fallback` - `contact_id` (string, required, nullable) - `cost` (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) — Direction of a phone activity, such as a call or an SMS message. - Allowed values: `inbound`, `outbound` - `error_message` (string, required, nullable) - `id` (string, required) - `lead_id` (string, required, nullable) - `local_country_iso` (string, required, nullable) - `local_phone` (string, required, nullable) - `local_phone_formatted` (string, required, nullable) - `organization_id` (string, required) - `remote_country_iso` (string, required, nullable) - `remote_phone` (string, required, nullable) - `remote_phone_formatted` (string, required, nullable) - `source` (enum, required) — Source of a phone activity. Describes whether the phone activity (such as a call or an SMS) was handled by Close's telephony provider or handled externally by a 3rd party and is merely logged in Close. - Allowed values: `Close.io`, `External` - `status` (enum, required) — Status of a message, such as Email or SMS. - Allowed values: `inbox`, `draft`, `scheduled`, `outbox`, `sent`, `error` - `template_id` (string, required, nullable) - `text` (string, required, nullable) - `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) - `created_by_name` (string, optional, nullable) - `sequence_id` (string, optional, nullable) - `sequence_name` (string, optional, nullable) - `sequence_subscription_id` (string, optional, nullable) - `updated_by_name` (string, optional, nullable) - `user_name` (string, optional, nullable) ## Examples **Response** ```json { "data": [ { "_type": "SMS", "activity_at": "2016-10-03T16:06:11.167000+00:00", "caller_id_mode": null, "caller_id_reason": null, "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "cost": "1", "created_by": null, "date_created": "2016-10-03T16:06:11.167000+00:00", "date_scheduled": null, "date_sent": null, "date_updated": "2016-10-03T16:06:11.167000+00:00", "direction": "inbound", "error_message": null, "id": "acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp", "lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb", "local_country_iso": "US", "local_phone": "+16503334444", "local_phone_formatted": "+1 650-333-4444", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "remote_country_iso": "US", "remote_phone": "+18183004000", "remote_phone_formatted": "+1 818-300-4000", "source": "Close.io", "status": "inbox", "template_id": null, "text": "SMS in Close? HUZZAH!!!", "updated_by": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "users": [], "created_by_name": null, "updated_by_name": null, "user_name": "Tobias Fuenke", "attachments": [ { "content_type": "image/png", "filename": "media_1.png", "media_id": "media_1GnAWzBfs0SOjTDcUnyyP9", "size": 15148, "thumbnail_url": "https://app.close.com/go/sms/acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp/media/media_7Ga8l93XLVvqNsgjPbBuUI/thumbnail/", "url": "https://app.close.com/go/sms/acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp/media/media_7Ga8l93XLVvqNsgjPbBuUI/" } ] } ], "has_more": false } ``` **SDK Code** ```python activities.sms_list_example import requests url = "https://api.close.com/api/v1/activity/sms/" response = requests.get(url, auth=("", "")) print(response.json()) ``` ```javascript activities.sms_list_example const url = 'https://api.close.com/api/v1/activity/sms/'; 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.sms_list_example package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.close.com/api/v1/activity/sms/" 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.sms_list_example require 'uri' require 'net/http' url = URI("https://api.close.com/api/v1/activity/sms/") 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.sms_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/sms/") .basicAuth("", "") .asString(); ``` ```php activities.sms_list_example request('GET', 'https://api.close.com/api/v1/activity/sms/', [ 'headers' => [ ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp activities.sms_list_example using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://api.close.com/api/v1/activity/sms/"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); ```