> For a complete page index, fetch https://developer.close.com/llms.txt # List Smart Views GET https://api.close.com/api/v1/saved_search/ Accepts: - A `type` filter that accepts either `lead` or `contact`. Defaults to `lead`. - A `type__in` filter that can be used to select multiple comma-separated types: `lead,contact`. Reference: https://developer.close.com/api/resources/smart-views/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. - `type` (enum, optional, nullable) - Allowed values: `lead`, `contact`, `opportunity`, `call`, `email`, `sms`, `meeting`, `note`, `whatsapp_message`, `custom_activity`, `form_submission` - `type__in` (list of enum, optional) - Allowed values: `lead`, `contact`, `opportunity`, `call`, `email`, `sms`, `meeting`, `note`, `whatsapp_message`, `custom_activity`, `form_submission` ## Response ### 200 Successful response - `data` (list of SavedSearch, 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 ### SavedSearch - `date_created` (datetime, required) - `date_updated` (datetime, required) - `description` (string, required, nullable) - `id` (string, required) - `is_shared` (boolean, required) - `is_user_dependent` (boolean, required, nullable) - `name` (string, required) - `organization_id` (string, required) - `query` (string, required, nullable) - `s_query` (map from string to any, required, nullable) - `type` (enum, required) - Allowed values: `lead`, `contact`, `opportunity`, `call`, `email`, `sms`, `meeting`, `note`, `whatsapp_message`, `custom_activity`, `form_submission` - `user_id` (string, required, nullable) - `selected_fields` (list of map from string to any, optional, nullable) - `shared_with` (list of string, optional, nullable) - `sharing_settings` (SharingSettingsEmbeddedResponse, optional, nullable) ### SharingSettingsEmbeddedResponse - `created_at` (datetime, required, nullable) - `created_by_id` (string, required, nullable) - `group_ids` (list of string, required) - `updated_at` (datetime, required, nullable) - `updated_by_id` (string, required, nullable) - `user_ids` (list of string, required) - `whole_org` (boolean, required) ## Examples **Response** ```json { "data": [ { "date_created": "2021-05-20T18:37:35.936000+00:00", "date_updated": "2021-05-20T18:37:35.936000+00:00", "description": "", "id": "save_cxgvcccaFJh6uGE3S6x8YYt61TLTd6MG4JiYLD1Eaja", "is_shared": true, "is_user_dependent": false, "name": "All Leads", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": null, "s_query": { "query": { "negate": false, "type": "match_all" }, "results_limit": null, "sort": [] }, "type": "lead", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "date_created": "2021-05-20T18:42:47.015000+00:00", "date_updated": "2021-05-20T18:42:47.015000+00:00", "description": "", "id": "save_fV7sewhM4FOCFs1m677k2OuxV8RuzUKMHxH8OQEEUjU", "is_shared": false, "is_user_dependent": false, "name": "All Contacts", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": null, "s_query": { "query": { "negate": false, "type": "match_all" }, "results_limit": null, "sort": [] }, "type": "contact", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false } ``` **SDK Code** ```python smart_views_list_example import requests url = "https://api.close.com/api/v1/saved_search/" response = requests.get(url, auth=("", "")) print(response.json()) ``` ```javascript smart_views_list_example const url = 'https://api.close.com/api/v1/saved_search/'; 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 smart_views_list_example package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.close.com/api/v1/saved_search/" 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 smart_views_list_example require 'uri' require 'net/http' url = URI("https://api.close.com/api/v1/saved_search/") 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 smart_views_list_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.close.com/api/v1/saved_search/") .basicAuth("", "") .asString(); ``` ```php smart_views_list_example request('GET', 'https://api.close.com/api/v1/saved_search/', [ 'headers' => [ ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp smart_views_list_example using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://api.close.com/api/v1/saved_search/"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); ```