Welcome to the Close REST API specification.
Authentication
HTTP Basic authentication. The API key acts as the username. API keys are per-organization and can be generated and deleted in the Settings page. See our API Keys FAQ for more information.
Example cURL request with an api key.
curl "https://api.close.com/api/v1/me/" -u yourapikey:
Notice the ':' at the end of the api key. This is used because the key is sent as the username with a blank password.
API Base URL: https://api.close.com/api/v1
Search
The API uses the same search syntax that you'd use in the UI's searchbox. There are a number of search help articles available here and in particular this article that details the basics of the search syntax.
Endpoints that support searching
Specifying filter parameters
Many resources accept filters and other parameters which can be simply passed in the GET query string. However, in certain cases, like filtering by a long list of IDs, URLs can potentially exceed the recommended maximum URL length (2000 characters). To prevent problems with long URLs, parameters can also be specified in a JSON-encoded dictionary in the request body under the _params
key. Since GET requests with a request body are against the specification, we support the x-http-method-override
HTTP header that lets you override the request method.
For example, the following two requests are equivalent:
curl -X POST
-u apikey:
-H 'content-type: application/json'
-H 'x-http-method-override: GET'
-d '{"_params": { "lead_id": "THE_LEAD_ID" }}'
https://api.close.com/api/v1/activity/
curl -u apikey: https://api.close.com/api/v1/activity/?lead_id=THE_LEAD_ID
The x-http-method-override
header can also be used for clients that have issues with request methods other than GET and POST.
Timezone Offsets
For requests that include date filters like date_created
or date_start
, you can use the x-tz-offset
HTTP header to pass your timezone's UTC offset as part of your request. Including this header in your request lets you retrieve search results, run reports, and schedule emails and SMS relative to your timezone. This can be especially important when requesting an activity report that you want to match to what you see in Close or when running a query on the /lead/
endpoint that uses dates like created:today
.
For example, to pass this header for EDT (UTC-4:00), you would include the following header in your request:
-H 'x-tz-offset: -4'
Note: for timezones like NDT (UTC-2:30) that have half-hour offsets, include a ".5" in the header:
-H 'x-tz-offset': -2.5'
Fields
Most endpoints support a _fields
parameter that lets you specify which fields you require in the response. For example, if you only need ID and display_name when listing Leads, add ?_fields=id,display_name
to the URL. This will improve performance of your API calls.
In some cases, an API response can include fields that are not listed in the sample response for that endpoint below. Non-custom fields that are not included in the sample response for an endpoint should not be used in integrations, as they may change without warning.
Updating specific fields only
In the Close API, every PUT
request behaves as a patch. What it means is that you don't need to send all the fields with every request. For example, if only the title
field changed for a specific Contact, there's no need to include the name
field in the request.
Pagination
_limit
and _skip
parameters can be used to paginate through the results. For example, the first three pages for the lead resource (100 records per page) are given below:
- Page 1:
/api/v1/lead/?_skip=0&_limit=100
- Page 2:
/api/v1/lead/?_skip=100&_limit=100
- Page 3:
/api/v1/lead/?_skip=200&_limit=100
The response contains two fields: data
containing the list of objects and has_more
, which indicates if you reached the last page.
Additionally, there is a maximum limit that can vary per resource. You will get a 400 response with an appropriate message if you exceed it.
Webhooks
Webhooks allow a subscription URL to be configured that we will POST event data to as it is added to the Event Log. Each subscription is configured to trigger when an event matches a set of object types and actions.
Here is an example of the Webhook data for an opportunity that was won. This would be sent to the URL you provide using a POST
request:
{
"event": {
"date_created": "2019-01-15T12:48:23.395000",
"meta": {
"request_method": "PUT",
"request_path": "/api/v1/opportunity/oppo_7H4sjNso7FyBFaeR3RXi5PMJbilfo0c6UPCxsJtEhCO/"
},
"id": "ev_2sYKRjcrA79yKxi3S4Crd7",
"action": "updated",
"date_updated": "2019-01-15T12:48:23.395000",
"changed_fields": ["confidence", "date_updated", "status_id", "status_label", "status_type"],
"previous_data": {
"status_type": "active",
"confidence": 70,
"date_updated": "2019-01-15T12:47:39.873000+00:00",
"status_id": "stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH",
"status_label": "Active"
},
"organization_id": "orga_XbVPx5fFbKlYTz9PW5Ih1XDhViV10YihIaEgMEb6fVW",
"data": {
"contact_name": "Mr. Jones",
"user_name": "Joe Kemp",
"value_period": "one_time",
"updated_by_name": "Joe Kemp",
"date_created": "2019-01-15T12:41:24.496000+00:00",
"user_id": "user_lAm7YqrzZj00t1GLK5eTOaRgdkNChswxydbhUhGRbcM",
"updated_by": "user_lAm7YqrzZj00t1GLK5eTOaRgdkNChswxydbhUhGRbcM",
"value_currency": "USD",
"organization_id": "orga_XbVPx5fFbKlYTz9PW5Ih1XDhViV10YihIaEgMEb6fVW",
"status_label": "Won",
"contact_id": "cont_BwlwYQkIP6AooiXP1CMvc6Zbb5gGh2gPu4dqIDlDrII",
"status_type": "won",
"created_by_name": "Joe Kemp",
"id": "oppo_8H4sjNso7FyBFaeR3RXi5PMJbilfo0c6UPCxsJtEhCO",
"lead_name": "KLine",
"date_lost": null,
"note": "",
"date_updated": "2019-01-15T12:48:23.392000+00:00",
"status_id": "stat_wMS9M6HC2O3CSEOzF5g2vEGt6RM5R3RfhIQixdnmjf2",
"value": 100000,
"created_by": "user_lAm7YqrzZj00t1GLK5eTOaRgdkNChswxydbhUhGRbcM",
"value_formatted": "$1,000",
"date_won": "2019-01-15",
"lead_id": "lead_zwqYhEFwzPyfCErS8uQ77is2wFLvr9BgVi6cTfbFM68",
"confidence": 100
},
"request_id": "req_4S2L8JTBAA1OUS74SVmfbN",
"object_id": "oppo_7H4sjNso7FyBFaeR3RXi5PMJbilfo0c6UPCxsJtEhCO",
"user_id": "user_lAm7YqrzZj00t1GLK5eTOaRgdkNChswxydbhUhGRbcM",
"object_type": "opportunity",
"lead_id": "lead_zwqYhEFwzPyfCErS8uQ77is2wFLvr9BgVi6cTfbFM68"
},
"subscription_id": "whsub_8AmjKCZYT3zI8eZoi4HhFC"
}
Webhook delivery:
- Failed deliveries are retried with a retry interval that exponentially backs off up to every 10 minutes. They will be retried up to 72 hours before being dropped.
- Event ordering is not guranteed due to event consolidation, delivery parallelism/retries and other factors.
- A subscription will automatically be paused and its queue cleared if it reaches 100,000 backlogged events. Paused subscriptions must be manually re-activated via the API before we will attempt to deliver events again.
- We recommend processing Webhook events asynchronously meaning that you queue them locally before trying to process the payload. This will ensure we are always able to deliver the event and avoid the possibility of subscriptions getting paused because the max queue length is reached.
- If your application needs to reprocess historical events, you can access them via the event log API for up to 30 days.
- For
updated
ordeleted
actions the webhook will be called after the consolidation delay. - Event updates are written immediately to the event log during the consolidation period so if you query the event log directly you may see events that you haven't received a webhook notification for yet.
Data management:
- Users with the Admin role can manage subscriptions for all users in the organization. Non-admin users can only modify subscriptions created by them.
- All data is delivered in the Webhook event even for non-admin users since they would have access to the same data via the application at delivery time.
- We recommend using https to protect your data during delivery. SSL certificate validation is enabled by default but can be disabled via the
verify_ssl
field.
Webhook signatures:
The subscription API's POST response includes a signature_key
value that will be used to sign Webhooks for the subscription. The signature and signing timestamp is available in the following two headers of each POST request to your endpoint.
close-sig-hash: aa4fea8d4b74a0790e6b0dc2214db9d4d7651cb3e23f53caea499defd71ee431
close-sig-timestamp: 1544271440
The signature in the close-sig-hash
header is the sha256 HMAC of the close-sig-timestamp
and payload concatenated. The following Python 3 example code demonstrates how the signture can be verified.
key = '058bfb6a3d8cfdc4da7c3be5901b16ae11da982b46a25fb2cd7016e97a140a1c'
data = headers['close-sig-timestamp'] + payload
signature = hmac.new(bytearray.fromhex(key), data.encode('utf-8'), hashlib.sha256).hexdigest()
valid = hmac.compare_digest(headers['close-sig-hash'], signature) # Will be True if sigs match
See the Subscription API documentation for the details of managing Webhook subscriptions.
Rate Limits
We enforce API call rate limits to protect our infrastructure from excessive request rates, to keep Close fast and stable for everyone. These limits are high enough that typical API workflows aren't affected. However, please do code your integration to follow the rule below:
If you receive a response status code of 429 (Too Many Requests), please sleep/pause for the number of seconds specified by the rate_reset
value before making additional requests to that endpoint. See below for the specific response format.
Rate limits are enforced per endpoint group. Endpoint groups are used to provide more granular control by grouping endpoint URL paths and methods (e.g. GET, PUT, etc.) together. For instance, GETs to /api/v1/lead/ and POSTs/PUTs to /api/v1/activity/ may be counted as two different API groups. This allows us to offer a higher limit on lightweight requests than we would be able to on more resource intensive request types.
API requests are limited at a per Organization level across all users' API keys. We also enforce a lower rate limit per API key, which helps ensure that an individual heavy integration doesn't cause other lightweight integrations (on separate API keys) to get rate limited unnecessarily. The per Organization limit is currently 3 times higher than individual API key rate limits, meaning that if the API key rate limit maximum requests per second (RPS) is 20 RPS, the organization wide limit would be 60 RPS for that same endpoint group. This allows you to use 3 API keys at their maximum RPS and not hit the Organization rate limit until you add a 4th key making additional requests. The 429 response provides details to identify which limit and endpoint group was hit.
Most API responses will have the following headers to provide rate limiting statistics about the limit it's closest to hitting.
x-rate-limit-limit
: Request limit enforced for this endpoint, some endpoints may allow bursting over this limitx-rate-limit-remaining
: Requests left in the enforcement windowx-rate-limit-reset
: Seconds remaining before this enforcement window ends (as a decimal).
Each 429
response is guaranteed to have the x-rate-limit-reset
header set as well as the retry-after
header as per RFC 7231 (equivalent to x-rate-limit-reset
rounded up to the next integer), and provides the following data in its body:
{
"error": {
"message": "API call count exceeded for this period",
"rate_reset": 0.870663, # Seconds remaining until the next enforcement window starts
# The fields below may not always be set.
"rate_limit": 40, # Request limit enforced for this endpoint and rate limit type (key or org)
"rate_window": 1, # Number of second(s) in enforcement window
"rate_limit_type": "key", # Type of rate limit hit ("key" or "org")
"rate_endpoint_group": "99ad0b85407fbfce6882152c4cd0b86d" # Endpoint group ID
}
}
Some API endpoints may have stricter (unpredictable) rate limits and may trigger a 429 even if the user agent places requests within the enforcement window. In these scenarios only the rate_reset
values and retry-after
header may be set.
Note: We recommend using the rate_reset
value instead of the retry-after
header for a more accurate wait time.
HTTP Response Codes
The following HTTP codes are used in the responses:
- 200 when the request was successful.
- 400 when there was an issue with the request.
- 401 when the request needs to be authenticated.
- 402 when the request could not be completed, because a limit of your current plan was reached.
- 403 when an operation was not allowed.
- 404 when the URL was not found.
- 405 when the HTTP method was not supported.
- 415 when the request used an unsupported format.
API Clients
The Close REST API is usable in any programming language that can send HTTP requests and handle HTTP responses. To make development using our API easier, some awesome contributors have helped us develop numerous API Clients for multiple programming languages. Check them out below:
- Python
- Close's Python Wrapper (Officially maintained by Close)
- Ruby
- PHP
- Node.js
- C#
- Elixir
- Go
If you've developed a Close API Client and want to be included on this list, please reach out to support@close.com.
Leads
Leads are the most important object in Close. They represent a company or organization and can contain contacts, tasks, opportunities, and activities. In fact, these other objects must be children of a Lead. You can think of a Lead in Close like both a "lead" and "account" in the terminology of some other CRMs.
When a lead is returned, its basic info as well as related tasks, opportunities, and custom fields are included. Activities are excluded and have to be fetched separately via the activities endpoint.
Custom fields that have a value are returned as custom.FIELD_ID
, where FIELD_ID is the ID of the custom field (see Custom Fields for more details). Note that using the custom
field dict is deprecated, and the field will be removed from the API.
When using the _fields
parameter, specify custom
to show all custom fields. Returning individual custom fields is currently not supported via _fields
.
Smart Fields are not included in the response by default. If you'd like to include them, you can:
- Fetch a specific Smart Field with
?_fields=smart_field_name,other_lead_field_names
- Fetch all Lead fields and all Smart Fields with ?_fields=
_all
To speed up your integration, we recommend that you only use the _all
flag to discover what Smart Fields are available and then use ?_fields=specific,set,of,fields
to return only the fields you need.
List or search for leads
List or search for leads.
The query
parameter is the same search query (URL encoded) that you'd use in the UI's searchbox (see "Narrow your results" for available keywords), and can also include the sort:
keyword.
For queries that include relative dates like last_emailed:today
, you can pass your timezone's UTC offset as an HTTP header x-tz-offset:
.
curl -XGET "https://api.close.com/api/v1/lead/{?query, _limit, _skip, _fields}"
Request Headers
x-tz-offset: -8
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"total_results": 1,
"data": [
{
"status_id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_label": "Potential",
"tasks": [],
"display_name": "Wayne Enterprises (Sample Lead)",
"addresses": [],
"contacts": [
{
"name": "Bruce Wayne",
"title": "The Dark Knight",
"date_updated": "2013-02-06T20:53:01.954000+00:00",
"phones": [
{
"phone": "+16503334444",
"phone_formatted": "+1 650-333-4444",
"type": "office"
},
],
"custom.ccf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "CEO",
"created_by": null,
"id": "cont_o0kP3Nqyq0wxr5DLWIEm8mVr6ZpI0AhonKLDG0V5Qjh",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-01T00:54:51.331000+00:00",
"emails": [
{
"type": "office",
"email": "thedarkknight@close.com"
}
],
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
}
],
"custom.lcf_ORxgoOQ5YH1p7lDQzFJ88b4z0j7PLLTRaG66m8bmcKv": "Website contact form",
"custom.lcf_nenE344jkwrjyRRezwsf8b4V1MCoXWIDHIStmFavZks": ["Choice 1", "Choice 2"],
"date_updated": "2013-02-06T20:53:01.977000+00:00",
"description": "",
"html_url": "https://app.close.com/lead/lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O/",
"created_by": null,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"url": null,
"opportunities": [
{
"id": "oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
"lead_name": "Wayne Enterprises (Sample Lead)",
"status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_label": "Active",
"status_type": "active",
"value": 50000,
"value_period": "one_time",
"value_formatted": "$500",
"value_currency": "USD",
"date_won": null,
"confidence": 75,
"note": "Bruce needs new software for the Bat Cave.",
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"user_name": "John Doe",
"contact_id": null,
"created_by": null,
"updated_by": null,
"date_created": "2013-02-01T00:54:51.337000+00:00",
"date_updated": "2013-02-01T00:54:51.337000+00:00"
},
{
"id": "oppo_klajsdflf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
"lead_name": "Wayne Enterprises (Sample Lead)",
"status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_label": "Active",
"status_type": "active",
"value": 5000,
"value_period": "monthly",
"value_formatted": "$50 monthly",
"value_currency": "USD",
"date_won": null,
"confidence": 75,
"note": "Bat Cave monthly maintenance cost",
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"user_name": "John Doe",
"contact_id": null,
"created_by": null,
"updated_by": null,
"date_created": "2013-02-01T00:54:51.337000+00:00",
"date_updated": "2013-02-01T00:54:51.337000+00:00"
}
],
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"date_created": "2013-02-01T00:54:51.333000+00:00",
"id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
"name": "Wayne Enterprises (Sample Lead)"
}
]
}
Retrieve a single lead
Retrieve a single lead.
curl -XGET "https://api.close.com/api/v1/lead/{id}/{?_fields}"
Response Headers
content-type: application/json
Response Body
{
"status_id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_label": "Potential",
"tasks": [],
"display_name": "Wayne Enterprises (Sample Lead)",
"addresses": [],
"name": "Wayne Enterprises (Sample Lead)",
"contacts": [
{
"name": "Bruce Wayne",
"title": "The Dark Knight",
"date_updated": "2013-02-06T20:53:01.954000+00:00",
"phones": [
{
"phone": "+16503334444",
"phone_formatted": "+1 650-333-4444",
"type": "office"
}
],
"custom.ccf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "CEO",
"created_by": null,
"id": "cont_o0kP3Nqyq0wxr5DLWIEm8mVr6ZpI0AhonKLDG0V5Qjh",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-01T00:54:51.331000+00:00",
"emails": [
{
"type": "office",
"email": "thedarkknight@close.com"
}
],
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
}
],
"custom.lcf_ORxgoOQ5YH1p7lDQzFJ88b4z0j7PLLTRaG66m8bmcKv": "Website contact form",
"custom.lcf_nenE344jkwrjyRRezwsf8b4V1MCoXWIDHIStmFavZks": ["Choice 1", "Choice 2"],
"date_updated": "2013-02-06T20:53:01.977000+00:00",
"html_url": "https://app.close.com/lead/lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O/",
"created_by": null,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"url": null,
"opportunities": [
{
"status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_label": "Active",
"status_type": "active",
"date_won": null,
"confidence": 75,
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"contact_id": null,
"updated_by": null,
"date_updated": "2013-02-01T00:54:51.337000+00:00",
"value_period": "one_time",
"created_by": null,
"note": "Bruce needs new software for the Bat Cave.",
"value": 50000,
"value_formatted": "$500",
"value_currency": "USD",
"lead_name": "Wayne Enterprises (Sample Lead)",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-01T00:54:51.337000+00:00",
"user_name": "John Doe",
"id": "oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt",
"lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O"
},
{
"id": "oppo_klajsdflf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
"lead_name": "Wayne Enterprises (Sample Lead)",
"status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_label": "Active",
"status_type": "active",
"value": 5000,
"value_period": "monthly",
"value_formatted": "$50 monthly",
"value_currency": "USD",
"date_won": null,
"confidence": 75,
"note": "Bat Cave monthly maintenance cost",
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"user_name": "John Doe",
"contact_id": null,
"created_by": null,
"updated_by": null,
"date_created": "2013-02-01T00:54:51.337000+00:00",
"date_updated": "2013-02-01T00:54:51.337000+00:00"
}
],
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"date_created": "2013-02-01T00:54:51.333000+00:00",
"id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
"description": ""
}
Create a new lead
Create a new lead. Contacts, addresses, and custom fields can all be nested in the lead. Currently, activities, tasks, and opportunities must be posted separately.
status and status_id (optional)
- Optionally post either
status
orstatus_id
(but not both). If neither property exists, the organization's default (first) status will be used when creating new leads. - (Recommended) Use
status_id
(like in the example payload), so that users can rename statuses in the UI without breaking your implementation. - Alternatively, you can post a
status
containing the label of an already-created status object.
custom.FIELD_ID (optional)
- You can set custom fields by setting
custom.FIELD_ID
to the field value, where FIELD_ID is the ID of the custom field, e.g.:
{
"custom.lcf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c": "value",
"custom.lcf_8wtBWsdRU2Fur7GDnEeXQ7ra2Vu7R4hG1SNYdiEhh0F": "other value"
}
- Note that if a custom field has
accepts_multiple_values: true
, the entire value will be replaced. For example, given a Lead has a Custom Choice Field with value["A", "B"]
, adding choice"C"
would mean setting the value to["A", "B", "C"]
. Note that using the
custom
field dict or thecustom.FIELD_NAME
syntax (instead of custom field IDs) is deprecated and will be removed from the API.See the Custom Fields paragraph for more details.
curl -XPOST "https://api.close.com/api/v1/lead/"
Request Headers
content-type: application/json
Request Body
{
"name": "Bluth Company",
"url": "http://thebluthcompany.tumblr.com/",
"description": "Best. Show. Ever.",
"status_id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"contacts": [
{
"name": "Gob",
"title": "Sr. Vice President",
"emails": [
{
"type": "office",
"email": "gob@example.com"
}
],
"phones": [
{
"type": "office",
"phone": "8004445555"
}
]
}
],
"custom.lcf_ORxgoOQ5YH1p7lDQzFJ88b4z0j7PLLTRaG66m8bmcKv": "Website contact form",
"custom.lcf_nenE344jkwrjyRRezwsf8b4V1MCoXWIDHIStmFavZks": ["Choice 1", "Choice 2"],
"custom.lcf_FSYEbxYJFsnY9tN1OTAPIF33j7Sw5Lb7Eawll7JzoNh": "Segway",
"custom.lcf_bA7SU4vqaefQLuK5UjZMVpbfHK4SVujTJ9unKCIlTvI": "Real Estate",
"addresses": [
{
"label": "business",
"address_1": "747 Howard St",
"address_2": "Room 3",
"city": "San Francisco",
"state": "CA",
"zipcode": "94103",
"country":"US",
}
]
}
Response Headers
content-type: application/json
Response Body
{
"status_id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_label": "Potential",
"tasks": [],
"display_name": "Bluth Company",
"addresses": [
{
"address_1": "747 Howard St",
"address_2": "Room 3",
"city": "San Francisco",
"state": "CA",
"zipcode": "94103",
"country": "US"
}
],
"name": "Bluth Company",
"contacts": [
{
"name": "Gob",
"title": "sr. vice president",
"date_updated": "2013-02-20T05:30:24.844000+00:00",
"phones": [
{
"phone": "+18004445555",
"phone_formatted": "+1 800-444-5555",
"type": "office"
}
],
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"id": "cont_qpjDKxbN3WWsuhaJjg2Qr9pkqHqe1yviZ5BS0dEyz05",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-20T05:30:24.844000+00:00",
"emails": [
{
"type": "office",
"email": "gob@example.com"
}
],
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
}
],
"date_updated": "2013-02-20T05:30:24.854000+00:00",
"html_url": "https://app.close.com/lead/lead_70jZ5hiVt5X31MZ3vJ0R0GJMqJEihkoF7TtSVFbN2ty/",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"custom.lcf_ORxgoOQ5YH1p7lDQzFJ88b4z0j7PLLTRaG66m8bmcKv": "Website contact form",
"custom.lcf_nenE344jkwrjyRRezwsf8b4V1MCoXWIDHIStmFavZks": ["Choice 1", "Choice 2"],
"custom.lcf_FSYEbxYJFsnY9tN1OTAPIF33j7Sw5Lb7Eawll7JzoNh": "Segway",
"custom.lcf_bA7SU4vqaefQLuK5UjZMVpbfHK4SVujTJ9unKCIlTvI": "Real Estate",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"url": "http://thebluthcompany.tumblr.com/",
"opportunities": [],
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"date_created": "2013-02-20T05:30:24.854000+00:00",
"id": "lead_70jZ5hiVt5X31MZ3vJ0R0GJMqJEihkoF7TtSVFbN2ty",
"description": "Best. Show. Ever."
}
Update an existing lead
Update an existing lead. Supports non-destructive patches.
status:
- See description for
status
andstatus_id
inPOST /lead/
above.
custom.FIELD_ID (optional)
- See description for
custom.FIELD_ID
inPOST /lead/
above. - Additionally, you can unset a single field by using
{ "custom.FIELD_ID": null }
, e.g.:
{ "custom.lcf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c": null }
- If the custom field you are trying to update accepts multiple values, you can also specify
.add
or.remove
as part of the field key to add/remove a single value to/from a list of values, e.g.:
{ "custom.lcf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c.add": "Wednesday" }
adds Wednesday to the list of values which already exist on the given lead.
curl -XPUT "https://api.close.com/api/v1/lead/{id}/"
Request Headers
content-type: application/json
Request Body
{
"description": "Best show ever canceled. Sad."
}
Response Headers
content-type: application/json
Response Body
{
"status_id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_label": "Potential",
"tasks": [],
"display_name": "Bluth Company",
"addresses": [],
"name": "Bluth Company",
"contacts": [
{
"name": "Gob",
"title": "sr. vice president",
"date_updated": "2013-02-20T05:43:41.611000+00:00",
"phones": [
{
"phone": "+18004445555",
"phone_formatted": "+1 800-444-5555",
"type": "office"
}
],
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"id": "cont_qpjDKxbN3WWsuhaJjg2Qr9pkqHqe1yviZ5BS0dEyz05",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-20T05:30:24.844000+00:00",
"emails": [
{
"type": "office",
"email": "gob@example.com"
}
],
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
}
],
"date_updated": "2013-02-20T05:43:41.622000+00:00",
"html_url": "https://app.close.com/lead/lead_70jZ5hiVt5X31MZ3vJ0R0GJMqJEihkoF7TtSVFbN2ty/",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"url": "http://thebluthcompany.tumblr.com/",
"opportunities": [],
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"date_created": "2013-02-20T05:30:24.854000+00:00",
"id": "lead_70jZ5hiVt5X31MZ3vJ0R0GJMqJEihkoF7TtSVFbN2ty",
"description": "Best show ever canceled. Sad."
}
Delete a lead
Delete a lead
curl -XDELETE "https://api.close.com/api/v1/lead/{id}/"
Response Headers
content-type: application/json
Response Body
{}
Merge two leads
Merge two leads. For details and definitions of 'source' and 'destination', see the Merge Leads feature in the UI.
curl -XPOST "https://api.close.com/api/v1/lead/merge/"
Request Headers
content-type: application/json
Request Body
{
"source": "lead_JCTqyXSXD42eGO6PlWOe5ase8VRDCpE7ITYti8Th2Ei",
"destination": "lead_6ivpsIOFYDEwCUz8sdftdoWqlKpLSNOAg9glZSLvZEG"
}
Response Headers
Response Body
{}
Contacts
Contacts represent individual people within a company/organization that you're selling to.
Each contact belongs to exactly one Lead and can contain multiple phone numbers, email addresses and URLs, and be associated with one or more Contact Custom Fields.
If you're querying/searching for specific contacts, it's usually best to query the Leads endpoint (with a query
parameter) instead of the Contacts endpoint directly. Then from your lead results you can inspect children Contacts.
List contacts
List contacts.
curl -XGET "https://api.close.com/api/v1/contact/"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"name": "Tobias Fünke",
"title": "Blue Man Group (Understudy)",
"date_updated": "2013-02-06T20:53:09.334000+00:00",
"phones": [],
"created_by": null,
"id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-01T00:54:51.300000+00:00",
"emails": [
{
"type": "office",
"email": "tobiasfunke@close.com"
}
],
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
},
{
"name": "Bruce Wayne",
"title": "The Dark Knight",
"date_updated": "2013-02-06T20:53:01.954000+00:00",
"phones": [
{
"country": "US",
"phone": "+16503334444",
"phone_formatted": "+1 650-333-4444",
"type": "office"
}
],
"created_by": null,
"id": "cont_o0kP3Nqyq0wxr5DLWIEm8mVr6ZpI0AhonKLDG0V5Qjh",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-01T00:54:51.331000+00:00",
"emails": [
{
"type": "office",
"email": "thedarkknight@close.com"
}
],
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"custom.ccf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "CEO"
},
{
"name": "Gob Bluth",
"title": "Magician",
"date_updated": "2013-02-06T20:48:55.240000+00:00",
"phones": [],
"created_by": null,
"id": "cont_E7dYM0ecRoFQosxiPFz8IxazhN4k11uW8Sh1UsXjNjo",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-01T00:54:51.298000+00:00",
"emails": [
{
"type": "office",
"email": "bluth@close.com"
}
],
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
},
{
"name": "Close Support",
"title": null,
"date_updated": "2013-02-01T00:59:33.689000+00:00",
"phones": [
{
"country": "US",
"phone": "+18552567346",
"phone_formatted": "+1 855-256-7346",
"type": "office"
}
],
"created_by": null,
"id": "cont_uw6ONU4iBcQg4TyqOKAwl0F1amULG9ZZsY57kHHdJNE",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-01T00:54:51.203000+00:00",
"emails": [
{
"type": "office",
"email": "support@close.com"
}
],
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
},
{
"name": "phil",
"title": "",
"date_updated": "2013-02-08T05:02:39.552000+00:00",
"phones": [],
"created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"id": "cont_eXZwc2SVL4G3xSR85jnfPny2ykvoAQndSyi1Doa2YLO",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-08T05:02:39.552000+00:00",
"emails": [
{
"type": "office",
"email": "phil@close.com"
}
],
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
},
{
"name": "Gob",
"title": "sr. vice president",
"date_updated": "2013-02-20T05:44:14.700000+00:00",
"phones": [
{
"country": "US",
"phone": "+18004445555",
"phone_formatted": "+1 800-444-5555",
"type": "office"
}
],
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"id": "cont_qpjDKxbN3WWsuhaJjg2Qr9pkqHqe1yviZ5BS0dEyz05",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-20T05:30:24.844000+00:00",
"emails": [
{
"type": "office",
"email": "gob@example.com"
}
],
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
},
{
"name": "Gob",
"title": "sr. vice president",
"date_updated": "2013-02-20T05:44:31.929000+00:00",
"phones": [
{
"country": "US",
"phone": "+18004445555",
"phone_formatted": "+1 800-444-5555",
"type": "office"
}
],
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"id": "cont_kfaRMPzwQ9yAOn96gVGUxKRKqsYv6QJStoLhlDEpquY",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-20T05:44:31.929000+00:00",
"emails": [
{
"type": "office",
"email": "gob@example.com"
}
],
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
},
{
"name": "Gob",
"title": "sr. vice president",
"date_updated": "2013-02-20T05:44:35.625000+00:00",
"phones": [
{
"country": "US",
"phone": "+18004445555",
"phone_formatted": "+1 800-444-5555",
"type": "office"
}
],
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"id": "cont_3lUrUYmceYjzeqrIqF5jpSppZemyxvgquE8Oq1kM6p0",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-20T05:44:35.625000+00:00",
"emails": [
{
"type": "office",
"email": "gob@example.com"
}
],
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
}
]
}
Fetch a single contact
Fetch a single contact
curl -XGET "https://api.close.com/api/v1/contact/{id}/"
Response Headers
content-type: application/json
Response Body
{
"id": "cont_3lUrUYmceYjzeqrIqF5jpSppZemyxvgquE8Oq1kM6p0",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_etYl6PwL12hkj14567kjolJwZuZehb9b85EDH9CKuAI",
"name": "Gob",
"title": "sr. vice president",
"phones": [
{
"country": "US",
"phone": "+18004445555",
"phone_formatted": "+1 800-444-5555",
"type": "office"
}
],
"emails": [
{
"type": "office",
"email": "gob@example.com"
}
],
"date_created": "2013-02-20T05:44:35.625000+00:00",
"date_updated": "2013-02-20T05:44:35.625000+00:00",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
}
Create a new contact
Create a new contact
curl -XPOST "https://api.close.com/api/v1/contact/"
Request Headers
content-type: application/json
Request Body
{
"lead_id":"lead_QyNaWw4fdSwxl5Mc5daMFf3Y27PpIcH0awPbC9l7uyo",
"name":"John Smith",
"title":"President",
"phones":[
{"phone":"9045551234","type":"mobile"}
],
"emails":[
{"email":"john@example.com","type":"office"}
],
"urls":[
{"url":"http://twitter.com/google/","type":"url"}
],
"custom.ccf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "Account Executive"
}
Response Headers
content-type: application/json
Response Body
{
"id": "cont_sNIdBgngvbdTTEN1mspKgUqKAWfbul4IITvnWoRw1T7",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"name": "John Smith",
"title": "President",
"date_updated": "2013-03-07T23:23:21.495000+00:00",
"created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"date_created": "2013-03-07T23:23:21.495000+00:00",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"phones":[
{
"country": "US",
"phone": "+19045551234",
"phone_formatted": "+1 904-555-1234",
"type": "mobile"
}
],
"emails":[
{"email":"john@example.com","type":"office"}
],
"urls":[
{"url":"http://twitter.com/google/","type":"url"}
],
"custom.ccf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "Account Executive",
}
Update an existing contact
Update an existing contact.
If you're trying to update a custom field and that custom field accepts multiple values, you can also specify .add
or .remove
as part of the field key to add/remove a single value to/from a list of values, e.g.:
{ "custom.ccf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c.add": "Wednesday" }
adds Wednesday to the list of values which already exist on the given contact.
curl -XPUT "https://api.close.com/api/v1/contact/{id}/"
Request Headers
content-type: application/json
Request Body
{
"name":"Johnny Smith",
}
Response Headers
content-type: application/json
Response Body
{
"id": "cont_sNIdBgngvbdTTEN1mspKgUqKAWfbul4IITvnWoRw1T7",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id":"lead_QyNaWw4fdSwxl5Mc5daMFf3Y27PpIcH0awPbC9l7uyo",
"name": "Johnny Smith",
"title": "President",
"date_updated": "2013-03-08T13:13:21.495000+00:00",
"created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"date_created": "2013-03-07T23:23:21.495000+00:00",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"phones":[
{
"country": "US",
"phone": "+19045551234",
"phone_formatted": "+1 904-555-1234",
"type": "mobile"
}
],
"emails":[
{"email":"john@example.com","type":"office"}
],
"urls":[
{"url":"http://twitter.com/google/","type":"url"}
],
"custom.ccf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "Sales Rep"
}
Delete a contact
Activities
Activities belong to Leads and can represent any type of activity that was performed on a Lead or its Contacts (e.g. Calls, Emails, Notes, etc.).
List or filter all activity types
List or filter all activity types.
To list only a specific activity type (e.g., only Call
or LeadStatusChange
), use the other resources listed separately. When querying activities for a single lead (using the lead_id
parameter), you can ask for multiple activity types using _type__in
.
When listing Custom Activities, _type
and _type__in
can include Custom Activity Type ids (e.g. actitype_1h5m6uHM9BZOpwVhyRJb4Y
) to filter by a specific custom activity type or Custom
to list custom activities of any type.
The following filtering parameters can only be used for listing activities on a single lead (using the lead_id
parameter): user_id
, user_id__in
, contact_id
, contact_id__in
, _type
, _type__in
.
thread_emails
parameter:
- (Default) when this parameter is not present,
Email
objects will be returned for each email message. - A value of
true
will returnEmailThread
objects representing email conversations. Stripped-down version ofEmail
objects will also be returned. - A value of
only
will returnEmailThread
objects representing email conversations.Email
objects will not be returned.
curl -XGET "https://api.close.com/api/v1/activity/{?lead_id, user_id, user_id__in, contact_id, contact_id__in, _type, _type__in, date_created__gt, date_created__lt, _fields}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"_type": "Created",
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"user_name": "Bruce Wayne",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_name": "Bruce Wayne",
"date_updated": "2013-02-20T05:44:35.667000+00:00",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"created_by_name": "Bruce Wayne",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"source": "api",
"contact_id": null,
"date_created": "2013-02-20T05:44:35.636000+00:00",
"id": "acti_ICUkwteuKAaJvhNqF1QBoVOWKQuSbFuOYoZxGeWQAeg",
"lead_id": "lead_pqXrF8figcDHN7HvaXmb4wTjpxnxpmqheEyjTYPfdi5"
},
{
"_type": "Created",
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"user_name": "Bruce Wayne",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_name": "Bruce Wayne",
"date_updated": "2013-02-20T05:44:31.955000+00:00",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"created_by_name": "Bruce Wayne",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"source": "api",
"contact_id": null,
"date_created": "2013-02-20T05:44:31.940000+00:00",
"id": "acti_k8u1xLU5G9L0YLkxLqAHEZFB84oB7fN9vqjCgljfcFN",
"lead_id": "lead_6SY1tPBB1EnQneopPGSLsAmXVkTRf4P0r6Y6ntdPowL"
},
{
"_type": "Created",
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"user_name": "Bruce Wayne",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_name": "Bruce Wayne",
"date_updated": "2013-02-20T05:30:24.870000+00:00",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"created_by_name": "Bruce Wayne",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"source": "api",
"contact_id": null,
"date_created": "2013-02-20T05:30:24.854000+00:00",
"id": "acti_0wDacWkNoKKVn7I8wCuEc1XbQ7lGQxCgZ9WNQn71P8j",
"lead_id": "lead_70jZ5hiVt5X31MZ3vJ0R0GJMqJEihkoF7TtSVFbN2ty"
},
{
"attachments": [],
"body_text": "Cool!\n\nThis is rad. <3\n\n\n______________________________________________\nSent via http://close.com/ - sales communication made simple",
"date_updated": "2013-02-08T05:03:16.281000+00:00",
"direction": "outgoing",
"contact_id": "cont_eXZwc2SVL4G3xSR85jnfPny2ykvoAQndSyi1Doa2YLO",
"id": "acti_C4DFcBED1FwLSDqn853hjc979h7DIuH2vwABzGWhRAO",
"user_id": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"user_name": "Bruce Wayne",
"created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"created_by_name": "Bruce Wayne",
"to": [
"phil@close.com"
],
"subject": "Testing testing!!!!",
"opens": [],
"status": "sent",
"_type": "Email",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"updated_by_name": "Bruce Wayne",
"envelope": {
"from": [
{
"email": "phil@close.com",
"name": "Phil Freo"
}
],
"sender": [
{
"email": "phil@close.com",
"name": "Phil Freo"
}
],
"to": [
{
"email": "phil@close.com",
"name": ""
}
],
"cc": [],
"bcc": [],
"reply_to": [],
"date": "Fri, 08 Feb 2013 05:03:15 +0000",
"in_reply_to": null,
"message_id": "<20130208050314.11553.33819@ec2-54-245-86-79.us-west-2.compute.amazonaws.com>",
"subject": "Testing testing!!!!"
},
"body_html": "Cool!<br>\n<br>\nThis is rad. <3<br>\n<br><br>______________________________________________<br>Sent via <a href='http://close.com/?utm_source=signature&utm_medium=email&utm_campaign=signature'>Close</a> – sales communication made simple",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"body_text_quoted": [
{
"text": "Cool!\n\nThis is rad. <3\n\n\n______________________________________________\nSent via http://close.com/ - sales communication made simple",
"expand": true
}
],
"send_attempts": [],
"lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h",
"sender": "phil@close.com",
"bcc": [],
"date_created": "2013-02-08T05:02:42.050000+00:00",
"template_id": null,
"cc": []
},
{
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"_type": "Note",
"user_id": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"user_name": "Bruce Wayne",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"updated_by_name": "Bruce Wayne",
"date_updated": "2013-02-01T01:06:35.668000+00:00",
"created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"created_by_name": "Bruce Wayne",
"note": "Welcome to Close! Get started by:\n\n1. Import your leads! Use our \"Bulk CSV Upload\" tool by clicking your name in the top right. Add leads manually by clicking \"New Lead\" in the lower left.\n\n2. Invite your co-workers!\n\n3. Setup two-way syncing of your emails by going to Settings -> Email Settings.",
"contact_id": null,
"date_created": "2013-02-01T01:05:04.070000+00:00",
"id": "acti_XOyG7jURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak",
"lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h"
},
{
"attachments": [],
"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!",
"date_updated": "2013-02-01T00:56:04.184000+00:00",
"direction": "incoming",
"contact_id": "cont_8NNOJnVwmHQEYuVOgJ4B4zU7g9RUxYH4JnPjza5Vr6t",
"id": "acti_WuIVvTT9b3zLmOOWalxK0OrqtdkxEEdu4mNr1TPGb2o",
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"user_name": "Bruce Wayne",
"created_by": null,
"to": [
"phil+sample@close.com"
],
"subject": "Welcome to Close!",
"opens": [],
"status": "inbox",
"_type": "Email",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"updated_by_name": "Bruce Wayne",
"envelope": {
"from": [
{
"email": "karan@close.com",
"name": ""
}
],
"sender": [
{
"email": "karan@close.com",
"name": ""
}
],
"to": [
{
"email": "phil+sample@close.com",
"name": ""
}
],
"cc": [],
"bcc": [],
"reply_to": [],
"date": "Fri, 01 Feb 2013 00:54:51 +0000",
"in_reply_to": null,
"message_id": "<20130201005451.14369.20369@ec2-54-245-86-79.us-west-2.compute.amazonaws.com>",
"subject": "Welcome to Close!"
},
"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!",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"body_text_quoted": [
{
"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!",
"expand": true
}
],
"send_attempts": [],
"lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h",
"sender": "karan@close.com",
"bcc": [],
"date_created": "2013-02-01T00:54:51.274000+00:00",
"template_id": null,
"cc": []
}
]
}
List or filter all Created activities
List or filter all Created activities.
curl -XGET "https://api.close.com/api/v1/activity/created/{?lead_id, user_id, date_created__gt, date_created__lt}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"_type": "Created",
"contact_id": null,
"created_by": "user_rvXdcXaK4bHVRx4F3NLilX0devg9jBImlp3v6D9IYqh",
"created_by_name": "Bruce Wayne",
"date_created": "2015-10-27T03:55:41.251000+00:00",
"date_updated": "2015-10-27T03:55:41.252000+00:00",
"id": "acti_Lx3fnL9Mq77beBRaMEQmk6rZqxUTVIIQ4MjFFGQ772y",
"import_id": null,
"lead_id": "lead_1aW9yllGxSZwPa3E8lf3IkBJpVHTjJUrsM2rX9n9nSX",
"organization_id": "orga_Bkhj8tDhPUehdIKungGNdFKJL9e8qkj8kn00oMfxq8l",
"source": "ui",
"updated_by": "user_rvXdcXaK4bHVRx4F3NLilX0devg9jBImlp3v6D9IYqh",
"updated_by_name": "Bruce Wayne",
"user_id": "user_rvXdcXaK4bHVRx4F3NLilX0devg9jBImlp3v6D9IYqh",
"user_name": "Bruce Wayne",
"users": []
}
]
}
List or filter all Note activities
List or filter all Note activities.
curl -XGET "https://api.close.com/api/v1/activity/note/{?lead_id, user_id, date_created__gt, date_created__lt}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"_type": "Note",
"user_id": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"user_name": "Bruce Wayne",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"updated_by_name": "Bruce Wayne",
"date_updated": "2013-02-01T01:06:35.668000+00:00",
"created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"created_by_name": "Bruce Wayne",
"note": "Welcome to Close! Get started by:\n\n1. Import your leads! Use our \"Bulk CSV Upload\" tool by clicking your name in the top right. Add leads manually by clicking \"New Lead\" in the lower left.\n\n2. Invite your co-workers!\n\n3. Setup two-way syncing of your emails by going to Settings -> Email Settings.",
"contact_id": null,
"date_created": "2013-02-01T01:05:04.070000+00:00",
"id": "acti_XOyG7jURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak",
"lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h"
}
]
}
List or filter all EmailThread activities
List or filter all EmailThread activities.
You'll get one object per email conversation (generally grouped by subject).
curl -XGET "https://api.close.com/api/v1/activity/emailthread/{?lead_id, user_id, date_created__gt, date_created__lt}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"_type": "EmailThread",
"emails": [
{
"_type": "Email",
"status": "sent",
"sender": "Steli Efti <steli@close.com>",
"subject": "Excited to have you on board!",
"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",
"to": [
"karen@example.com"
],
"cc": [],
"bcc": [],
"direction": "outgoing",
"date_sent": "2014-12-07T04:10:46+00:00",
"contact_id": "cont_alksdjfalksdfj8NzQM56BzBZ8X2GWaowuifsOeWyeJ",
"created_by": null,
"created_by_name": null,
"date_created": "2014-12-07T04:10:46+00:00",
"date_updated": "2014-12-07T04:11:00.459000+00:00",
"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
}
]
},
"id": "acti_12342j3451lk25iH1Rrtk9LWxwpUZmHygjww4c5iFw4",
"in_reply_to_id": null,
"lead_id": "lead_5cIz6MHYMYEJLDTJRzoyfLHAMymuWlPweEMvslHoBf5",
"message_ids": [
"<5483d346af89c_c0031a60fdc11130711c@ns5001546.ip-192-95-32.net.mail>"
],
"opens": [],
"opens_summary": null,
"organization_id": "orga_abcdefghijklmnoOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"references": [],
"send_attempts": [],
"template_id": null,
"template_name": null,
"thread_id": "acti_giHHCV8uOniX2wuFmKY14VWqOEq5zXxWi6FQL88MoNH",
"updated_by": null,
"updated_by_name": null,
"user_id": "user_fU7Pe8JfLLEa0EgEBYNyK5ecCPKzBE31ZG0ayYJqA9n",
"user_name": "Steli Efti",
"users": [],
"attachments": [],
"sequence_subscription_id": "sub_wRlAku35U53xEV7PcNY3Qo",
"sequence_id": "seq_1BTljGuCooX0nbFoPihl07",
"sequence_name": "My Sequence"
},
{
"_type": "Email",
"to": [
"carlos@abc.com"
],
"cc": [],
"bcc": [],
"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",
"contact_id": "cont_Hw4160e5c61QoFpEkvbUeGYJ0uDMLODYfrBRLWDFHh6",
"created_by": null,
"created_by_name": null,
"date_created": "2014-11-28T17:26:00+00:00",
"date_sent": "2014-11-28T17:26:00+00:00",
"date_updated": "2014-11-28T17:26:47.740000+00:00",
"direction": "outgoing",
"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
}
]
},
"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": [],
"opens_summary": null,
"organization_id": "orga_abcdefghijklmnoOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"references": [],
"send_attempts": [],
"sender": "Steli Efti <steli@close.com>",
"status": "sent",
"subject": "Excited to have you on board!",
"template_id": null,
"template_name": null,
"thread_id": "acti_giHHCV8uOniX2wuFmKY14VWqOEq5zXxWi6FQL88MoNH",
"updated_by": null,
"updated_by_name": null,
"user_id": "user_fU7Pe8JfLLEa0EgEBYNyK5ecCPKzBE31ZG0ayYJqA9n",
"user_name": "Steli Efti",
"users": [],
"attachments": [],
"sequence_subscription_id": null,
"sequence_id": null,
"sequence_name": null
},
{
"_type": "Email",
"sender": "Steli Efti <steli@close.com>",
"status": "sent",
"subject": "Excited to have you on board!",
"to": [
"ohad@abc.com"
],
"cc": [],
"bcc": [],
"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",
"contact_id": "cont_6d0dRVHWGMvsJLFjAms1xTL0LCeQoRVWyZtpQs0Y98S",
"created_by": null,
"created_by_name": null,
"date_created": "2014-11-26T10:15:44+00:00",
"date_sent": "2014-11-26T10:15:44+00:00",
"date_updated": "2014-11-26T10:17:58.234000+00:00",
"direction": "outgoing",
"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
}
]
},
"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": [],
"opens_summary": null,
"organization_id": "orga_abcdefghijklmnoOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"references": [],
"send_attempts": [],
"template_id": null,
"template_name": null,
"thread_id": "acti_giHHCV8uOniX2wuFmKY14VWqOEq5zXxWi6FQL88MoNH",
"updated_by": null,
"updated_by_name": null,
"user_id": "user_fU7Pe8JfLLEa0EgEBYNyK5ecCPKzBE31ZG0ayYJqA9n",
"user_name": "Steli Efti",
"users": [],
"attachments": [],
"sequence_subscription_id": null,
"sequence_id": null,
"sequence_name": null
}
],
"id": "acti_giHHCV8uOnialksjdflaksjdflq5zXxWi6FQL88MoNH",
"latest_normalized_subject": "Excited to have you on board!",
"lead_id": "lead_5cIz6MHYMYEJLDTJRzoyfLHAMymuWlPweEMvslHoBf5",
"n_emails": 3,
"organization_id": "orga_abcdefghijklmnoOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"participants": [
{
"email": "steli@close.com",
"name": "Steli Efti"
}
],
"user_id": "user_fU7Pe8JfLLEa0EalksjdflakjsdfBE31ZG0ayYJqA9n",
"user_name": "Steli Efti",
"users": [
"user_fU7Pe8JfLLEa0EalksjdflakjsdfBE31ZG0ayYJqA9n"
],
"contact_id": null,
"created_by": null,
"created_by_name": null,
"updated_by": null,
"updated_by_name": null,
"date_created": "2014-12-07T04:10:46+00:00",
"date_updated": "2014-12-07T04:11:00.476000+00:00"
}
]
}
List or filter all Email activities
List or filter all Email activities.
You'll get one object per email message.
curl -XGET "https://api.close.com/api/v1/activity/email/{?lead_id, user_id, date_created__gt, date_created__lt}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"id": "acti_C4DFcBED1FwLSDqn853hjc979h7DIuH2vwABzGWhRAO",
"_type": "Email",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h",
"contact_id": "cont_eXZwc2SVL4G3xSR85jnfPny2ykvoAQndSyi1Doa2YLO",
"date_created": "2013-02-08T05:02:42.050000+00:00",
"date_updated": "2013-02-08T05:03:16.281000+00:00",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"updated_by_name": "Bruce Wayne",
"direction": "outgoing",
"user_id": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"user_name": "John Wayne",
"created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"created_by_name": "Bruce Wayne",
"sender": "phil@close.com",
"to": [
"phil@close.com"
],
"cc": [],
"bcc": [],
"subject": "Testing testing!!!!",
"envelope": {
"from": [
{
"email": "phil@close.com",
"name": "Phil Freo"
}
],
"sender": [
{
"email": "phil@close.com",
"name": "Phil Freo"
}
],
"to": [
{
"email": "phil@close.com",
"name": ""
}
],
"cc": [],
"bcc": [],
"reply_to": [],
"date": "Fri, 08 Feb 2013 05:03:15 +0000",
"in_reply_to": null,
"message_id": "<20130208050314.11553.33819@ec2-54-245-86-79.us-west-2.compute.amazonaws.com>",
"subject": "Testing testing!!!!"
},
"body_text": "Cool!\n\nThis is rad. <3\n\n\n______________________________________________\nSent via http://close.com/ - sales communication made simple",
"body_html": "Cool!<br>\n<br>\nThis is rad. <3<br>\n<br><br>______________________________________________<br>Sent via <a href='http://close.com/?utm_source=signature&utm_medium=email&utm_campaign=signature'>Close</a> – sales communication made simple",
"body_text_quoted": [
{
"text": "Cool!\n\nThis is rad. <3\n\n\n______________________________________________\nSent via http://close.com/ - sales communication made simple",
"expand": true
}
],
"attachments":[
{
"url": "https://closeio-filepicker.s3.amazonaws.com/Cji8OPSg39M%3Dscreenshot.png",
"filename": "screenshot.png",
"size": 1108447,
"content_type": "image/png"
}
],
"status": "sent",
"opens": [],
"template_id": null,
"send_attempts": [],
"sequence_subscription_id": "sub_wRlAku35U53xEV7PcNY3Qo",
"sequence_id": "seq_1BTljGuCooX0nbFoPihl07",
"sequence_name": "My Sequence"
},
{
"attachments": [],
"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!",
"date_updated": "2013-02-01T00:56:04.184000+00:00",
"direction": "incoming",
"contact_id": "cont_8NNOJnVwmHQEYuVOgJ4B4zU7g9RUxYH4JnPjza5Vr6t",
"id": "acti_WuIVvTT9b3zLmOOWalxK0OrqtdkxEEdu4mNr1TPGb2o",
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"created_by": null,
"to": [
"phil+sample@close.com"
],
"subject": "Welcome to Close!",
"opens": [],
"status": "inbox",
"_type": "Email",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"updated_by_name": "Bruce Wayne",
"envelope": {
"from": [
{
"email": "karan@close.com",
"name": ""
}
],
"sender": [
{
"email": "karan@close.com",
"name": ""
}
],
"to": [
{
"email": "phil+sample@close.com",
"name": ""
}
],
"cc": [],
"bcc": [],
"reply_to": [],
"date": "Fri, 01 Feb 2013 00:54:51 +0000",
"in_reply_to": null,
"message_id": "<20130201005451.14369.20369@ec2-54-245-86-79.us-west-2.compute.amazonaws.com>",
"subject": "Welcome to Close!"
},
"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!",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"body_text_quoted": [
{
"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!",
"expand": true
}
],
"send_attempts": [],
"lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h",
"sender": "karan@close.com",
"bcc": [],
"date_created": "2013-02-01T00:54:51.274000+00:00",
"template_id": null,
"cc": []
}
]
}
List or filter all SMS activities
List or filter all SMS activities.
curl -XGET "https://api.close.com/api/v1/activity/sms/{?lead_id, user_id, date_created__gt, date_created__lt}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"id": "acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp",
"_type": "SMS",
"date_sent": null,
"direction": "inbound",
"status": "inbox",
"cost": "1",
"local_phone": "+16503334444",
"local_country_iso": "US",
"remote_phone": "+18183004000",
"remote_phone_formatted": "+1 818-300-4000",
"remote_country_iso": "US",
"text": "SMS in Close? HUZZAH!!!",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb",
"contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk",
"user_id": "user_laksjrrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"user_name": "Tobias Fuenke",
"created_by": null,
"created_by_name": null,
"updated_by": null,
"updated_by_name": null,
"date_created": "2016-10-03T16:06:11.167000+00:00",
"date_updated": "2016-10-03T16:06:11.167000+00:00"
}
]
}
List or filter all Call activities
List or filter all Call activities.
A Call is made:
- via calling a lead directly or receiving an incoming call from one (regular call)
- via the dialer using the power behavior (power dialer call)
- via the dialer using the predictive behavior (predictive dialer call)
This is exposed in the call_method
field that can have the values regular
, power
or predictive
respectively.
Every call also has a disposition
associated with it. The values can be:
answered
if the call was answered.no-answer
if the call was not answered.vm-answer
if a call was sent to voicemail, but the caller hung up without leaving a message (currently only applicable to incoming calls).vm-left
if a voicemail was left on an incoming call or dropped on an outgoing call.busy
if the call was not connected because the destination was busy.blocked
if Close did not allow the call to take place, e.g. due to the number being invalid.error
if an unexpected error occurred in Close or on our carrier's side.abandoned
if the call was abandoned. This can only happen with the predictive dialer if no sales rep is available for a connected call.
The cost
of the call is in US cents and is a decimal number.
curl -XGET "https://api.close.com/api/v1/activity/call/{?lead_id, user_id, date_created__gt, date_created__lt}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"_type": "Call",
"voicemail_url": null,
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"date_updated": "2013-02-20T06:34:35.656000+00:00",
"recording_url": null,
"voicemail_duration": null,
"direction": "outbound",
"disposition": "answered",
"source": "Close.io",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"note": "",
"local_phone": "+16505556666",
"local_phone_formatted": "+1 650-555-6666",
"remote_phone": "+16503334444",
"remote_phone_formatted": "+1 650-333-4444",
"phone": "+16503334444",
"contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk",
"date_created": "2013-02-20T06:34:33.637000+00:00",
"duration": 10,
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"id": "acti_Ay0QqN91HKAHVQUesISYV8QlhDobGfWb1Ui3TE75pJR",
"lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp",
"call_method": "regular",
"dialer_id": null,
"dialer_saved_search_id": null,
"cost": "2",
"local_country_iso": "US",
"remote_country_iso": "US"
}
]
}
List or filter all Meeting activities
List or filter all Meeting activities.
A meeting activity can have the following statuses:
upcoming
if the meeting is in the futurein-progress
if the meeting is currently in progresscompleted
if the meeting happened and has endedcanceled
if the meeting was deleted from all synced calendars, all participants that exist as contacts on a lead were removed from the meeting, or the meeting was moved to an "all day" event after it was synced on a lead pagedeclined-by-lead
if at least one contact on the lead that is a part of the attendees list declined the meeting, and no other contacts on the lead accepted the meetingdeclined-by-org
if all Close users on the meeting declined to attend
Each contact in the attendees
array can have the following statuses:
noreply
if the attendee has yet to reply to the meeting inviteyes
if the attendee has replied yes to the meeting inviteno
if the attendee has replied no to the meeting invitemaybe
if the attendee has replied maybe to the meeting invite
The is_recurring
will be true
if a meeting is a recurring meeting on your Google Calendar.
The date_created
field on Meeting activities refers to the date and time the meeting starts, not the date and time when the Meeting activity was first synced to the lead in Close.
curl -XGET "https://api.close.com/api/v1/activity/meeting/{?lead_id, user_id, date_created__gt, date_created__lt}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"date_updated": "2019-10-11T16:18:17.942000+00:00",
"created_by_name": "Eric Engoron",
"contact_id": null,
"duration": 3600,
"id": "acti_qwA2IPmjYyMQQ2UWuNxBOtc2CbZtRUOb5JkS1i3Qo1b",
"updated_by_name": "Eric Engoron",
"updated_by": "user_Fj6qRwtrsJHIZLveF1SBFYQfL1irF92gUwLcHgyh7hn",
"attendees": [
{
"status": "noreply",
"user_id": null,
"name": "Bruce Wayne",
"contact_id": "cont_V3RuqD9VJKJWOtPsoH7EMy3MnKoFED2Ulgd4g87Ayqc",
"is_organizer": false,
"email": "bruce@wayneenterprises.com"
},
{
"status": "yes",
"user_id": "user_Fj6qRwtrsJHIZLveF1SBFYQfL1irF92gUwLcHgyh7hn",
"name": null,
"contact_id": null,
"is_organizer": true,
"email": "eric@close.io"
}
],
"title": "Bruce Wayne Interview",
"created_by": "user_Fj6qRwtrsJHIZLveF1SBFYQfL1irF92gUwLcHgyh7hn",
"calendar_event_link": "https://www.google.com/calendar/event?eid=NzlrNGRoMmk5bm9jZDEwOGtjMmY3Y2RzODggZXJpY0BjbG9zZS5pbw",
"note": "──────────\nEric Engoron is inviting you to a scheduled Zoom meeting to find out if you're really Batman.\n\nJoin Zoom Meeting\nhttps://zoom.us/j/zoommeeting\n\n──────────",
"source": "calendar",
"location": "https://zoom.us/j/zoommeeting",
"user_name": "Eric Engoron",
"status": "upcoming",
"_type": "Meeting",
"users": [
"user_Fj6qRwtrsJHIZLveF1SBFYQfL1irF92gUwLcHgyh7hn"
],
"organization_id": "orga_OFkz961guT4YZzCZ1kFlxDSVfHq4tLDsWshAoYopdjF",
"user_id": "user_Fj6qRwtrsJHIZLveF1SBFYQfL1irF92gUwLcHgyh7hn",
"ends_at": "2019-10-11T17:30:00+00:00",
"connected_account_id": "emailacct_OoSyqxjm1HbuxcRsOyrm2SwR1uOTBdHKPdhAaf9mhUp",
"is_recurring": false,
"lead_id": "lead_Qq33JAqr6zrgqtJGkKv7XQxTnQxpTEJA7Mfcx98ZrWe",
"starts_at": "2019-10-11T16:30:00+00:00",
"date_created": "2019-10-11T16:30:00+00:00"
}
]
}
List or filter all LeadStatusChange activities
List or filter all LeadStatusChange activities.
curl -XGET "https://api.close.com/api/v1/activity/status_change/lead/{?lead_id, user_id, date_created__gt, date_created__lt}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"organization_id": "orga_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"_type": "LeadStatusChange",
"contact_id": null,
"created_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"created_by_name": "Anthony Nemitz",
"date_created": "2013-08-23T20:57:45.956000+00:00",
"date_updated": "2013-08-23T20:57:45.956000+00:00",
"lead_id": "lead_DwJwyY8nynRQicBMFPFccrbAJHT1bxv7t31UiphS9kv",
"new_status_id": "stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8",
"new_status_label": "Trial Qualified",
"old_status_id": "stat_TRuQucMjSlSSV6cGAQixHBNyU2FS9zDyixNguwlfXxu",
"old_status_label": "Trial",
"updated_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by_name": "Anthony Nemitz",
"user_id": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"user_name": "Anthony Nemitz",
"id": "acti_jSqoxKYTY522iEfrKfKzqjhw5zP8uS59SQx38KGbbhx"
}
]
}
List or filter all OpportunityStatusChange activities
List or filter all OpportunityStatusChange activities.
curl -XGET "https://api.close.com/api/v1/activity/status_change/opportunity/{?lead_id, opportunity_id, user_id, date_created__gt, date_created__lt}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"organization_id": "orga_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"_type": "OpportunityStatusChange",
"contact_id": null,
"created_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"created_by_name": "Anthony Nemitz",
"date_created": "2013-08-23T21:21:11.862000+00:00",
"date_updated": "2013-08-23T21:21:11.862000+00:00",
"lead_id": "lead_0VaTsortzKpCv1ik6hbNoudduuD0m2Itevet0fKX39G",
"new_status_id": "stat_DetsqwxFOOHx2JnhqtovutN3zeuARGfzB21x5t1W88G",
"new_status_label": "Won",
"new_status_type": "won",
"new_pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j",
"old_status_id": "stat_ue534UFRaocoMJJA9CYCwnMsRJP2qt6YGnpZOAx7ckK",
"old_status_label": "Active",
"old_status_type": "active",
"old_pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j",
"opportunity_date_won": "2013-08-23",
"opportunity_id": "oppo_fn2kSFXS06akJ7XisR7vQQeObyK4upCc43RiAx1Vyz6",
"opportunity_value": 0,
"opportunity_value_formatted": null,
"opportunity_value_currency": "USD",
"updated_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by_name": "Anthony Nemitz",
"user_id": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"user_name": "Anthony Nemitz",
"id": "acti_CAI2lO44gRLMIvgsKfPZghRyuv1h8S3l7c4cDznXukd"
}
]
}
List or filter all TaskCompleted activities
List or filter all TaskCompleted activities.
curl -XGET "https://api.close.com/api/v1/activity/task_completed/{?lead_id, user_id, date_created__gt, date_created__lt}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"_type": "TaskCompleted",
"id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak",
"task_id": "task_ask2cItUeDL0jvuoJIcOocrqhqVVnLUZrEbcdM3ihhT",
"task_text": "Follow up",
"user_id": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"created_by_name": "Stefan Wójcik",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"updated_by_name": "Stefan Wójcik",
"organization_id": "orga_j23nASDFzqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h"
"date_created": "2013-02-01T01:05:04.070000+00:00",
"date_updated": "2013-02-01T01:06:35.668000+00:00",
}
]
}
Fetch a single Created activity
Fetch a single Created activity
curl -XGET "https://api.close.com/api/v1/activity/created/{id}/"
Response Headers
content-type: application/json
Response Body
{
"_type": "Created",
"contact_id": null,
"created_by": "user_rvXdcXaK4bHVRx4F3NLilX0devg9jBImlp3v6D9IYqh",
"created_by_name": "Bruce Wayne",
"date_created": "2015-10-27T03:55:41.251000+00:00",
"date_updated": "2015-10-27T03:55:41.252000+00:00",
"id": "acti_Lx3fnL9Mq77beBRaMEQmk6rZqxUTVIIQ4MjFFGQ772y",
"import_id": null,
"lead_id": "lead_1aW9yllGxSZwPa3E8lf3IkBJpVHTjJUrsM2rX9n9nSX",
"organization_id": "orga_Bkhj8tDhPUehdIKungGNdFKJL9e8qkj8kn00oMfxq8l",
"source": "ui",
"updated_by": "user_rvXdcXaK4bHVRx4F3NLilX0devg9jBImlp3v6D9IYqh",
"updated_by_name": "Bruce Wayne",
"user_id": "user_rvXdcXaK4bHVRx4F3NLilX0devg9jBImlp3v6D9IYqh",
"user_name": "Bruce Wayne",
"users": []
}
Fetch a single Note activity
Fetch a single Note activity
curl -XGET "https://api.close.com/api/v1/activity/note/{id}/"
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"_type": "Note",
"user_id": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"user_name": "Bruce Wayne",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"updated_by_name": "Bruce Wayne",
"date_updated": "2013-02-01T01:06:35.668000+00:00",
"created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"created_by_name": "Bruce Wayne",
"note": "Welcome to Close! Get started by:\n\n1. Import your leads! Use our \"Bulk CSV Upload\" tool by clicking your name in the top right. Add leads manually by clicking \"New Lead\" in the lower left.\n\n2. Invite your co-workers!\n\n3. Setup two-way syncing of your emails by going to Settings -> Email Settings.",
"contact_id": null,
"date_created": "2013-02-01T01:05:04.070000+00:00",
"id": "acti_XOyG7jURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak",
"lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h"
}
Fetch a single EmailThread activity
Fetch a single EmailThread activity
curl -XGET "https://api.close.com/api/v1/activity/emailthread/{id}/"
Response Headers
content-type: application/json
Response Body
{
"_type": "EmailThread",
"emails": [
{
"_type": "Email",
"status": "sent",
"sender": "Steli Efti <steli@close.com>",
"subject": "Excited to have you on board!",
"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",
"to": [
"karen@example.com"
],
"cc": [],
"bcc": [],
"direction": "outgoing",
"date_sent": "2014-12-07T04:10:46+00:00",
"contact_id": "cont_alksdjfalksdfj8NzQM56BzBZ8X2GWaowuifsOeWyeJ",
"created_by": null,
"created_by_name": null,
"date_created": "2014-12-07T04:10:46+00:00",
"date_updated": "2014-12-07T04:11:00.459000+00:00",
"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
}
]
},
"id": "acti_12342j3451lk25iH1Rrtk9LWxwpUZmHygjww4c5iFw4",
"in_reply_to_id": null,
"lead_id": "lead_5cIz6MHYMYEJLDTJRzoyfLHAMymuWlPweEMvslHoBf5",
"message_ids": [
"<5483d346af89c_c0031a60fdc11130711c@ns5001546.ip-192-95-32.net.mail>"
],
"opens": [],
"opens_summary": null,
"organization_id": "orga_abcdefghijklmnoOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"references": [],
"send_attempts": [],
"template_id": null,
"template_name": null,
"thread_id": "acti_giHHCV8uOniX2wuFmKY14VWqOEq5zXxWi6FQL88MoNH",
"updated_by": null,
"updated_by_name": null,
"user_id": "user_fU7Pe8JfLLEa0EgEBYNyK5ecCPKzBE31ZG0ayYJqA9n",
"user_name": "Steli Efti",
"users": [],
"attachments": [],
"sequence_subscription_id": "sub_wRlAku35U53xEV7PcNY3Qo",
"sequence_id": "seq_1BTljGuCooX0nbFoPihl07",
"sequence_name": "My Sequence"
},
{
"_type": "Email",
"to": [
"carlos@abc.com"
],
"cc": [],
"bcc": [],
"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",
"contact_id": "cont_Hw4160e5c61QoFpEkvbUeGYJ0uDMLODYfrBRLWDFHh6",
"created_by": null,
"created_by_name": null,
"date_created": "2014-11-28T17:26:00+00:00",
"date_sent": "2014-11-28T17:26:00+00:00",
"date_updated": "2014-11-28T17:26:47.740000+00:00",
"direction": "outgoing",
"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
}
]
},
"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": [],
"opens_summary": null,
"organization_id": "orga_abcdefghijklmnoOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"references": [],
"send_attempts": [],
"sender": "Steli Efti <steli@close.com>",
"status": "sent",
"subject": "Excited to have you on board!",
"template_id": null,
"template_name": null,
"thread_id": "acti_giHHCV8uOniX2wuFmKY14VWqOEq5zXxWi6FQL88MoNH",
"updated_by": null,
"updated_by_name": null,
"user_id": "user_fU7Pe8JfLLEa0EgEBYNyK5ecCPKzBE31ZG0ayYJqA9n",
"user_name": "Steli Efti",
"users": [],
"attachments": [],
"sequence_subscription_id": null,
"sequence_id": null,
"sequence_name": null
},
{
"_type": "Email",
"sender": "Steli Efti <steli@close.com>",
"status": "sent",
"subject": "Excited to have you on board!",
"to": [
"ohad@abc.com"
],
"cc": [],
"bcc": [],
"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",
"contact_id": "cont_6d0dRVHWGMvsJLFjAms1xTL0LCeQoRVWyZtpQs0Y98S",
"created_by": null,
"created_by_name": null,
"date_created": "2014-11-26T10:15:44+00:00",
"date_sent": "2014-11-26T10:15:44+00:00",
"date_updated": "2014-11-26T10:17:58.234000+00:00",
"direction": "outgoing",
"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
}
]
},
"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": [],
"opens_summary": null,
"organization_id": "orga_abcdefghijklmnoOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"references": [],
"send_attempts": [],
"template_id": null,
"template_name": null,
"thread_id": "acti_giHHCV8uOniX2wuFmKY14VWqOEq5zXxWi6FQL88MoNH",
"updated_by": null,
"updated_by_name": null,
"user_id": "user_fU7Pe8JfLLEa0EgEBYNyK5ecCPKzBE31ZG0ayYJqA9n",
"user_name": "Steli Efti",
"users": [],
"attachments": [],
"sequence_subscription_id": null,
"sequence_id": null,
"sequence_name": null
}
],
"id": "acti_giHHCV8uOnialksjdflaksjdflq5zXxWi6FQL88MoNH",
"latest_normalized_subject": "Excited to have you on board!",
"lead_id": "lead_5cIz6MHYMYEJLDTJRzoyfLHAMymuWlPweEMvslHoBf5",
"n_emails": 3,
"organization_id": "orga_abcdefghijklmnoOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"participants": [
{
"email": "steli@close.com",
"name": "Steli Efti"
}
],
"user_id": "user_fU7Pe8JfLLEa0EalksjdflakjsdfBE31ZG0ayYJqA9n",
"user_name": "Steli Efti",
"users": [
"user_fU7Pe8JfLLEa0EalksjdflakjsdfBE31ZG0ayYJqA9n"
],
"contact_id": null,
"created_by": null,
"created_by_name": null,
"updated_by": null,
"updated_by_name": null,
"date_created": "2014-12-07T04:10:46+00:00",
"date_updated": "2014-12-07T04:11:00.476000+00:00"
}
Fetch a single Email activity
Fetch a single Email activity
curl -XGET "https://api.close.com/api/v1/activity/email/{id}/"
Response Headers
content-type: application/json
Response Body
{
"attachments": [],
"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!",
"date_updated": "2013-02-01T00:56:04.184000+00:00",
"direction": "incoming",
"contact_id": "cont_8NNOJnVwmHQEYuVOgJ4B4zU7g9RUxYH4JnPjza5Vr6t",
"id": "acti_WuIVvTT9b3zLmOOWalxK0OrqtdkxEEdu4mNr1TPGb2o",
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"created_by": null,
"to": [
"phil+sample@close.com"
],
"subject": "Welcome to Close!",
"opens": [],
"status": "inbox",
"_type": "Email",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"updated_by_name": "Bruce Wayne",
"envelope": {
"from": [
{
"email": "karan@close.com",
"name": ""
}
],
"sender": [
{
"email": "karan@close.com",
"name": ""
}
],
"to": [
{
"email": "phil+sample@close.com",
"name": ""
}
],
"cc": [],
"bcc": [],
"reply_to": [],
"date": "Fri, 01 Feb 2013 00:54:51 +0000",
"in_reply_to": null,
"message_id": "<20130201005451.14369.20369@ec2-54-245-86-79.us-west-2.compute.amazonaws.com>",
"subject": "Welcome to Close!"
},
"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!",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"body_text_quoted": [
{
"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!",
"expand": true
}
],
"send_attempts": [],
"lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h",
"sender": "karan@close.com",
"bcc": [],
"date_created": "2013-02-01T00:54:51.274000+00:00",
"template_id": null,
"cc": [],
"sequence_subscription_id": "sub_wRlAku35U53xEV7PcNY3Qo",
"sequence_id": "seq_1BTljGuCooX0nbFoPihl07",
"sequence_name": "My Sequence"
}
Fetch a single SMS activity
Fetch a single SMS activity.
curl -XGET "https://api.close.com/api/v1/activity/sms/{id}/"
Response Headers
content-type: application/json
Response Body
{
"id": "acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp",
"_type": "SMS",
"date_sent": null,
"direction": "inbound",
"cost": "1",
"status": "inbox",
"local_phone": "+16503334444",
"local_country_iso": "US",
"remote_phone": "+18183004000",
"remote_phone_formatted": "+1 818-300-4000",
"remote_country_iso": "US",
"text": "SMS in Close? HUZZAH!!!",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb",
"contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk",
"user_id": "user_laksjrrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"user_name": "Tobias Fuenke",
"created_by": null,
"created_by_name": null,
"updated_by": null,
"updated_by_name": null,
"date_created": "2016-10-03T16:06:11.167000+00:00",
"date_updated": "2016-10-03T16:06:11.167000+00:00"
}
Fetch a single Call activity
Fetch a single Call activity
curl -XGET "https://api.close.com/api/v1/activity/call/{id}/"
Response Headers
content-type: application/json
Response Body
{
"id": "acti_Ay0QqN91HKAHVQUesISYV8QlhDobGfWb1Ui3TE75pJR",
"_type": "Call",
"recording_url": null,
"voicemail_url": null,
"voicemail_duration": null,
"direction": "outbound",
"disposition": "answered",
"source": "Close.io",
"note": "",
"duration": 10,
"local_phone": "+16505556666",
"local_phone_formatted": "+1 650-555-6666",
"remote_phone": "+16503334444",
"remote_phone_formatted": "+1 650-333-4444",
"phone": "+16503334444",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"date_created": "2013-02-20T06:34:33.637000+00:00",
"date_updated": "2013-02-20T06:34:35.656000+00:00",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp",
"contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk",
"call_method": "regular",
"dialer_id": null,
"dialer_saved_search_id": null,
"cost": "2",
"local_country_iso": "US",
"remote_country_iso": "US"
}
Fetch a single Meeting activity
Fetch a single Meeting activity.
curl -XGET "https://api.close.com/api/v1/activity/meeting/{id}/"
Response Headers
content-type: application/json
Response Body
{
"date_updated": "2019-10-11T16:30:00.368000+00:00",
"created_by_name": "Eric Engoron",
"contact_id": null,
"duration": 3600,
"calendar_event_link": "https://www.google.com/calendar/event?eid=NzlrNGRoMmk5bm9jZDEwOGtjMmY3Y2RzODggZXJpY0BjbG9zZS5pbw",
"users": [
"user_Fj6qRwtrsJHIZLveF1SBFYQfL1irF92gUwLcHgyh7hn"
],
"attendees": [
{
"status": "noreply",
"user_id": null,
"name": null,
"contact_id": "cont_V3RuqD9VJKJWOtPsoH7EMy3MnKoFED2Ulgd4g87Ayqc",
"is_organizer": false,
"email": "bruce@wayneenterprises.com"
},
{
"status": "yes",
"user_id": "user_Fj6qRwtrsJHIZLveF1SBFYQfL1irF92gUwLcHgyh7hn",
"name": null,
"contact_id": null,
"is_organizer": true,
"email": "eric@close.io"
}
],
"title": "Bruce Wayne Interview",
"created_by": "user_Fj6qRwtrsJHIZLveF1SBFYQfL1irF92gUwLcHgyh7hn",
"id": "acti_qwA2IPmjYyMQQ2UWuNxBOtc2CbZtRUOb5JkS1i3Qo1b",
"note": "──────────\nEric Engoron is inviting you to a scheduled Zoom meeting to find out if you're really Batman.\n\nJoin Zoom Meeting\nhttps://zoom.us/j/zoommeeting\n\n──────────",
"updated_by_name": "Eric Engoron",
"location": "https://zoom.us/j/zoommeeting",
"user_name": "Eric Engoron",
"status": "in-progress",
"_type": "Meeting",
"updated_by": "user_Fj6qRwtrsJHIZLveF1SBFYQfL1irF92gUwLcHgyh7hn",
"organization_id": "orga_OFkz961guT4YZzCZ1kFlxDSVfHq4tLDsWshAoYopdjF",
"user_id": "user_Fj6qRwtrsJHIZLveF1SBFYQfL1irF92gUwLcHgyh7hn",
"ends_at": "2019-10-11T17:30:00+00:00",
"connected_account_id": "emailacct_OoSyqxjm1HbuxcRsOyrm2SwR1uOTBdHKPdhAaf9mhUp",
"is_recurring": false,
"lead_id": "lead_Qq33JAqr6zrgqtJGkKv7XQxTnQxpTEJA7Mfcx98ZrWe",
"source": "calendar",
"starts_at": "2019-10-11T16:30:00+00:00",
"date_created": "2019-10-11T16:30:00+00:00"
}
Fetch a single LeadStatusChange activity
Fetch a single LeadStatusChange activity
curl -XGET "https://api.close.com/api/v1/activity/status_change/lead/{id}/"
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"_type": "LeadStatusChange",
"contact_id": null,
"created_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"created_by_name": "Anthony Nemitz",
"date_created": "2013-08-23T20:57:45.956000+00:00",
"date_updated": "2013-08-23T20:57:45.956000+00:00",
"lead_id": "lead_DwJwyY8nynRQicBMFPFccrbAJHT1bxv7t31UiphS9kv",
"new_status_id": "stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8",
"new_status_label": "Trial Qualified",
"old_status_id": "stat_TRuQucMjSlSSV6cGAQixHBNyU2FS9zDyixNguwlfXxu",
"old_status_label": "Trial",
"updated_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by_name": "Anthony Nemitz",
"user_id": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"user_name": "Anthony Nemitz",
"id": "acti_jSqoxKYTY522iEfrKfKzqjhw5zP8uS59SQx38KGbbhx"
}
Fetch a single OpportunityStatusChange activity
Fetch a single OpportunityStatusChange activity
curl -XGET "https://api.close.com/api/v1/activity/status_change/opportunity/{id}/"
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"_type": "OpportunityStatusChange",
"contact_id": null,
"created_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"created_by_name": "Anthony Nemitz",
"date_created": "2013-08-23T21:21:11.862000+00:00",
"date_updated": "2013-08-23T21:21:11.862000+00:00",
"lead_id": "lead_0VaTsortzKpCv1ik6hbNoudduuD0m2Itevet0fKX39G",
"new_status_id": "stat_DetsqwxFOOHx2JnhqtovutN3zeuARGfzB21x5t1W88G",
"new_status_label": "Won",
"new_status_type": "won",
"old_status_id": "stat_ue534UFRaocoMJJA9CYCwnMsRJP2qt6YGnpZOAx7ckK",
"old_status_label": "Active",
"old_status_type": "active",
"opportunity_date_won": "2013-08-23",
"opportunity_id": "oppo_fn2kSFXS06akJ7XisR7vQQeObyK4upCc43RiAx1Vyz6",
"opportunity_value": 0,
"opportunity_value_formatted": null,
"opportunity_value_currency": "USD",
"updated_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by_name": "Anthony Nemitz",
"user_id": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"user_name": "Anthony Nemitz",
"id": "acti_CAI2lO44gRLMIvgsKfPZghRyuv1h8S3l7c4cDznXukd"
}
Fetch a single TaskCompleted activity
Fetch a single TaskCompleted activity
curl -XGET "https://api.close.com/api/v1/activity/task_completed/{id}/"
Response Headers
content-type: application/json
Response Body
{
{
"_type": "TaskCompleted",
"id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak",
"task_id": "task_ask2cItUeDL0jvuoJIcOocrqhqVVnLUZrEbcdM3ihhT",
"task_text": "Follow up",
"organization_id": "orga_j23nASDFzqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h"
"user_id": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"date_created": "2013-02-01T01:05:04.070000+00:00",
"date_updated": "2013-02-01T01:06:35.668000+00:00",
}
}
Update a Note activity
Update a Note activity.
curl -XPUT "https://api.close.com/api/v1/activity/note/{id}/"
Request Headers
content-type: application/json
Request Body
{
"note": "this is an update to my existing note."
}
Response Headers
content-type: application/json
Response Body
{
"_type": "Note",
"note": "this is an update to my existing note.",
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"user_name": "Bruce Wayne",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_name": "Bruce Wayne",
"date_updated": "2013-02-20T06:41:59.846000+00:00",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"created_by_name": "Bruce Wayne",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"contact_id": null,
"date_created": "2013-02-20T06:39:57.266000+00:00",
"id": "acti_kwWA3rOfy4BnaZ8QQk3RIIAz51dU9ayiluy1s961Oiw",
"lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp"
}
Update an Email activity
Update an Email activity. This can be used to modify a draft or send it once the draft is complete.
curl -XPUT "https://api.close.com/api/v1/activity/email/{id}/"
Request Headers
content-type: application/json
Request Body
{
"subject": "Updated subject!",
}
Response Headers
content-type: application/json
Response Body
{
"id": "acti_EdpqkmtlQHIDWE2CixJo606BapX34SpYV3fzHryGPc3",
"_type": "Email",
"contact_id": "cont_8NNOJnVwmHQEYuVOgJ4B4zU7g9RUxYH4JnPjza5Vr6t",
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"user_name": "Steve Wiseman",
"lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h",
"thread_id": "acti_3VFfJMUKvwvQPXAbXAbs9b01usbFC5acL8MrmFcsmK5",
"direction": "outgoing",
"sender": "karan@close.com",
"to": ["phil+sample@gclose.com"],
"cc": [],
"bcc": [],
"envelope": null,
"subject": "Updated subject!",
"body_preview": "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 "
"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!",
"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_html_quoted": {
"expand": true,
"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!"
},
"date_sent": null,
"date_created": "2015-06-26T02:01:43.059265",
"date_updated": "2015-06-26T02:01:43.101910",
"created_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"created_by_name": "Steve Wiseman",
"updated_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"updated_by_name": "Steve Wiseman",
"status": "draft",
"organization_id": "orga_KZ35uaIHbe7Qu0Tinp6skOPwOEbTnqDXleF9dWbz6Zv",
"users": [],
"body_text_quoted": null,
"send_attempts": [],
"email_account_id": null,
"opens": [],
"opens_summary": null,
"attachments": [],
"message_ids": [],
"in_reply_to_id": null,
"template_id": null,
"template_name": null,
"references": [],
"sequence_subscription_id": null,
"sequence_id": null,
"sequence_name": null
}
Update an SMS activity
Update an SMS activity.
This can be used to modify a draft or send it once the draft is complete.
curl -XPUT "https://api.close.com/api/v1/activity/sms/{id}/"
Request Headers
content-type: application/json
Request Body
{
"text": "Updated text message!",
}
Response Headers
content-type: application/json
Response Body
{
"id": "acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp",
"_type": "SMS",
"status": "draft",
"text": "Updated text message!",
"local_phone": "+14154445555",
"local_country_iso": "US",
"remote_phone": "+18183334444",
"remote_phone_formatted": "+1 818-333-4444",
"remote_country_iso": "US",
"cost": "1",
"direction": "outbound",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb",
"contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk",
"user_id": "user_laksjrrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"user_name": "Tobias Fuenke",
"created_by": "user_laksjrrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"created_by_name": "Tobias Fuenke",
"updated_by": "user_laksjrrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by_name": "Tobias Fuenke",
"date_created": "2016-10-03T16:06:11.167000+00:00",
"date_updated": "2016-10-03T18:00:00.167000+00:00",
"date_sent": null
}
Create a Note activity
Create a Note activity.
curl -XPOST "https://api.close.com/api/v1/activity/note/"
Request Headers
content-type: application/json
Request Body
{
"note": "this is a test note.",
"lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp"
}
Response Headers
content-type: application/json
Response Body
{
"_type": "Note",
"note": "this is a test note.",
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"user_name": "Bruce Wayne",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_name": "Bruce Wayne",
"date_updated": "2013-02-20T06:39:57.266000+00:00",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"created_by_name": "Bruce Wayne",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"contact_id": null,
"date_created": "2013-02-20T06:39:57.266000+00:00",
"id": "acti_kwWA3rOfy4BnaZ8QQk3RIIAz51dU9ayiluy1s961Oiw",
"lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp"
}
Create an Email activity
Create an Email activity.
status must be one of the following:
inbox
to log an already received email.draft
to create a draft email.scheduled
to send an email at a scheduled date and time, which must be specified in thedate_scheduled
field.outbox
to actually send an email. To delay email sending by a few seconds (to allow undo), specifysend_in
in seconds (must be less than 60).sent
to log an already sent email.
Only drafts can be modified, and their status can be changed to scheduled
(to send later) or outbox
(to send immediately). Scheduled emails, or emails in outbox that weren't sent yet can be canceled by setting the status back to draft
.
For scheduled, outbox, or sent emails, a followup_date
may be posted, which will have Close create an email followup task if no response was received.
We'll render an Email Template server-side if you include a template_id
without including body_text
or body_html
in your POST.
To specify both a sender name and a sender email address when posting an email, you can use the sender
field with the format "sender": "\"John Smith\" <emailaddress@example.com>"
If you don't provide a sender
when posting an email with status sent
, it will default to the email address of the user
associated with the email or the email address of the owner of the API key you use.
curl -XPOST "https://api.close.com/api/v1/activity/email/"
Request Headers
content-type: application/json
Request Body
{
"contact_id": "cont_8NNOJnVwmHQEYuVOgJ4B4zU7g9RUxYH4JnPjza5Vr6t",
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h",
"direction": "outgoing",
"created_by": null,
"created_by_name": "Bruce Wayne",
"date_created": "2013-02-01T00:54:51.274000+00:00",
"subject": "Welcome to Close!",
"sender": "karan@close.com",
"to": [
"phil+sample@close.com"
],
"bcc": [],
"cc": [],
"status": "draft",
"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!",
"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!",
"attachments": [],
"template_id": null
}
Response Headers
content-type: application/json
Response Body
{
"id": "acti_EdpqkmtlQHIDWE2CixJo606BapX34SpYV3fzHryGPc3",
"_type": "Email",
"contact_id": "cont_8NNOJnVwmHQEYuVOgJ4B4zU7g9RUxYH4JnPjza5Vr6t",
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"user_name": "Steve Wiseman",
"lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h",
"thread_id": "acti_3VFfJMUKvwvQPXAbXAbs9b01usbFC5acL8MrmFcsmK5",
"direction": "outgoing",
"sender": "karan@close.com",
"to": ["phil+sample@gclose.com"],
"cc": [],
"bcc": [],
"envelope": null,
"subject": "Welcome to Close!",
"body_preview": "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 "
"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!",
"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_html_quoted": {
"expand": true,
"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!"
},
"date_sent": null,
"date_created": "2015-06-26T02:01:43.059265",
"date_updated": "2015-06-26T02:01:43.101910",
"created_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"created_by_name": "Steve Wiseman",
"updated_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"updated_by_name": "Steve Wiseman",
"status": "draft",
"organization_id": "orga_KZ35uaIHbe7Qu0Tinp6skOPwOEbTnqDXleF9dWbz6Zv",
"users": [],
"body_text_quoted": null,
"send_attempts": [],
"email_account_id": null,
"opens": [],
"opens_summary": null,
"attachments": [],
"message_ids": [],
"in_reply_to_id": null,
"template_id": null,
"template_name": null,
"references": [],
"sequence_subscription_id": null,
"sequence_id": null,
"sequence_name": null
}
Create an SMS activity
Create an SMS activity.
status must be one of the following:
inbox
to log an already received SMS.draft
to create a draft SMS.scheduled
to send an SMS at a scheduled date and time, which must be specified in thedate_scheduled
field.outbox
to actually send an SMS. To delay SMS sending by a few seconds (to allow undo), specifysend_in
in seconds (must be less than 60).sent
to log an already sent SMS.
Only drafts can be modified, and their status can be changed to scheduled
(to send later) or outbox
(to send immediately). Scheduled SMS, or SMS in outbox that weren't sent yet can be canceled by setting the status back to draft
.
You have to provide a local_phone
that will be used to send the SMS. The number you choose has to be associated with a Phone Number of type internal
. See the Phone Numbers paragraph for more details.
curl -XPOST "https://api.close.com/api/v1/activity/sms/"
Request Headers
content-type: application/json
Request Body
{
"status": "outbox",
"text": "Hi! This is a reminder that we have a call scheduled for 12pm PT today.",
"remote_phone": "+18183334444",
"local_phone": "+14154445555",
"source": "Close.io",
"lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb",
"contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk",
}
Response Headers
content-type: application/json
Response Body
{
"id": "acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp",
"_type": "SMS",
"status": "outbox",
"text": "Hi! This is a reminder that we have a call scheduled for 12pm PT today.",
"local_phone": "+14154445555",
"cost": "1",
"local_country_iso": "US",
"remote_phone": "+18183334444",
"remote_phone_formatted": "+1 818-333-4444",
"remote_country_iso": "US",
"direction": "outbound",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb",
"contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk",
"user_id": "user_laksjrrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"user_name": "Tobias Fuenke",
"created_by": "user_laksjrrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"created_by_name": "Tobias Fuenke",
"updated_by": "user_laksjrrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by_name": "Tobias Fuenke",
"date_created": "2016-10-03T16:06:11.167000+00:00",
"date_updated": "2016-10-03T16:06:11.167000+00:00",
"date_sent": null
}
Log a Call activity manually
Log a Call activity manually (for calls made outside of the Close VoIP system)
status: defaults to completed
direction (optional): outbound
or inbound
recording_url: you can post a URL pointing to the MP3 recording of your call. For security reasons, we require the URL to be secure (i.e. starting with https://)
curl -XPOST "https://api.close.com/api/v1/activity/call/"
Request Headers
content-type: application/json
Request Body
{
"lead_id": "lead_fioU1Nk5LC0H0iei9XBGHW2CFZU0yeP2zZCJQP9pC4m",
"contact_id": "cont_bulY73zoaAwTCLdjHrKzGkzZ942OwtEelJR7kNku9RK",
"created_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"user_id": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"direction": "outbound",
"status": "completed",
"note": "call notes go here",
"duration": 153,
"phone": "+16505551234",
}
Response Headers
content-type: application/json
Response Body
{
"_type": "Call",
"id": "acti_wJGiBIXXBCpBAQacZ7axeOhgTS7TWxyU7ml4WqAswOb",
"organization_id": "orga_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"date_created": "2014-05-22T17:39:04.509000+00:00",
"date_updated": "2014-05-22T17:39:04.509000+00:00",
"created_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"created_by_name": "Stefan Wójcik",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"updated_by_name": "Phil Freo",
"lead_id": "lead_fioU1Nk5LC0H0iei9XBGHW2CFZU0yeP2zZCJQP9pC4m",
"contact_id": "cont_bulY73zoaAwTCLdjHrKzGkzZ942OwtEelJR7kNku9RK",
"user_id": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"user_name": "Stefan Wójcik",
"direction": "outbound",
"disposition": "answered",
"duration": 153,
"note": "call notes go here",
"source": "External",
"remote_phone": "+16505551234",
"remote_phone_formatted": "+1 650-555-1234",
"phone": "+16505551234",
"voicemail_url": null,
"recording_url": null,
"call_method": "external",
"dialer_id": null,
"dialer_saved_search_id": null,
"cost": "0",
"local_country_iso": "US",
"remote_country_iso": "US"
}
Delete a Note activity
Delete a Note activity.
curl -XDELETE "https://api.close.com/api/v1/activity/note/{id}/"
Response Headers
content-type: application/json
Response Body
{}
Delete an EmailThread activity
Delete an EmailThread activity.
This will also delete all the email activities belonging to this thread.
curl -XDELETE "https://api.close.com/api/v1/activity/emailthread/{id}/"
Response Headers
content-type: application/json
Response Body
{}
Delete an Email activity
Delete an Email activity.
curl -XDELETE "https://api.close.com/api/v1/activity/email/{id}/"
Response Headers
content-type: application/json
Response Body
{}
Delete an SMS activity
Delete an SMS activity.
curl -XDELETE "https://api.close.com/api/v1/activity/sms/{id}/"
Response Headers
content-type: application/json
Response Body
{}
Delete a Call activity
Delete a Call activity.
curl -XDELETE "https://api.close.com/api/v1/activity/call/{id}/"
Response Headers
content-type: application/json
Response Body
{}
Delete a Meeting activity
Delete a Meeting activity.
curl -XDELETE "https://api.close.com/api/v1/activity/meeting/{id}/"
Response Headers
content-type: application/json
Response Body
{}
Delete a TaskCompleted activity
Opportunities
Opportunities represent a potential deal with a given company/lead.
Opportunities have a customizable status (which always has a status_type
of either active
, won
, or lost
), and optionally can have a monetary amount associated with them.
List or filter opportunities
List or filter opportunities.
- All opportunity list responses contain the following aggregate values about all the matching objects (regardless of pagination / limits):
total_results
: the total number of objects,count_by_value_period
: a dictionary containing the number of opportunities by value period, e.g.{ 'one_time': 2, 'annual': 1, 'monthly': 1 }
,total_value_one_time
: the sum of the values of all one time opportunities,total_value_monthly
: the sum of the values of all monthly opportunities,total_value_annual
: the sum of the values of all annual opportunities,total_value_annualized
: the sum of the values of all opportunities where monthly opportunity values are multiplied by 12,expected_value_one_time
: the sum of the values of all one time opportunities multiplied by their confidence,expected_value_monthly
: the sum of the values of all monthly opportunities multiplied by their confidence,expected_value_annual
: the sum of the values of all annual opportunities multiplied by their confidence,expected_value_annualized
: the sum of the values of all opportunities multiplied by their confidence where monthly opportunity values are multiplied by 12,
query
is an optional search query filter. Only opportunity properties may be used in the filter. For example,note:important
will only show opportunities which contain the textimportant
in their note. Or,status_change(old_status:active new_status:won date:yesterday)
will only show opportunities that transitioned from statusactive
to statuswon
on the previous day._order_by
allows:date_won
,date_updated
,date_created
,confidence
,user_name
,value
,annualized_value
,annualized_expected_value
(each of them allows descending order by prepending a minus, e.g._order_by=-date_won
).value_period
allows:one_time
,monthly
,annual
.- Multiple values for
user_id
,status_id
,status_label
,status_type
andvalue_period
can be specified using the in operator, e.g.status_type__in=active,won
. _group_by
allows:user_id
,date_won__week
,date_won__month
,date_won__quarter
date_won__year
to group results by the given criteria.When grouping results, the
data
array contains a list of groups instead of objects. A group consists of the following fields:key
containing a unique group key,objects
containing the list of objects for the given group,total_results
containing the number of total objects for the given group,- all aggregate values for the given group,
- if grouping by year:
year
, containing the year for the given group, - if grouping by month:
year
andmonth
, containing the year and month (1-12) for the given group, - if grouping by quarter:
year
andquarter
, containing the year and quarter (1-4) for the given group, - if grouping by week:
weekyear
andweek
, containing the ISO week year and ISO week number for the given group, - if grouping by user:
user_id
anduser_name
, containing the user ID and full name of the user for the given group.
Note that pagination still applies to objects and not groups. The last or first group may be cut off during pagination, therefore
total_results
may not match the length ofobjects
. When paginating, thekey
value may be used to combine groups across multiple pages. Sorting using_order_by
may be applied and sorts the items within each of the groups. Group order can be reversed by prepending a minus. For example,_group_by=-date_won__week
will show the most recent weeks first. When grouping byuser_id
, results are ordered by the user's full name.lead_query
is an optional lead search query filter.
curl -XGET "https://api.close.com/api/v1/opportunity/{?lead_id, user_id, status_id, status_label, status_type, date_created__{lt|gt|lte|gte}, date_updated__{lt|gt|lte|gte}, date_won__{lt|gt|lte|gte}, value_period, query, _order_by, _group_by, _fields,lead_query}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"total_results": 3,
"count_by_value_period": {
"one_time": 1,
"monthly": 1,
"annual": 1
},
"total_value_one_time": 300000,
"total_value_one_time_formatted": "$3,000",
"total_value_monthly": 5000,
"total_value_monthly_formatted": "$50",
"total_value_annual": 50000,
"total_value_annual_formatted": "$500",
"total_value_annualized": 410000,
"total_value_annualized_formatted": "$4,100",
"expected_value_one_time": 225000,
"expected_value_one_time_formatted": "$2,250",
"expected_value_monthly": 2500,
"expected_value_monthly_formatted": "$25",
"expected_value_annual": 37500,
"expected_value_annual_formatted": "$375",
"expected_value_annualized": 292500,
"expected_value_annualized_formatted": "$2,925",
"data": [
{
"id": "oppo_KXyJj2PT74U1wOPvhBDO37jCC89mmrnoW0DylcDDWrL",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp",
"lead_name": "Bluth Company (Sample Lead)",
"date_won": null,
"confidence": 75,
"value": 300000,
"value_period": "one_time",
"value_formatted": "$3,000",
"value_currency": "USD",
"expected_value": 225000,
"annualized_value": 300000,
"annualized_expected_value": 225000,
"note": "Gob's ready to buy a $3,000 suit.",
"status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_label": "Active",
"status_type": "active",
"contact_id": null,
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"user_name": "John Doe",
"created_by": null,
"updated_by": null,
"date_created": "2013-02-01T00:54:51.321000+00:00",
"date_updated": "2013-02-01T00:54:51.321000+00:00"
},
{
"id": "oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
"lead_name": "Wayne Enterprises (Sample Lead)",
"date_won": null,
"confidence": 75,
"value": 50000,
"value_period": "annual",
"value_formatted": "$500",
"value_currency": "USD",
"expected_value": 37500,
"annualized_value": 50000,
"annualized_expected_value": 37500,
"note": "Bruce needs new software for the Bat Cave.",
"status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_label": "Active",
"status_type": "active",
"contact_id": null,
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"user_name": "John Doe",
"created_by": null,
"updated_by": null,
"date_created": "2013-02-01T00:54:51.337000+00:00",
"date_updated": "2013-02-01T00:54:51.337000+00:00"
},
{
"id": "oppo_klajsdflf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
"lead_name": "Wayne Enterprises (Sample Lead)",
"status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_label": "Active",
"status_type": "active",
"value": 5000,
"value_period": "monthly",
"value_formatted": "$50 monthly",
"value_currency": "USD",
"expected_value": 2500,
"annualized_value": 60000,
"annualized_expected_value": 30000,
"date_won": null,
"confidence": 50,
"note": "Bat Cave monthly maintenance cost",
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"user_name": "John Doe",
"contact_id": null,
"created_by": null,
"updated_by": null,
"date_created": "2013-02-01T00:54:51.337000+00:00",
"date_updated": "2013-02-01T00:54:51.337000+00:00"
}
]
}
Retrieve an opportunity
Retrieve an opportunity.
curl -XGET "https://api.close.com/api/v1/opportunity/{id}/"
Response Headers
content-type: application/json
Response Body
{
"id": "oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
"lead_name": "Wayne Enterprises (Sample Lead)",
"status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_label": "Active",
"status_type": "active",
"value": 50000,
"value_period": "one_time",
"value_formatted": "$500",
"value_currency": "USD",
"expected_value": 37500,
"annualized_value": 50000,
"annualized_expected_value": 37500,
"date_won": null,
"confidence": 75,
"note": "Bruce needs new software for the Bat Cave.",
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"user_name": "John Doe",
"contact_id": null,
"created_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"updated_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"date_updated": "2013-02-01T00:54:51.337000+00:00",
"date_created": "2013-02-01T00:54:51.337000+00:00"
}
Create an opportunity
Create an opportunity.
status_id (optional)
- Post a
status_id
to create an opportunity with a specific status. - If
status_id
is omitted, the organization's default (first) status will be used when creating new opportunities. - You can fetch available statuses from the Opportunity Status API.
curl -XPOST "https://api.close.com/api/v1/opportunity/"
Request Headers
content-type: application/json
Request Body
{
"note": "i hope this deal closes...",
"confidence": 90,
"lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
"status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"value": 500,
"value_period": "monthly"
}
Response Headers
content-type: application/json
Response Body
{
"id": "oppo_bJoqD4QX21AfA2fAGX5HmPQ1EgGoWBannvLj4khIfPH",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
"lead_name": "Wayne Enterprises (Sample Lead)",
"status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_label": "Active",
"status_type": "active",
"value": 50000,
"value_period": "monthly",
"value_formatted": "$50 monthly",
"value_currency": "USD",
"expected_value": 45000,
"annualized_value": 600000,
"annualized_expected_value": 540000,
"date_won": null,
"confidence": 90,
"note": "i hope this deal closes...",
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"user_name": "Anthony Nemitz",
"contact_id": null,
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"date_created": "2013-02-20T10:11:50.520000+00:00",
"date_updated": "2013-02-20T10:11:50.520000+00:00"
}
Update an opportunity
Update an opportunity.
date_won: If you don't set the date_won and the status is changed to won (i.e. a status, which type is "won"), it will be set to today (taking the x-tz-offset
HTTP header into account where you can pass your timezone's UTC offset).
status_id: See description for status_id
in POST /opportunity/
above.
curl -XPUT "https://api.close.com/api/v1/opportunity/{id}/"
Request Headers
content-type: application/json
Request Body
{
"status_id": "stat_5ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk"
}
Response Headers
content-type: application/json
Response Body
{
"id": "oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
"lead_name": "Wayne Enterprises (Sample Lead)",
"status_id": "stat_5ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_label": "Won",
"status_type": "won",
"value": 50000,
"value_period": "one_time",
"value_formatted": "$500",
"value_currency": "USD",
"expected_value": 37500,
"annualized_value": 50000,
"annualized_expected_value": 37500,
"date_won": "2013-02-20",
"confidence": 75,
"note": "Bruce needs new software for the Bat Cave.",
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"user_name": "John Doe",
"contact_id": null,
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"date_updated": "2013-02-20T10:06:25.248000+00:00",
"date_created": "2013-02-01T00:54:51.337000+00:00"
}
Delete an opportunity
Tasks
Tasks are action items with a given date that are assigned to a sales rep.
Incomplete tasks (is_complete
is false) show in the sales rep's inbox, whereas complete tasks (is_complete
is true) are shown in the archive. Archived tasks of certain types are automatically deleted after a certain amount of time.
The date
of a task represents the point in time of when the task is actionable and appears in the inbox. It can either be date-only (e.g. 2015-01-05
), or a date time (e.g. 2015-01-10T05:00:00+00:00
). When ordering tasks by date, date-only tasks are ordered before any date-time tasks at the given date, taking the time zone (x-tz-offset
) into account. For example, in Pacific Standard Time (x-tz-offset: -8
) and ascending order, a task dated 2015-01-12
will appear before 2015-01-12T08:00:00
, but after 2015-01-12T07:00:00
. Some endpoints accept and return a due_date
field, which is deprecated and shouldn't be used.
The type of a task is returned using the _type
field, which can also be used to filter tasks. When not filtering by _type
, only tasks of lead
type are returned. All tasks can be shown using _type=all
, and multiple task types can be filtered by passing the type names comma separated into _type__in
(e.g. _type__in=missed_call,voicemail
). Some task types have a corresponding object which is returned using the object_id
and object_type
params. The following is a list of task types and corresponding objects that exist:
lead
: A to-do item/task for a given lead. Bothobject_type
andobject_id
are null, since the lead is already returned inlead_id
.incoming_email
: One or multiple incoming emails on an email thread. Theobject_type
isemailthread
, andobject_id
is the ID of the corresponding email thread. Multiple unread emails in one thread are consolidated into one task. Theemails
array contains a list of email activity IDs related to this task. Thesubject
field contains the subject of the email thread.email_followup
: A reminder to follow up on a specific email you sent in the past and didn't get a response to. Theobject_type
isemailthread
, andobject_id
is the ID of the corresponding email thread. A reference to the email you sent originally is stored inemail_id
. Thesubject
andbody_preview
fields contain data related the email you should follow up on.missed_call
: A missed call. Theobject_type
iscall
, andobject_id
is the activity ID of the call that was missed. Thephone
field contains the phone number of the remote party, thelocal_phone
field contains the number that was called.answered_detached_call
: A call from a number that isn't associated with any of the organization's contacts. Theobject_type
iscall
, andobject_id
is the ID of the corresponding call. Thephone
field contains the phone number of the remote party.voicemail
: A voicemail. Just likemissed_call
, with the additional fieldsvoicemail_duration
andvoicemail_url
.opportunity_due
: Indicates that an opportunity is scheduled to close on this date. Theobject_type
isopportunity
, andobject_id
is the ID of the corresponding opportunity.incoming_sms
: An incoming SMS. Theobject_type
issms
, andobject_id
is the ID of the corresponding SMS. Theremote_phone
field contains the phone number of the sender, thelocal_phone
field contains the number that was texted.
List or filter tasks
List or filter tasks.
The view
parameter can be used to conveniently access the different task views. It accepts one of the following values:
inbox
: Shows incomplete tasks up to the end of the user's day only (taking the time zone into account).future
: Shows incomplete tasks starting from the user's tomorrow only (taking the time zone into account).archive
: Shows complete tasks only.
The _order_by
field allows ordering by date
or date_created
(descending order by prepending a minus, e.g. _order_by=-date
).
curl -XGET "https://api.close.com/api/v1/task/{?id,id__in,_type,lead_id,membership_id,is_complete,date__{lt|gt|lte|gte},date_created__{lt|gt|lte|gte},assigned_to,view,_order_by}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"_type": "lead",
"view": "inbox",
"assigned_to": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"assigned_to_name": "John Doe",
"contact_id": null,
"contact_name": null,
"created_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"created_by_name": "John Doe",
"date": "2015-02-08T00:00:00+00:00",
"date_created": "2015-02-08T20:30:54.314000+00:00",
"date_updated": "2015-02-26T19:11:36.128000+00:00",
"id": "task_aRUZXCm9lMb2LwipTPhfFoFbCsUnaoQh1ncQ7WLnjlI",
"is_complete": false,
"is_dateless": false,
"lead_id": "lead_5LmpOyrMQdJSUlbNGBSGfK5XzcioIm7aC94PSQamQJc",
"lead_name": "Close",
"object_id": null,
"object_type": null,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"text": "Connect with Account Manager",
"updated_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"updated_by_name": "John Doe"
},
{
"_type": "missed_call",
"view": "inbox",
"object_id": "acti_7ALcldIJ9faMty47UM8xqAr0AMLeGcCUTmK32FuURJO",
"object_type": "call",
"is_complete": false,
"assigned_to": "user_alksdjfWZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"assigned_to_name": "Stefan Wojcik",
"phone": "+16503334444",
"phone_formatted": "+1 650-333-4444",
"phone_number_description": "California",
"local_phone": "+19193332031",
"contact_id": "cont_nWEklsdiC4z8u0b9QcNV92pWZODOyS5eUIYkvID0poZ",
"contact_name": "",
"date": "2015-05-27T18:33:52.937000+00:00",
"id": "noti_034u5OZh3J759uE9kokI5r0xzhKE1tsfwcIwW5kXtWy",
"lead_id": "lead_098324SXepf2mAk33WOIOvJYlis9dvRKJJe0wt1AwFE",
"lead_name": "Lead Name",
"organization_id": "orga_KZ35uaIHbe7Qu0Tinp6skOPwOEbTnqDXleF9dWbz6Zv",
"created_by": null,
"created_by_name": null,
"updated_by": null,
"updated_by_name": null,
"date_created": "2015-05-27T18:33:52.937000+00:00",
"date_updated": "2015-05-27T18:35:28.120000+00:00"
},
{
"_type": "voicemail",
"view": "inbox",
"assigned_to": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"assigned_to_name": "John Doe",
"contact_id": null,
"contact_name": null,
"created_by": null,
"created_by_name": null,
"date": "2014-01-29T21:18:37.535000+00:00",
"date_created": "2015-02-26T19:24:39.847000+00:00",
"date_updated": "2015-02-26T19:24:39.849000+00:00",
"id": "noti_7WlHZCMgokvfv3H4SfymZLvG29QTifbGK0zMbEbPNgO",
"is_complete": false,
"lead_id": null,
"lead_name": null,
"local_phone": "+16319099219",
"object_id": "acti_ZnroXFGejb5JjYnluywM9wjKAGPwU3IpidvQZtW7WRp",
"object_type": "call",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"phone": "+16314238017",
"updated_by": null,
"updated_by_name": null,
"voicemail_duration": 21,
"voicemail_url": "https://s3.amazonaws.com/plivocloud/aaa-bbb-ccc.mp3"
},
{
"_type": "incoming_email",
"view": "inbox",
"assigned_to": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"assigned_to_name": "John Doe",
"contact_id": "cont_73beDdTK5JOR7TMd5ervPFCwJ2jbXCPLtBfVY0yeg9X",
"contact_name": "",
"created_by": null,
"created_by_name": null,
"date": "2015-01-09T19:50:49+00:00",
"date_created": "2015-01-09T19:50:49+00:00",
"date_updated": "2015-02-26T19:24:38.643000+00:00",
"emails": [
"acti_LfXPSR1K9IMFZwEq0yjtmrhjI9tSBQ4u4lb2lF87dzs"
],
"id": "noti_xN0O5Owvrxn6k8BclFme7L46k3eUaPlGMN6Y5o3mkyS",
"is_complete": false,
"lead_id": "lead_E271nhg2okT6QJ7btzKmZwmZOhWSXeOG21PCJshsP3N",
"lead_name": "Test Company",
"object_id": "acti_jV7yfal4zwkKNTv66rGrHFd1uFUqhyNHc1m812xzcCF",
"object_type": "emailthread",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"subject": "December 2014 Metrics",
"body_preview": "Hi, does your company provide metrics for 12/2014?",
"updated_by": null,
"updated_by_name": null
},
{
"_type": "email_followup",
"view": "inbox",
"assigned_to": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"assigned_to_name": "John Doe",
"contact_id": "cont_73beDdTK5JOR7TMd5ervPFCwJ2jbXCPLtBfVY0yeg9X",
"contact_name": "",
"created_by": null,
"created_by_name": null,
"date": "2015-01-09T19:50:49+00:00",
"date_created": "2015-01-09T19:50:49+00:00",
"date_updated": "2015-02-26T19:24:38.643000+00:00",
"email_id": "acti_nwretk1K9IMFZwEq0yjtmrhjI9tSBQ4u4lb2lbmnrqt",
"id": "noti_akhsweqrrxn6k8BclFme7L46k3eUaPlGMN6Y5o3mkyS",
"is_complete": false,
"lead_id": "lead_E271nhg2okT6QJ7btzKmZwmZOhWSXeOG21PCJshsP3N",
"lead_name": "Test Company",
"object_id": "acti_nmsdgwqetlkKNTv66rGrHFd1uFUqhyNHc1m812xzbsq",
"object_type": "emailthread",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"subject": "I have an offer for you",
"body_preview": "Please respond if you're interested",
"updated_by": null,
"updated_by_name": null
},
{
"_type": "answered_detached_call",
"view": "inbox",
"phone": "+16504298174",
"phone_formatted": "+1 650-429-8174",
"phone_number_description": "California",
"recording_url": "https://s3.amazonaws.com/plivocloud/aaa-bbb-ccc.mp3",
"assigned_to": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"assigned_to_name": "John Doe",
"contact_id": null,
"contact_name": null,
"is_complete": false,
"lead_id": null,
"lead_name": null,
"object_id": "acti_gtb5mn2YAO4up2Tv7XMjV5FLMif6JVebYxDOrqvnzas",
"object_type": "call",
"created_by": null,
"created_by_name": null,
"updated_by": null,
"updated_by_name": null,
"date_created": "2015-01-09T19:50:49+00:00",
"date_updated": "2015-02-26T19:24:38.643000+00:00",
"date": "2015-01-09T19:49:49+00:00",
"id": "noti_xc42fe5JD4y2GkcVhXQcbrrQKXjG6XDk5kuzBC1yRk0",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen"
},
{
"_type": "opportunity_due",
"view": "inbox",
"object_id": "oppo_FOvMVC4D4OHvHyXjtoBytvS8QIKvqOjknPzzSyNei7e",
"object_type": "opportunity",
"opportunity_value": 130000,
"opportunity_value_period": "one_time",
"opportunity_value_formatted": "$1,300",
"opportunity_value_currency": "USD",
"assigned_to": "user_aslkdjfZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"assigned_to_name": "Stefan Wojcik",
"contact_id": "cont_elkeZ5eRDRgoPfVvqTtnN8L0Rdj8fyNlI043oqPxQ6Z",
"contact_name": "John Doe",
"date": "2015-05-28T00:00:00+00:00",
"id": "noti_7VfBZIqaXYO3tgdflHcY14kDu2mu9qeF32OT6PdOSqH",
"is_complete": false,
"lead_id": "lead_0yXstlx26nU5o3341BwO9oUbqHxwcvny8sYeWQo83gU",
"lead_name": "Test Inc.",
"opportunity_note": "tqm cvr",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"created_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"created_by_name": "Stefan Wojcik",
"updated_by": "user_asdlfkjZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by_name": "Stefan Wojcik",
"date_created": "2015-05-27T22:27:43.617000+00:00",
"date_updated": "2015-05-27T22:59:26.435000+00:00",
},
{
"_type": "incoming_sms",
"view": "inbox",
"object_id": "acti_y10nW8kPdfmMPLy2Ufce9KymKPDuTRGKTqjpSxl6jMe",
"object_type": "sms",
"local_phone": "+16503334444",
"remote_phone": "+18189347000",
"remote_phone_description": "California",
"remote_phone_formatted": "+1 818-934-7000",
"text": "Developers developers developers developers!!!",
"assigned_to": "user_aslkdjfZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"assigned_to_name": "Stefan Wojcik",
"is_complete": false,
"id": "noti_8cT0GaRs0Ol2d97MvlresffPHEpTAE5qi6EE6y5RrKw",
"lead_id": "lead_iuSXNk1x4KrPggPVwQS7ynmp8pGRIDieRYiCnuo4yFb",
"lead_name": "New Lead",
"contact_id": "cont_TdzWUxuQbVMUiZbaF5ki5OFRdbGFXSD9kyw5CTPksIT",
"contact_name": "Steve Ballmer",
"organization_id": "orga_iyaAHsrti6N5kLDUfD6opMduwHwJpaVGzZiwJnM6EMZ",
"date_created": "2016-09-21T19:00:05.835000+00:00",
"date_updated": "2016-09-21T19:00:05.835000+00:00",
"date": "2016-09-21",
"created_by": null,
"created_by_name": null,
"updated_by": "user_aslkdjfZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by_name": "Stefan Wojcik"
}
]
}
Fetch a task's details
Fetch a task's details.
curl -XGET "https://api.close.com/api/v1/task/{id}/"
Response Headers
content-type: application/json
Response Body
{
"_type": "lead",
"assigned_to": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"assigned_to_name": "John Doe",
"contact_id": null,
"contact_name": null,
"created_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"created_by_name": "John Doe",
"date": "2015-02-08T00:00:00+00:00",
"date_created": "2015-02-08T20:30:54.314000+00:00",
"date_updated": "2015-02-26T19:11:36.128000+00:00",
"id": "task_aRUZXCm9lMb2LwipTPhfFoFbCsUnaoQh1ncQ7WLnjlI",
"is_complete": false,
"is_dateless": false,
"lead_id": "lead_5LmpOyrMQdJSUlbNGBSGfK5XzcioIm7aC94PSQamQJc",
"lead_name": "Close",
"object_id": null,
"object_type": null,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"text": "Connect with Account Manager",
"updated_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"updated_by_name": "John Doe"
}
Create a task
Create a task. Currently only tasks of type lead
can be created, so the _type
field may be omitted.
curl -XPOST "https://api.close.com/api/v1/task/"
Request Headers
content-type: application/json
Request Body
{
"_type": "lead",
"lead_id": "lead_5LmpOyrMQdJSUlbNGBSGfK5XzcioIm7aC94PSQamQJc",
"assigned_to": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"text": "Connect with Account Manager",
"date": "2013-02-06",
"is_complete": false
}
Response Headers
content-type: application/json
Response Body
{
"_type": "lead",
"assigned_to": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"assigned_to_name": "John Doe",
"contact_id": null,
"contact_name": null,
"created_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"created_by_name": "John Doe",
"date": "2013-02-06",
"date_created": "2015-02-08T20:30:54.314000+00:00",
"date_updated": "2015-02-26T19:11:36.128000+00:00",
"id": "task_aRUZXCm9lMb2LwipTPhfFoFbCsUnaoQh1ncQ7WLnjlI",
"is_complete": false,
"is_dateless": false,
"lead_id": "lead_5LmpOyrMQdJSUlbNGBSGfK5XzcioIm7aC94PSQamQJc",
"lead_name": "Close",
"object_id": null,
"object_type": null,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"text": "Connect with Account Manager",
"updated_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"updated_by_name": "John Doe"
}
Update a task
Update a task.
The assigned_to
, date
(either a date or a date-time) and is_complete
fields may be updated on all tasks. If the task type is lead
, the text
field may also be modified.
curl -XPUT "https://api.close.com/api/v1/task/{id}/"
Request Headers
content-type: application/json
Request Body
{
"is_complete": false
}
Response Headers
content-type: application/json
Response Body
{
"_type": "lead",
"assigned_to": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"assigned_to_name": "John Doe",
"contact_id": null,
"contact_name": null,
"created_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"created_by_name": "John Doe",
"date": "2013-02-06",
"date_created": "2015-02-08T20:30:54.314000+00:00",
"date_updated": "2015-02-26T19:11:36.128000+00:00",
"id": "task_aRUZXCm9lMb2LwipTPhfFoFbCsUnaoQh1ncQ7WLnjlI",
"is_complete": true,
"is_dateless": false,
"lead_id": "lead_5LmpOyrMQdJSUlbNGBSGfK5XzcioIm7aC94PSQamQJc",
"lead_name": "Close",
"object_id": null,
"object_type": null,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"text": "Connect with Account Manager",
"updated_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"updated_by_name": "John Doe"
}
Bulk-update tasks
Bulk-update tasks.
Any of the filters of the GET endpoint may be used. For example, to update multiple tasks with given IDs A, B and C, id__in=A,B,C
would be passed.
Only the assigned_to
, date
and is_complete
fields may be updated.
curl -XPUT "https://api.close.com/api/v1/task/{?...}"
Request Headers
content-type: application/json
Request Body
{
"_params": { "id__in": "task_aRUZXCm9lMb2LwipTPhfFoFbCsUnaoQh1ncQ7WLnjlI,task_qhRXeZMdsZ4jxnBf589mpjE7BLb6lo5WTIEFMY7cbsf,task_pexvrlCZXiGlzvCp0HcnWcbBR0QNQwi0XFOKMqoUE8G" },
"is_complete": true
}
Response Headers
content-type: application/json
Response Body
{
"ok": true
}
Delete a task
Memberships
Memberships connects a User with one or more Organizations. A Membership is created when a User is added to an organization, and it becomes "inactive" when a User leaves or is removed from an Organization.
Update membership
Update membership.
You can update the field role_id
and its value can be one of 'admin'
, 'superuser'
, 'user'
or 'restricteduser'
for the corresponding predefined role, or an ID of a Role.
curl -XPUT "https://api.close.com/api/v1/membership/{id}/"
Request Headers
content-type: application/json
Request Body
{
"role_id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p"
}
Response Headers
content-type: application/json
Response Body
{
"primary_personal_number": "phon_nm67bxYRTJUZNOXflc1I3bBadd0PbQvvui1byxCwK7k",
"user_id": "user_A3HwmEOcDLL8ilFx8QKcYEuKDtRPtBuQ68PctqwMqtP",
"plan_type": "enterprise",
"role_id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p",
"id": "memb_SLfZq4IU5E2nBA3PBzHFsi1HUv98cPmGUIZGlWK7Z3y",
"organization_id": "orga_jkNBOyn2gb3zAbM7Sp9r9Sp4mmPhGcWKfNrjXwYhXAU",
"permissions_granted": [
"bulk_delete",
"bulk_edit",
"export",
"manage_customizations",
"manage_group_numbers",
"manage_organization",
"manage_team_smart_views"
],
"record_calls": false
}
Bulk-update memberships
Bulk-update memberships.
Any field that can be updated on a membership individually can also be used to bulk update multiple memberships. To issue a bulk update,
pass their comma separated ids into id__in
in _params
as shown in the example below.
curl -XPUT "https://api.close.com/api/v1/membership/"
Request Headers
content-type: application/json
Request Body
{
"_params": { "id__in": "memb_SLfZq4IU5E2nBA3PBzHFsi1HUv98cPmGUIZGlWK7Z3y,memb_E67APf4NX5IMbrNLcD5oLpktQ2GAF8u34UUES42SKIj" },
"role_id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p"
}
Response Headers
content-type: application/json
Response Body
{
"count": 2
}
Users
Users represent Close user accounts, usually your co-workers / sales reps inside your company/organization.
Fetch information about yourself
Fetch information about yourself. This is a special instance of /user/{your_user_id}/
. Good for determining the id
of the Organization you are in.
curl -XGET "https://api.close.com/api/v1/me/"
Response Headers
content-type: application/json
Response Body
{
"id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"first_name": "Anthony",
"last_name": "Nemitz",
"email": "anthony@close.com",
"image": "https://secure.gravatar.com/avatar/0ff7116c35caeba6d174affd45730cfd",
"last_used_timezone": "America/Denver",
"date_created": "2012-08-29T13:46:31.870000+00:00",
"date_updated": "2013-02-08T06:17:00.583000+00:00",
"memberships": [
{
"id": "memb_I4Tx9tZwz5npqdGtd0baWtjjlpeFf45OBlkAAKcF3Gc",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"role_id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p",
"track_email_opens": true,
"record_calls": false,
"permissions_granted": ["export", "bulk_edit"]
}
],
"organizations": [
{
"id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"name": "Sample Data",
"lead_statuses": [
{
"id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Potential"
},
{
"id": "stat_2ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Bad Fit"
},
{
"id": "stat_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Qualified"
}
],
"pipelines": [
{
"id": "pipe_6gV01if4wo7r2YTVQDWP2j",
"name": "Sales",
"statuses": [
{
"id": "stat_3PB2sedHBCjwuBImAEwgHOo858f2j41lpROkcl51Fzp",
"label": "Active",
"type": "active"
},
{
"id": "stat_IOCtLYbAclJ8XAcb3yLUhQA3zlmjtXz8JMBLyXnNMF8",
"label": "Won",
"type": "won"
},
{
"id": "stat_3mmBOyMmaG8yc4DmAPp9WmgbjhVctVLlnd9gmvWxBe2",
"label": "Lost",
"type": "lost"
},
],
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"date_created": "2019-11-04T11:04:13.014979",
"date_updated": "2019-11-13T14:12:13.051542",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen"
}
],
"date_updated": "2013-02-20T04:38:01.961000+00:00",
"date_created": "2013-02-01T00:54:51.097000+00:00",
"created_by": null,
"updated_by": null
}
],
"email_accounts": [
{
"id": "emailacct_qG1RuJuy5baiXvVbIc2VelooJwGcKeIrQLNtTd9p6RO",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"identities": [
{
"email": "anthony@close.com",
"name": "Anthony Nemitz"
}
],
"_type": "google"
}
],
"phone_numbers": [
{
"id": "phon_wvZIxqZic5rqu14gnYjKXbPtj0Spj4mRGwII17IZCkQ",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"number": "+16502822249",
"date_updated": "2013-02-01T01:09:43.539000+00:00",
"date_created": "2013-02-01T01:09:43.539000+00:00"
}
]
}
Fetch a single user
Fetch a single user.
curl -XGET "https://api.close.com/api/v1/user/{id}/"
Response Headers
content-type: application/json
Response Body
{
"id": "user_912jAIAEWR0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"email": "stefan@close.com",
"first_name": "Stefan",
"last_name": "Wojcik",
"image": "https://secure.gravatar.com/avatar/a4bec4594864f1896c4750328b1d7470",
"organizations": [
"orga_aksjdflkjkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"orga_QH587V0alskjdomnIWUEfaslsalkjfT7U5XGYRtTrLq"
],
"date_created": "2012-08-29T00:33:22.720000+00:00",
"date_updated": "2013-05-08T01:57:15.204000+00:00",
}
List all the users who are members of the same organizations as you are
List all the users who are members of the same organizations as you are.
curl -XGET "https://api.close.com/api/v1/user/"
Response Headers
content-type: application/json
Response Body
{
"has_more": true,
"data": [
{
"id": "user_912jAIAEWR0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"email": "stefan@close.com",
"first_name": "Stefan",
"last_name": "Wojcik",
"image": "https://secure.gravatar.com/avatar/a4bec4594864f1896c4750328b1d7470",
"organizations": [
"orga_aksjdflkjkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"orga_QH587V0alskjdomnIWUEfaslsalkjfT7U5XGYRtTrLq"
],
"date_created": "2012-08-29T00:33:22.720000+00:00",
"date_updated": "2013-05-08T01:57:15.204000+00:00",
},
{
"id": "user_ihsdjlkasjdf3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"email": "kevin@close.com",
"first_name": "Kevin",
"last_name": "Ramani",
"image": "https://secure.gravatar.com/avatar/37b6e80dc105b9a8d0d16ef51b5d68c7",
"organizations": [
"orga_aksjdflkjkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"orga_QH587V0alskjdomnIWUEfaslsalkjfT7U5XGYRtTrLq"
],
"date_created": "2012-08-10T00:00:11.000000+00:00",
"date_updated": "2013-05-08T02:00:13.000000+00:00",
}
]
}
Fetch the availability statuses of all users within an organization
Fetch the availability statuses of all users within an organization.
The active_calls
field is an array of call metadata for calls that the user
is currently participating in.
curl -XGET "https://api.close.com/api/v1/user/availability/{?organization_id}"
Response Headers
content-type: application/json
Response Body
{
"data":[
{
"user_id":"user_1N20948hwBVXvszcZQCvhQJdrWA9abYQ3VgUwNAjKt2",
"availability":[
{
"status":"offline",
"type":"mobile",
"active_calls": []
},
{
"status":"online",
"type":"native",
"active_calls": [
{
"id": "acti_ZZfoNAATNVsvUG2eoozjUiG08KGO46uDa3aTSTChkDI",
"lead": {
"display_name": "Wayne Enterprises",
"id": "lead_8gzAE1a3yWyFUIlNzIGZbwWP7QaqlVixCq31uwqtwHu"
},
"method": "regular"
}
]
},
{
"status":"offline",
"type":"web",
"active_calls": []
}
]
},
{
"user_id":"user_DnOuer5wrIt1fvxkb0mdHmiJ4GRDs8q3NEWK5RYf4Jg",
"availability":[
{
"status":"offline",
"type":"mobile",
"active_calls": []
},
{
"status":"offline",
"type":"native",
"active_calls": []
},
{
"status":"offline",
"type":"web",
"active_calls": []
}
]
},
{
"user_id":"user_QFha5W7whnUVB0TRwDhnDvmw8YJVFbYP1JvtSEWdhXP",
"availability":[
{
"status":"online",
"type":"mobile",
"active_calls": []
},
{
"status":"offline",
"type":"native",
"active_calls": []
},
{
"status":"offline",
"type":"web",
"active_calls": []
}
]
},
{
"user_id":"user_rrZMCl6e4gn3CpW1NX0X9fhAJJG0juhNTST3vjmQjT5",
"availability":[
{
"status":"offline",
"type":"mobile",
"active_calls": []
},
{
"status":"offline",
"type":"native",
"active_calls": []
},
{
"status":"online",
"type":"web",
"active_calls": []
}
]
}
]
}
Organizations
Organizations are "environments" in Close where your team works. Most Close users are a member of only one Organization.
Leads/Contacts/Activities/etc are never able to be shared across multiple organizations.
(The organizations/companies of your sales prospects in Close are called "Leads".)
Get an organization's details, including its current members
Get an organization's details, including its current members (users), lead and opportunity statuses, etc.
By default, memberships
and inactive_memberships
are populated with user data prefixed with user_
. If you'd rather have a nested user
field, use a query string like ?_expand=memberships__user,inactive_memberships__user
.
curl -XGET "https://api.close.com/api/v1/organization/{id}/"
Response Headers
content-type: application/json
Response Body
{
"name": "Sample Data",
"lead_statuses": [
{
"id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Potential"
},
{
"id": "stat_2ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Bad Fit"
},
{
"id": "stat_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Qualified"
}
],
"pipelines": [
{
"id": "pipe_6gV01if4wo7r2YTVQDWP2j",
"name": "Sales",
"statuses": [
{
"id": "stat_3PB2sedHBCjwuBImAEwgHOo858f2j41lpROkcl51Fzp",
"label": "Active",
"type": "active"
},
{
"id": "stat_IOCtLYbAclJ8XAcb3yLUhQA3zlmjtXz8JMBLyXnNMF8",
"label": "Won",
"type": "won"
},
{
"id": "stat_3mmBOyMmaG8yc4DmAPp9WmgbjhVctVLlnd9gmvWxBe2",
"label": "Lost",
"type": "lost"
}
],
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"date_created": "2019-11-04T11:04:13.014979",
"date_updated": "2019-11-13T14:12:13.051542",
"organization_id": "orga_YB6zDvv1kqPY0veXLaJWUkoBsHbkVOKistq4eFqYmH0"
}
],
"created_by": null,
"memberships": [
{
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"user_phone": "16502822245",
"user_first_name": "P",
"user_full_name": "John Doe",
"user_last_name": "F",
"track_email_opens": true,
"role_id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p",
"permissions_granted": ["export", "bulk_edit"],
"id": "memb_wLKueFux8M2u2jshQPichvA5V44hpECtoljWbJS1PeY",
"record_calls": false,
"user_email": "phil+sample@close.com"
},
{
"user_id": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"user_phone": "16502822248",
"user_first_name": "Phil",
"user_full_name": "Phil Freo",
"user_last_name": "Freo",
"track_email_opens": true,
"role_id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p",
"permissions_granted": ["export", "bulk_edit"],
"id": "memb_hLHF3LsUI6N7twH1derRHiHEKeE843ttSYmsun4xkCn",
"record_calls": false,
"user_email": "phil@close.com"
},
{
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"user_phone": "16502822249",
"user_first_name": "Anthony",
"user_full_name": "Anthony Nemitz",
"user_last_name": "Nemitz",
"track_email_opens": true,
"role_id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p",
"permissions_granted": ["export", "bulk_edit"],
"id": "memb_I4Tx9tZwz5npqdGtd0baWtjjlpeFf45OBlkAAKcF3Gc",
"record_calls": false,
"user_email": "anthony@close.com"
}
],
"inactive_memberships": [],
"date_updated": "2013-02-20T04:38:01.961000+00:00",
"date_created": "2013-02-01T00:54:51.097000+00:00",
"id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"plan_type": "lite",
"updated_by": null
}
Update organization's `name`, `currency`, and reorder existing `lead_statuses`
Update organization's name
, currency
, and reorder existing lead_statuses
.
curl -XPUT "https://api.close.com/api/v1/organization/{id}/"
Request Headers
content-type: application/json
Request Body
{
"name": "New Name",
"lead_statuses": [
{
"id": "stat_8ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
},
{
"id": "stat_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
},
{
"id": "stat_2ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
},
{
"id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
}
],
"currency": "USD"
}
Response Headers
content-type: application/json
Response Body
{
"name": "New Name",
"lead_statuses": [
{
"id": "stat_8ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Not Serious"
},
{
"id": "stat_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Qualified"
},
{
"id": "stat_2ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Bad Fit"
},
{
"id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Potential"
}
],
"pipelines": [
{
"id": "pipe_6gV01if4wo7r2YTVQDWP2j",
"name": "Sales",
"statuses": [
{
"id": "stat_3PB2sedHBCjwuBImAEwgHOo858f2j41lpROkcl51Fzp",
"label": "Active",
"type": "active"
},
{
"id": "stat_IOCtLYbAclJ8XAcb3yLUhQA3zlmjtXz8JMBLyXnNMF8",
"label": "Won",
"type": "won"
},
{
"id": "stat_3mmBOyMmaG8yc4DmAPp9WmgbjhVctVLlnd9gmvWxBe2",
"label": "Lost",
"type": "lost"
}
]
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"date_created": "2019-11-04T11:04:13.014979",
"date_updated": "2019-11-13T14:12:13.051542",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen"
}
],
"currency": "USD",
"currency_symbol": "$",
"created_by": null,
"memberships": [
{
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"user_phone": "16502822245",
"user_first_name": "P",
"user_full_name": "John Doe",
"user_last_name": "F",
"track_email_opens": true,
"role_id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p",
"permissions_granted": ["export", "bulk_edit"],
"id": "memb_wLKueFux8M2u2jshQPichvA5V44hpECtoljWbJS1PeY",
"record_calls": false,
"user_email": "phil+sample@close.com"
}
],
"date_updated": "2013-02-20T04:38:01.961000+00:00",
"date_created": "2013-02-01T00:54:51.097000+00:00",
"id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"plan_type": "lite",
"updated_by": null
}
Roles
Roles define what users in your organization can or can not do.
Each user has a single role which you can set with a PUT request to Memberships API.
Every role has a set of permissions that represent actions users can do in Close.
Some roles, like "Admin" role, are maintained by the system and you cannot edit them.
Fetch a single role
Fetch a single role.
curl -XGET "https://api.close.com/api/v1/role/{id}/"
Response Headers
content-type: application/json
Response Body
{
"id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p",
"name": "Account Manager",
"editable": true,
"permissions": ["export", "bulk_edit"]
}
List all the roles defined for your organization
List all the roles defined for your organization.
curl -XGET "https://api.close.com/api/v1/role/"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p",
"name": "Admin",
"editable": false,
"permissions": ["manage_organization", "export", "bulk_edit"]
},
{
"id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p",
"name": "Account Manager",
"editable": true,
"permissions": ["export", "bulk_edit"]
},
]
}
Create a new role
Create a new role.
curl -XPOST "https://api.close.com/api/v1/role/"
Request Headers
content-type: application/json
Request Body
{
"name": "Account Manager",
"permissions": ["export", "bulk_edit"]
}
Response Headers
content-type: application/json
Response Body
{
"id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p",
"name": "Account Manager",
"editable": true,
"permissions": ["export", "bulk_edit"]
}
Update existing role
Update existing role.
curl -XPUT "https://api.close.com/api/v1/role/{role_id}/"
Request Headers
content-type: application/json
Request Body
{
"permissions": ["bulk_edit"]
}
Response Headers
content-type: application/json
Response Body
{
"id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p",
"name": "Account Manager",
"editable": true,
"permissions": ["bulk_edit"]
}
Delete a role
Custom Fields
Custom fields let you store arbitrary data on Leads, Contacts or Custom Activities
The following endpoints (one for Lead Custom Fields, one for Contact Custom Fields and one for Activity Custom Field) allow you to manage their structure, rename them, change their types, etc. Learn more about Custom Fields.
A custom field has the following attributes:
name
, which is the user-readable name of the field.description
, which is a longer description of the field that may be shown to users for context. The description may be null and has a 280 character limit.type
, which determines the type of the values that can be assigned to a custom field that has been associated with a Lead or a Contact. The available types are:text
: accepts any text value, e.g."Some Value"
.number
: accepts numeric values - both integers and floats, e.g.2
or5.5
.date
: accepts date values (without the time component), e.g."2014-06-12"
.datetime
: accepts date values (including the time component), e.g."2014-06-27T22:00:00-08:00"
.choices:
accepts all the values specified in thechoices
field, e.g."some valid choice"
.user
: accepts IDs (recommended) and names (exact match only) of users who are active or former members of your organization (e.g."user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU"
or"John Doe"
) and always returns IDs.hidden
: accepts any value but is never shown in the UI. It's a good place to store information useful only to API integrations.
choices
, which is a list of valid values for a custom field oftype == 'choices'
.accepts_multiple_values
, which determines if multiple values can be assigned to a custom field associated with a Lead or Contact. Multiple values are currently only supported for the "user" and "choices"type
.
Note that you can only create/edit/delete custom fields if you're an admin.
List all the Lead Custom Fields for your organization
List all the Lead Custom Fields for your organization.
curl -XGET "https://api.close.com/api/v1/custom_field/lead/"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"id": "lcf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c",
"name": "# of users",
"description": "The number of users in the company",
"type": "number",
"accepts_multiple_values": false,
"date_created": "2014-11-07T05:06:09.422000+00:00",
"date_updated": "2014-11-10T20:56:16.784000+00:00",
"created_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"organization_id": "orga_vfvFDAKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X"
},
{
"id": "lcf_8wtBWsdRU2Fur7GDnEeXQ7ra2Vu7R4hG1SNYdiEhh0F",
"name": "Industry",
"description": null,
"type": "choices",
"accepts_multiple_values": true,
"choices": [
"Apparel",
"Cars",
"Cosmetics",
"IT"
],
"date_created": "2014-11-07T05:06:09.423000+00:00",
"date_updated": "2014-11-12T22:37:55.752000+00:00",
"created_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"organization_id": "orga_vfvFDAKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X"
},
{
"id": "lcf_vvHHPVktybLXXqKrUF88PLsGm8sh202oMq3XGy6RcBm",
"name": "Internal Database ID",
"description": "ID in the company database",
"type": "text",
"accepts_multiple_values": false,
"created_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"date_created": "2014-11-10T23:38:14.535000+00:00",
"date_updated": "2014-11-10T23:38:14.535000+00:00",
"organization_id": "orga_vfvFDAKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X"
},
{
"id": "lcf_xUDvptVqoPQYv5tmRFDxemYOWFT9nlLRqJyQhpcNh4z",
"name": "Language Preference",
"description": null,
"type": "text",
"accepts_multiple_values": false,
"created_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"date_created": "2014-11-10T20:56:44.780000+00:00",
"date_updated": "2014-11-10T20:56:44.780000+00:00",
"organization_id": "orga_vfvFDAKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X",
},
{
"id": "lcf_MakiQgTzKXrcL8sDJbS2lkuUcA2FxZJAW8Q38ARgwWh",
"name": "Trial Due",
"description": "The date the trial expires",
"type": "date",
"accepts_multiple_values": false,
"created_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"date_created": "2014-11-07T05:06:09.413000+00:00",
"date_updated": "2014-11-10T20:51:12.636000+00:00",
"organization_id": "orga_vfvFDAKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X"
},
{
"id": "lcf_MakiQgTzKXrcL8sDJbS2lkuUcA2FxZJAW8Q38ARgwWh",
"name": "Owner",
"description": "The AE in charge of this account",
"type": "user",
"accepts_multiple_values": false,
"created_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"date_created": "2014-11-07T05:06:09.413000+00:00",
"date_updated": "2014-11-10T20:51:12.636000+00:00",
"organization_id": "orga_vfvFDAKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X"
}
]
}
Fetch Lead Custom Field's details
Fetch Lead Custom Field's details.
curl -XGET "https://api.close.com/api/v1/custom_field/lead/{id}/"
Response Headers
content-type: application/json
Response Body
{
"id": "lcf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c",
"name": "# of users",
"description": "The number of users in the company",
"type": "number",
"accepts_multiple_values": false,
"date_created": "2014-11-07T05:06:09.422000+00:00",
"date_updated": "2014-11-10T20:56:16.784000+00:00",
"created_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"organization_id": "orga_vfvFDAKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X"
}
Create a new Lead Custom Field
Create a new Lead Custom Field.
curl -XPOST "https://api.close.com/api/v1/custom_field/lead/"
Request Headers
content-type: application/json
Request Body
{
"name": "# of users",
"type": "number"
}
Response Headers
content-type: application/json
Response Body
{
"id": "lcf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c",
"name": "# of users",
"description": "The number of users in the company",
"type": "number",
"accepts_multiple_values": false,
"date_created": "2014-11-07T05:06:09.422000+00:00",
"date_updated": "2014-11-10T20:56:16.784000+00:00",
"created_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"organization_id": "orga_vfvFDAKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X"
}
Update a Lead Custom Field
Update a Lead Custom Field - you can rename it, change its type, change whether it accepts multiple values or not, or update the options for a "choices" field type. The updated name will immediately appear in all the Lead API responses and only valid values for the updated type
will be returned.
Some of the type changes need to convert all of the existing values for a given custom field to the new type. When this is required, the response will include an additional converting_to_type
field. When the conversion is done, converting_to_type
will no longer be returned.
curl -XPUT "https://api.close.com/api/v1/custom_field/lead/{custom_field_id}/"
Request Headers
content-type: application/json
Request Body
{
"name": "Number of users",
"type": "text",
}
Response Headers
content-type: application/json
Response Body
{
"id": "lcf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c",
"name": "Number of users",
"description": "The number of users in the company",
"type": "text",
"accepts_multiple_values": false,
"date_created": "2014-11-07T05:06:09.422000+00:00",
"date_updated": "2014-11-10T20:56:16.784000+00:00",
"created_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by": "user_asdflkjlkdsg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"organization_id": "orga_vfvFDAKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X"
}
Delete a Lead Custom Field
Delete a Lead Custom Field. The field will immediately disappear from any Lead API responses.
curl -XDELETE "https://api.close.com/api/v1/custom_field/lead/{custom_field_id}/"
Response Headers
content-type: application/json
Response Body
{}
List all the Contact Custom Fields for your organization
List all the Contact Custom Fields for your organization.
curl -XGET "https://api.close.com/api/v1/custom_field/contact/"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"name": "Role",
"description": null,
"date_updated": "2020-02-07T11:54:50.770000+00:00",
"accepts_multiple_values": false,
"editable_with_roles": [],
"choices": [
"Account Executive",
"CEO",
"Sales Rep"
],
"organization_id": "orga_AzZ6yYoCw0vOQpFmstW3v0VSQmks4aBXWx9XpfCeRZa",
"created_by": "user_RpZI6ltjRRDQvwoC1FNVuSOB9TaIkb6GiVs8kOs80X2",
"date_created": "2020-02-07T11:54:50.770000+00:00",
"type": "choices",
"id": "ccf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj",
"updated_by": "user_RpZI6ltjRRDQvwoC1FNVuSOB9TaIkb6GiVs8kOs80X2"
}
]
}
Fetch Contact Custom Field's details
Fetch Contact Custom Field's details.
curl -XGET "https://api.close.com/api/v1/custom_field/contact/{id}/"
Response Headers
content-type: application/json
Response Body
{
"name": "Role",
"description": null,
"date_updated": "2020-02-07T11:54:50.770000+00:00",
"accepts_multiple_values": false,
"editable_with_roles": [],
"choices": [
"Account Executive",
"CEO",
"Sales Rep"
],
"organization_id": "orga_AzZ6yYoCw0vOQpFmstW3v0VSQmks4aBXWx9XpfCeRZa",
"created_by": "user_RpZI6ltjRRDQvwoC1FNVuSOB9TaIkb6GiVs8kOs80X2",
"date_created": "2020-02-07T11:54:50.770000+00:00",
"type": "choices",
"id": "ccf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj",
"updated_by": "user_RpZI6ltjRRDQvwoC1FNVuSOB9TaIkb6GiVs8kOs80X2"
}
Create a new Contact Custom Field
Create a new Contact Custom Field.
curl -XPOST "https://api.close.com/api/v1/custom_field/contact/"
Request Headers
content-type: application/json
Request Body
{
"name": "Role",
"type": "choices",
"choices": ["CEO", "Account Executive", "Sales Rep"]
}
Response Headers
content-type: application/json
Response Body
{
"name": "Role",
"description": null,
"date_updated": "2020-02-07T11:54:50.770000+00:00",
"accepts_multiple_values": false,
"editable_with_roles": [],
"choices": [
"Account Executive",
"CEO",
"Sales Rep"
],
"organization_id": "orga_AzZ6yYoCw0vOQpFmstW3v0VSQmks4aBXWx9XpfCeRZa",
"created_by": "user_RpZI6ltjRRDQvwoC1FNVuSOB9TaIkb6GiVs8kOs80X2",
"date_created": "2020-02-07T11:54:50.770000+00:00",
"type": "choices",
"id": "ccf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj",
"updated_by": "user_RpZI6ltjRRDQvwoC1FNVuSOB9TaIkb6GiVs8kOs80X2"
}
Update a Contact Custom Field
Update a Contact Custom Field - you can rename it, change its type, change whether it accepts multiple values or not, or update the options for a "choices" field type. The updated name will immediately appear in all the Contact API responses and only valid values for the updated type
will be returned.
Some of the type changes need to convert all of the existing values for a given custom field to the new type. When this is required, the response will include an additional converting_to_type
field. When the conversion is done, converting_to_type
will no longer be returned.
curl -XPUT "https://api.close.com/api/v1/custom_field/contact/{custom_field_id}/"
Request Headers
content-type: application/json
Request Body
{
"name": "Role in Organization"
}
Response Headers
content-type: application/json
Response Body
{
"name": "Role in Organization",
"description": null,
"date_updated": "2020-02-07T12:03:53.995000+00:00",
"accepts_multiple_values": false,
"editable_with_roles": [],
"choices": [
"Account Executive",
"CEO",
"Sales Rep"
],
"organization_id": "orga_AzZ6yYoCw0vOQpFmstW3v0VSQmks4aBXWx9XpfCeRZa",
"created_by": "user_RpZI6ltjRRDQvwoC1FNVuSOB9TaIkb6GiVs8kOs80X2",
"date_created": "2020-02-07T11:54:50.770000+00:00",
"type": "choices",
"id": "ccf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj",
"updated_by": "user_RpZI6ltjRRDQvwoC1FNVuSOB9TaIkb6GiVs8kOs80X2"
}
Delete a Contact Custom Field
Delete a Contact Custom Field. The field will immediately disappear from any Contact API responses.
curl -XDELETE "https://api.close.com/api/v1/custom_field/contact/{custom_field_id}/"
Response Headers
content-type: application/json
Response Body
{}
List all the Activity Custom Fields for your organization
List all the Activity Custom Fields for your organization.
curl -XGET "https://api.close.com/api/v1/custom_field/activity/"
Response Headers
content-type: application/json
Response Body
{
"data": [
{
"description": "Email of the person who signed up for the newsletter",
"organization_id": "orga_BmczgkI1yJt896ACb956T0iaySHH0FhRyo6wfKUuU4c",
"type": "text",
"accepts_multiple_values": false,
"id": "acf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S",
"created_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"name": "Email Address",
"editable_with_roles": [],
"date_updated": "2020-08-04T17:36:09.235000+00:00",
"updated_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"date_created": "2020-08-04T17:36:09.235000+00:00",
"custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y",
"required": true
},
{
"description": null,
"choices": [
"Yes",
"No"
],
"organization_id": "orga_BmczgkI1yJt896ACb956T0iaySHH0FhRyo6wfKUuU4c",
"type": "choices",
"accepts_multiple_values": false,
"id": "acf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g",
"created_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"name": "Wants Marketing Materials",
"editable_with_roles": [],
"date_updated": "2020-07-28T20:05:36.202000+00:00",
"updated_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"date_created": "2020-07-28T20:05:36.202000+00:00",
"custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y",
"required": false
}
],
"has_more": false
}
Fetch Activity Custom Field's details
Fetch Activity Custom Field's details.
curl -XGET "https://api.close.com/api/v1/custom_field/activity/{id}/"
Response Headers
content-type: application/json
Response Body
{
"description": null,
"choices": [
"Yes",
"No"
],
"organization_id": "orga_BmczgkI1yJt896ACb956T0iaySHH0FhRyo6wfKUuU4c",
"type": "choices",
"accepts_multiple_values": false,
"id": "acf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g",
"created_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"name": "Wants Marketing Materials",
"editable_with_roles": [],
"date_updated": "2020-07-28T20:05:36.202000+00:00",
"updated_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"date_created": "2020-07-28T20:05:36.202000+00:00",
"custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y",
"required": false
}
Create a new Activity Custom Field
Create a new Activity Custom Field.
Activity Custom Fields belong to Custom Activities, and have additional required attributes:
custom_activity_type_id
, which is the ID of the Custom Activity Type this field belongs to.required
, whether the field will be requied to publish the activity.
curl -XPOST "https://api.close.com/api/v1/custom_field/activity/"
Request Headers
content-type: application/json
Request Body
{
"custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y",
"editable_with_roles": [],
"name": "Contact Name",
"accepts_multiple_values": false,
"type": "text",
"required": false
}
Response Headers
content-type: application/json
Response Body
{
"description": null,
"organization_id": "orga_BmczgkI1yJt896ACb956T0iaySHH0FhRyo6wfKUuU4c",
"type": "text",
"accepts_multiple_values": false,
"id": "acf_1nkEcnaoAiTJBfYmTBsOQqFCuIkqc82Q f4yKUx01e0K",
"created_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"name": "Contact Name",
"editable_with_roles": [],
"date_updated": "2020-08-07T17:11:44.299904",
"updated_ by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"date_created": "2020-08-07T17:11:44.299904",
"custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y",
"required": false
}
Update an Activity Custom Field
Update an Activity Custom Field - you can rename it, change whether it accepts multiple values or not, change the "required" flag or update the options for a "choices" field type. The updated name will immediately appear in all the Custom Activity API responses and only valid values for the updated type
will be returned.
The custom_activity_type_id
value cannot be changed.
curl -XPUT "https://api.close.com/api/v1/custom_field/activity/{custom_field_id}/"
Request Headers
content-type: application/json
Request Body
{
"name": "Contact Submitted Name"
}
Response Headers
content-type: application/json
Response Body
{
"description": null,
"organization_id": "orga_BmczgkI1yJt896ACb956T0iaySHH0FhRyo6wfKUuU4c",
"type": "text",
"accepts_multiple_values": false,
"id": "acf_1nkEcnaoAiTJBfYmTBsOQqFCuIkqc82Q f4yKUx01e0K",
"created_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"name": "Contact Submitted Name",
"editable_with_roles": [],
"date_updated": "2020-08-07T17:11:44.299904",
"updated_ by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"date_created": "2020-08-07T17:11:44.299904",
"custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y",
"required": false
}
Delete an activity custom field
Delete an activity custom field. The field will immediately disappear from the Custom Activity Type and any Custom Activity API responses.
curl -XDELETE "https://api.close.com/api/v1/custom_field/activity/{custom_field_id}/"
Response Headers
content-type: application/json
Response Body
{}
Lead Statuses
Lead statuses are a customizable list of stages a Lead can be in.
List lead statuses for your organization
List lead statuses for your organization.
curl -XGET "https://api.close.com/api/v1/status/lead/"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Potential",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen"
},
{
"id": "stat_2ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Bad Fit",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen"
},
{
"id": "stat_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Qualified",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen"
},
{
"id": "stat_8ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Not Serious",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen"
}
]
}
Create a new status that can be applied to leads
Create a new status that can be applied to leads.
curl -XPOST "https://api.close.com/api/v1/status/lead/"
Request Headers
content-type: application/json
Request Body
{
"label": "Potential"
}
Response Headers
content-type: application/json
Response Body
{
"id": "stat_9ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Potential",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen"
}
Rename a lead status
Rename a lead status.
Note: to update the status of a particular lead, see PUT /lead/{lead_id}/
curl -XPUT "https://api.close.com/api/v1/status/lead/{status_id}/"
Request Headers
content-type: application/json
Request Body
{
"label": "Renamed"
}
Response Headers
content-type: application/json
Response Body
{
"id": "stat_9ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Renamed",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen"
}
Delete a lead status
Opportunity Statuses
Opportunity statuses are a customizable list of stages an Opportunity can be in.
Each Opportunity Status always has a status_type
of either active
, won
, or lost
.
List opportunity statuses for your organization
List opportunity statuses for your organization.
curl -XGET "https://api.close.com/api/v1/status/opportunity/"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Active",
"type": "active",
"pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen"
},
{
"id": "stat_5ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Won",
"type": "won",
"pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen"
},
{
"id": "stat_6ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Lost",
"type": "lost",
"pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen"
},
{
"id": "stat_7ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "On hold",
"type": "active",
"pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen"
}
]
}
Create an opportunity status
Create an opportunity status.
There are three different types of opportunity statuses: active
, won
, lost
.
To create an Opportunity Status in a specific Pipeline, include
a pipeline_id
in your payload.
curl -XPOST "https://api.close.com/api/v1/status/opportunity/"
Request Headers
content-type: application/json
Request Body
{
"label": "Closed",
"type": "won",
"pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j"
}
Response Headers
content-type: application/json
Response Body
{
"id": "stat_10diZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Closed",
"type": "won",
"pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen"
}
Rename an opportunity status
Rename an opportunity status.
curl -XPUT "https://api.close.com/api/v1/status/opportunity/{status_id}/"
Request Headers
content-type: application/json
Request Body
{
"label": "Renamed",
}
Response Headers
content-type: application/json
Response Body
{
"id": "stat_10diZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Renamed",
"type": "active",
"pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen"
}
Delete an opportunity status
Pipelines
Pipelines are named and ordered groups of Opportunity Statuses. They allow you to group your Opportunity Statuses into separate categories that make sense for the different teams and workflows at your company. For example, you can have a "Sales" Pipeline and a separate "Professional Services" Pipeline.
List Pipelines for your organization
List Pipelines for your organization.
curl -XGET "https://api.close.com/api/v1/pipeline/"
Response Headers
content-type: application/json
Response Body
{
"data": [
{
"id": "pipe_6gV01if4wo7r2YTVQDWP2j",
"name": "Sales",
"statuses": [
{
"id": "stat_3PB2sedHBCjwuBImAEwgHOo858f2j41lpROkcl51Fzp",
"label": "Active",
"type": "active"
},
{
"id": "stat_IOCtLYbAclJ8XAcb3yLUhQA3zlmjtXz8JMBLyXnNMF8",
"label": "Won",
"type": "won"
},
{
"id": "stat_3mmBOyMmaG8yc4DmAPp9WmgbjhVctVLlnd9gmvWxBe2",
"label": "Lost",
"type": "lost"
},
],
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"date_created": "2019-11-04T11:04:13.014979",
"date_updated": "2019-11-13T14:12:13.051542",
"organization_id": "orga_YB6zDvv1kqPY0veXLaJWUkoBsHbkVOKistq4eFqYmH0"
}
]
}
Create a Pipeline
Create a Pipeline.
curl -XPOST "https://api.close.com/api/v1/pipeline/"
Request Headers
content-type: application/json
Request Body
{
"name": "Success"
}
Response Headers
content-type: application/json
Response Body
{
"id": "pipe_6gV01if4wo7r2YTVQDWP2j",
"name": "Success",
"statuses": [],
"created_by": "user_weVpFmazZ9sg3FHYQcUwV7tbwZRpe3B8995Ftv8OvbU",
"updated_by": "user_weVpFmazZ9sg3FHYQcUwV7tbwZRpe3B8995Ftv8OvbU",
"date_created": "2019-11-04T11:04:13.014979",
"date_updated": "2019-11-13T14:12:13.051542",
"organization_id": "orga_YB6zDvv1kqPY0veXLaJWUkoBsHbkVOKistq4eFqYmH0"
}
Update a Pipeline
Update a Pipeline.
You can use this endpoint to:
- Rename a Pipeline.
- Reorder Opportunity Statuses within a Pipeline.
- Move an Opportunity Status from a different Pipeline into this one.
- To do so, include
{"id": "id_of_the_status_from_another_pipeline"}
in thestatuses
list.
- To do so, include
curl -XPUT "https://api.close.com/api/v1/pipeline/{pipeline_id}/"
Request Headers
content-type: application/json
Request Body
{
"name": "Updated Name",
"statuses": [
{"id": "stat_3mmBOyMmaG8yc4DmAPp9WmgbjhVctVLlnd9gmvWxBe2"},
{"id": "stat_IOCtLYbAclJ8XAcb3yLUhQA3zlmjtXz8JMBLyXnNMF8"},
{"id": "stat_3PB2sedHBCjwuBImAEwgHOo858f2j41lpROkcl51Fzp"}
]
}
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_YB6zDvv1kqPY0veXLaJWUkoBsHbkVOKistq4eFqYmH0",
"id": "pipe_6gV01if4wo7r2YTVQDWP2j",
"name": "Updated Name",
"statuses": [
{
"id": "stat_3mmBOyMmaG8yc4DmAPp9WmgbjhVctVLlnd9gmvWxBe2",
"label": "Lost",
"type": "lost"
},
{
"id": "stat_IOCtLYbAclJ8XAcb3yLUhQA3zlmjtXz8JMBLyXnNMF8",
"label": "Won",
"type": "won"
},
{
"id": "stat_3PB2sedHBCjwuBImAEwgHOo858f2j41lpROkcl51Fzp",
"label": "Active",
"type": "active"
}
],
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"date_created": "2019-11-04T11:04:13.014979",
"date_updated": "2019-11-15T14:12:13.051542"
}
Delete a Pipeline
Delete a Pipeline.
This is only allowed if the Pipeline doesn't contain any Opportunity Statuses. Before deleting a Pipeline, make sure you delete all of its Opportunity Statuses or you move them to another Pipeline.
curl -XDELETE "https://api.close.com/api/v1/pipeline/{pipeline_id}/"
Response Headers
content-type: application/json
Response Body
{}
Groups
Groups are named collections of Users. They allow you to refer to multiple Users as a unit in various product areas like filtering and reporting. A group typically represents a team in your company. For example, you can have a Sales group and a Support group. A User can be a member of multiple Groups.
Endpoints for groups require a ?_fields=name,members
GET parameter to return corresponding field data. Specify only the fields you want to reduce the amount of data returned.
Endpoints that support filtering for both groups and users use the existing ?user_id__in=user_abc,user_xyz
GET parameter. To filter for users that belong to a group, just include the group ID. You can mix individual users and groups in the same request. For example:
?user_id__in=user_abc,group_xyz
List Groups for your organization
List Groups for your organization.
Note that list endpoint does not support retrieving members for all groups. Use individual group endpoint instead.
curl -XGET "https://api.close.com/api/v1/group/?_fields=name"
Response Headers
content-type: application/json
Response Body
{
"data": [
{
"id": "group_57P6QUf8b4BlepZJYgRj5W",
"name": "Support",
"organization_id": "orga_YB6zDvv1kqPY0veXLaJWUkoBsHbkVOKistq4eFqYmH0"
}
]
}
Fetch an individual Group
Fetch an individual Group.
curl -XGET "https://api.close.com/api/v1/group/{group_id}/?_fields=name,members"
Response Headers
content-type: application/json
Response Body
{
"id": "group_57P6QUf8b4BlepZJYgRj5W",
"name": "Support",
"members": [
{
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
},
],
"organization_id": "orga_YB6zDvv1kqPY0veXLaJWUkoBsHbkVOKistq4eFqYmH0"
}
Create a Group
Create a Group.
A group is created with no users. Use the member endpoint to add or remove members.
curl -XPOST "https://api.close.com/api/v1/group/?_fields=name,members"
Request Headers
content-type: application/json
Request Body
{
"name": "Support"
}
Response Headers
content-type: application/json
Response Body
{
"id": "group_57P6QUf8b4BlepZJYgRj5W",
"name": "Support",
"members": [],
"organization_id": "orga_YB6zDvv1kqPY0veXLaJWUkoBsHbkVOKistq4eFqYmH0"
}
Update a Group
Update a Group.
You can use this endpoint to rename a Group. If a name is not unique, an error will be returned.
curl -XPUT "https://api.close.com/api/v1/group/{group_id}/?_fields=name,members"
Request Headers
content-type: application/json
Request Body
{
"name": "Sales",
}
Response Headers
content-type: application/json
Response Body
{
"id": "group_57P6QUf8b4BlepZJYgRj5W",
"name": "Sales",
"members": [
{
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
},
],
"organization_id": "orga_YB6zDvv1kqPY0veXLaJWUkoBsHbkVOKistq4eFqYmH0"
}
Delete a Group
Delete a Group.
This is only allowed if the Group is not referenced by saved reports or smart views.
curl -XDELETE "https://api.close.com/api/v1/group/{group_id}/"
Response Headers
content-type: application/json
Response Body
{}
Add a User to a Group
Add a User to a Group.
If the user is already a member of the group, nothing changes.
curl -XPOST "https://api.close.com/api/v1/group/{group_id}/member/"
Request Headers
content-type: application/json
Request Body
{
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
}
Response Headers
content-type: application/json
Response Body
{
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
}
Remove a User from a Group
Reporting
These endpoints return aggregate data used by the Reporting features of Close. Any fields related to revenue are returned in cents. Any duration values are returned in seconds.
List the predefined metrics used in activity reports
List the predefined metrics used in activity reports.
These metrics are available to use in the report API below.
curl -XGET "https://api.close.com/api/v1/report/activity/metrics/"
Response Headers
content-type: application/json
Response Body
{
"metrics": [
{
"name": "Outbound Calls - Predictive Dialer Average Duration",
"key": "calls.outbound.predictive_dialer.avg_duration",
"description": "The average duration of outbound calls made via the Predictive Dialer."
},
{
"name": "Opportunities - Lost",
"key": "opportunities.lost.all.count",
"description": "The number of lost opportunities created for/assigned to a user."
},
{
"name": "Opportunities - Won - Annualized",
"key": "opportunities.won.all.sum_annualized_value",
"description": "The annualized value of won opportunities created for/assigned to a user."
},
{
"name": "Sent Emails - All Types",
"key": "emails.sent.all.count",
"description": "The number of all sent emails."
},
{
"name": "Outbound Calls - Regular Total Duration",
"key": "calls.outbound.regular.sum_duration",
"description": "The total duration of regular outbound calls made."
},
{
"name": "Outbound Calls - All Types",
"key": "calls.outbound.all.count",
"description": "The number of all outbound calls made."
},
{
"name": "Outbound Calls - Total Duration",
"key": "calls.outbound.all.sum_duration",
"description": "The total duration of all outbound calls made."
},
{
"name": "Outbound Calls - External",
"key": "calls.outbound.external.count",
"description": "The number of external outbound calls."
},
{
"name": "Outbound Calls - Regular",
"key": "calls.outbound.regular.count",
"description": "The number of regular outbound calls made."
},
{
"name": "Inbound Calls - Total Duration",
"key": "calls.inbound.all.sum_duration",
"description": "The total duration of inbound calls made."
},
{
"name": "Received SMS - All Types",
"key": "sms.received.all.count",
"description": "The number of all received SMS messages."
},
{
"name": "Inbound Calls - Average Duration",
"key": "calls.inbound.all.avg_duration",
"description": "The average duration of inbound calls made."
},
{
"name": "Sent Emails - Sequences",
"key": "emails.sent.sequences.count",
"description": "The number of emails sent by a sequence."
},
{
"name": "Outbound Calls - Power Dialer Average Duration",
"key": "calls.outbound.power_dialer.avg_duration",
"description": "The average duration of outbound calls made via the Power Dialer."
},
{
"name": "All Calls - Average Duration",
"key": "calls.all.all.avg_duration",
"description": "The average duration of all calls made."
},
{
"name": "Outbound Calls - External Average Duration",
"key": "calls.outbound.external.avg_duration",
"description": "The average duration of external outbound calls."
},
{
"name": "Created Leads",
"key": "leads.created.all.count",
"description": "The number of leads created."
},
{
"name": "Opportunities - Won",
"key": "opportunities.won.all.count",
"description": "The number of won opportunities created for/assigned to a user."
},
{
"name": "Outbound Calls - Power Dialer",
"key": "calls.outbound.power_dialer.count",
"description": "The number of outbound calls made via the Power Dialer."
},
{
"name": "Opportunities - Won - Annual",
"key": "opportunities.value_won.annual.count",
"description": "The number of annual won opportunities created for/assigned to a user."
},
{
"name": "Sent SMS - All Types",
"key": "sms.sent.all.count",
"description": "The number of all sent SMS messages."
},
{
"name": "Opportunities - Lost - One Time",
"key": "opportunities.value_lost.one_time.count",
"description": "The number of one-time lost opportunities created for/assigned to a user."
},
{
"name": "Opportunities - Value Won - Monthly",
"key": "opportunities.value_won.monthly.sum_value",
"description": "The total value of monthly won opportunities created for/assigned to a user."
},
{
"name": "Opportunities - Value Lost - Annual",
"key": "opportunities.value_lost.annual.sum_value",
"description": "The total value of annual lost opportunities created for/assigned to a user."
},
{
"name": "Received Emails - All Types",
"key": "emails.received.all.count",
"description": "The number of all incoming emails."
},
{
"name": "Contacted Leads",
"key": "leads.contacted.all.count",
"description": "The leads that have been contacted via a call, email or SMS."
},
{
"name": "Sent Emails - Sequences with Reply",
"key": "emails.sent.sequences_with_reply.count",
"description": "The number of emails sent by a sequence that have a reply."
},
{
"name": "Inbound Calls - All Types",
"key": "calls.inbound.all.count",
"description": "The number of inbound calls made."
},
{
"name": "Opened Emails - All Types",
"key": "emails.opened.all.count",
"description": "The number of outgoing emails of all types that have been opened by the recipient."
},
{
"name": "Opportunities - Created",
"key": "opportunities.created.all.count",
"description": "The number of opportunities created by a user."
},
{
"name": "Outbound Calls - Regular Average Duration",
"key": "calls.outbound.regular.avg_duration",
"description": "The average duration of regular outbound calls made."
},
{
"name": "Sent Emails - Sequences without Reply",
"key": "emails.sent.sequences_without_reply.count",
"description": "The number of emails sent by a sequence that do not have a reply."
},
{
"name": "Outbound Calls - Predictive Dialer",
"key": "calls.outbound.predictive_dialer.count",
"description": "The number of outbound calls made via the Predictive Dialer."
},
{
"name": "Opportunities - Lost - Annualized",
"key": "opportunities.lost.all.sum_annualized_value",
"description": "The annualized value of lost opportunities created for/assigned to a user."
},
{
"name": "Opportunities - Won - Monthly",
"key": "opportunities.value_won.monthly.count",
"description": "The number of monthly won opportunities created for/assigned to a user."
},
{
"name": "Opportunities - Lost - Annual",
"key": "opportunities.value_lost.annual.count",
"description": "The number of annual lost opportunities created for/assigned to a user."
},
{
"name": "Opportunities - Created For",
"key": "opportunities.created_for.all.count",
"description": "The number of opportunities created for/assigned to a user."
},
{
"name": "Outbound Calls - Predictive Dialer Total Duration",
"key": "calls.outbound.predictive_dialer.sum_duration",
"description": "The total duration of outbound calls made via the Predictive Dialer."
},
{
"name": "All Calls - Total Duration",
"key": "calls.all.all.sum_duration",
"description": "The total duration of all calls made."
},
{
"name": "All Calls - All Types",
"key": "calls.all.all.count",
"description": "The number of all calls made."
},
{
"name": "Opportunities - Lost - Monthly",
"key": "opportunities.value_lost.monthly.count",
"description": "The number of monthly lost opportunities created for/assigned to a user."
},
{
"name": "Outbound Calls - Power Dialer Total Duration",
"key": "calls.outbound.power_dialer.sum_duration",
"description": "The total duration of outbound calls made via the Power Dialer."
},
{
"name": "Opportunities - Value Lost - One Time",
"key": "opportunities.value_lost.one_time.sum_value",
"description": "The total value of one-time lost opportunities created for/assigned to a user."
},
{
"name": "Outbound Calls - Average Duration",
"key": "calls.outbound.all.avg_duration",
"description": "The average duration of all outbound calls made."
},
{
"name": "Opportunities - Value Lost - Monthly",
"key": "opportunities.value_lost.monthly.sum_value",
"description": "The total value of monthly lost opportunities created for/assigned to a user."
},
{
"name": "Outbound Calls - External Total Duration",
"key": "calls.outbound.external.sum_duration",
"description": "The total duration of external outbound calls."
},
{
"name": "Opportunities - Won - One Time",
"key": "opportunities.value_won.one_time.count",
"description": "The number of one-time won opportunities created for/assigned to a user."
},
{
"name": "Opportunities - Value Won - Annual",
"key": "opportunities.value_won.annual.sum_value",
"description": "The total value of annual won opportunities created for/assigned to a user."
},
{
"name": "Opportunities - Value Won - One Time",
"key": "opportunities.value_won.one_time.sum_value",
"description": "The total value of one-time won opportunities created for/assigned to a user."
},
{
"name": "Opened Emails - Sequences",
"key": "emails.opened.sequences.count",
"description": "The number of outgoing emails sent by a sequence that have been opened by the recipient."
}
]
}
Get an activity report
Get an activity report.
The activity report returns the organization's metrics per time period (overview report) or user (comparison report).
Every report accepts the following parameters:
datetime_range
: a time range to fetch data for. Either this field orrelative_range
needs to be specified.relative_range
: a relative time range to fetch data for. The allowed values are:today
,this-week
,this-month
,this-quarter
,this-year
,yesterday
,last-week
,last-month
,last-quarter
,last-year
, andall-time
. Either this field ordatetime_range
needs to be specified.query
: a query to apply to the report to filter out data. The value of the field is a dictionary with the keytype
and any type-specific keys. For now only the typesaved_search
is allowed which takes the extra keysaved_search_id
to specify the ID of a saved search. This parameter is optional.users
: a list of user IDs to limit the report results to. This parameter is optional.type
: the type of the report. The available values areoverview
andcomparison
. This parameter is mandatory.metrics
: a list of metrics (see above) to fetch for the report. This parameter is mandatory.
The report can be requested either in a JSON format or in a CSV file. The format can be specified with the accept
header.
curl -XPOST "https://api.close.com/api/v1/report/activity/"
Request Headers
accept: application/json
content-type: application/json
Request Body
{
"datetime_range": {
"start": "2019-01-01T00:00:00Z",
"end": "2019-01-08T00:00:00Z"
},
"query": {
"type": "saved_search",
"saved_search_id": "save_ZVc26G33JTNiDNEFdZhBQAONg9cJHleAAHqBJakf239"
},
"users": [
"user_HeC7QVuCLHXwIX2hXrAwWeXetNWsvAemivBQMudI8iX",
"user_RCOioHuk6t0OBhZBOxsqXR9cBp4e35Pyz0FBUPcg2F1"
],
"type": "overview",
"metrics": [
"calls.outbound.all.count",
"emails.sent.all.count"
],
}
Response Headers
content-type: application/json
Response Body
{
"data": [
{
"emails.sent.all.count": 0,
"calls.outbound.all.count": 0,
"datetime": "2019-01-01T00:00:00+00:00"
},
{
"emails.sent.all.count": 0,
"calls.outbound.all.count": 0,
"datetime": "2019-01-02T00:00:00+00:00"
},
{
"emails.sent.all.count": 0,
"calls.outbound.all.count": 0,
"datetime": "2019-01-03T00:00:00+00:00"
},
{
"emails.sent.all.count": 0,
"calls.outbound.all.count": 0,
"datetime": "2019-01-04T00:00:00+00:00"
},
{
"emails.sent.all.count": 0,
"calls.outbound.all.count": 0,
"datetime": "2019-01-05T00:00:00+00:00"
},
{
"emails.sent.all.count": 0,
"calls.outbound.all.count": 0,
"datetime": "2019-01-06T00:00:00+00:00"
},
{
"emails.sent.all.count": 0,
"calls.outbound.all.count": 0,
"datetime": "2019-01-07T00:00:00+00:00"
}
],
"aggregations": {
"totals": {
"emails.sent.all.count": 0,
"calls.outbound.all.count": 0
}
},
"queries": {
"leads": {
"emails.sent.all.count": [
"email(direction: \"outgoing\" and sent >= \"2019-01-01T00:00:00.000+0000\" and sent < \"2019-01-08T00:00:00.000+0000\" and status: \"sent\" and user in (\"user_HeC7QVuCLHXwIX2hXrAwWeXetNWsvAemivBQMudI8iX\", \"user_RCOioHuk6t0OBhZBOxsqXR9cBp4e35Pyz0FBUPcg2F1\")) and in:\"save_ZVc26G33JTNiDNEFdZhBQAONg9cJHleAAHqBJakf239\""
],
"calls.outbound.all.count": [
"call(direction: \"outbound\" and outgoing_call_date >= \"2019-01-01T00:00:00.000+0000\" and outgoing_call_date < \"2019-01-08T00:00:00.000+0000\" and user in (\"user_HeC7QVuCLHXwIX2hXrAwWeXetNWsvAemivBQMudI8iX\", \"user_RCOioHuk6t0OBhZBOxsqXR9cBp4e35Pyz0FBUPcg2F1\")) and in:\"save_ZVc26G33JTNiDNEFdZhBQAONg9cJHleAAHqBJakf239\""
]
}
}
}
Get an activity report for an organization
Get an activity report for an organization.
This endpoint is deprecated. Use the newer Activity Reports endpoint to get this same data.
curl -XGET "https://api.close.com/api/v1/report/activity/{ORGANIZATION_ID}/{?user_id,date_start,date_end,query}"
Response Headers
content-type: application/json
Response Body
{
"_queries": {
"calls": "call(date >= 2014-01-31 date <= 2014-03-31)",
"emails_received": "email(direction:received date >= 2014-01-31 date <= 2014-03-31)",
"emails_sent": "email(direction:sent date >= 2014-01-31 date <= 2014-03-31)",
"leads_contacted": "call(duration > 0 date >= 2014-01-31 date <= 2014-03-31) or email(direction:sent date >= 2014-01-31 date <= 2014-03-31)",
"leads_created": "created >= 2014-01-31 created <= 2014-03-31",
"opportunities_created": "opportunity(created >= 2014-01-31 created <= 2014-03-31)",
"opportunities_lost": "opportunity(status_type:lost lost >= 2014-01-31 lost <= 2014-03-31)",
"opportunities_won": "opportunity(status_type:won closed >= 2014-01-31 closed <= 2014-03-31)"
},
"calls": 532,
"calls_duration_average": 50.03571,
"calls_duration_total": 26619,
"emails_received": 3553,
"emails_sent": 1412,
"leads_contacted": 2563,
"leads_created": 697,
"opportunities_created": 158,
"opportunities_lost": 65,
"opportunities_won": 87,
"revenue_created_annual": 534000,
"revenue_created_monthly": 1434125,
"revenue_created_one_time": 80275,
"revenue_lost_annual": 8000,
"revenue_lost_monthly": 786375,
"revenue_lost_one_time": 1600,
"revenue_won_annual": 416500,
"revenue_won_monthly": 2277375,
"revenue_won_one_time": 17000
}
Get a report about sent emails grouped by template
Get a report about sent emails grouped by template.
curl -XGET "https://api.close.com/api/v1/report/sent_emails/{ORGANIZATION_ID}/{?user_id,date_start,date_end}"
Response Headers
content-type: application/json
Response Body
{
"sent_email_stats": [
{
"_queries": {
"opened": "email(direction:sent opened:yes)",
"responded": "email(direction:sent has_reply:yes)",
"total": "email(direction:sent)"
},
"is_shared": true,
"name": "All Emails",
"opened": 3474546,
"percentage_opened": 21,
"percentage_responded": 10,
"responded": 348741,
"template_id": null,
"template_url": null,
"total": 735434
},
{
"_queries": {
"opened": "email(direction:sent template:\"Promo Email\" opened:yes)",
"responded": "email(direction:sent template:\"Promo Email\" has_reply:yes)",
"total": "email(direction:sent template:\"Promo Email\")"
},
"is_shared": true,
"name": "Promo Email",
"opened": 40,
"percentage_opened": 40,
"percentage_responded": 9,
"responded": 9,
"template_id": "tmpl_vB0Ql8Npgkq84jly82lqFn331D2tFfA2QXcRUvzcCOt",
"template_url": "/organization/orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen/email_templates/tmpl_vB0Ql8Npgkq84jly82lqFn331D2tFfA2QXcRUvzcCOt/",
"total": 101
},
}
Get a lead status change report
Get a lead status change report.
The date range is optional. A report may be requested for a specific time period or overall.
You can specify either a query
or smart_view_id
(but not both) to filter leads included in the report.
The following fields are returned (when requesting an overall report, some inapplicable fields will not be returned):
status_overview
: A list of all lead statuses with the following fields:status_id
,status_label
,status_is_deleted
: The ID and label of the status, and whether it was deleted.started
: Number of leads in this status at the start of the period.ended
: Number of leads in this status at the end of the period.change
: The net change of the number of leads during the period (ended
minusstarted
).change_percent
: The net change of leads in in percent.gained
: Number of leads that were not in this status at the beginning of the period, but were in this status at the end of the period, i.e. leads that transitioned into this status at some point during the period and stayed in this status at the end of the period.lost
: Number of leads that were in this status at the beginning of the period, but were not in this status at the end of the period, i.e. leads that transitioned out of this status at some point during the period and stayed in some other status at the end of the period.entered
: Number of leads that entered this status at some point during the period.left
: Number of leads that left this status at some point during the period._queries
: A dictionary containing search queries which list the leads for the different states (started
,ended
,gained
,lost
,entered
,left
)_leads_page_urls
: A dictionary similar to_queries
containing paths to the lead search UI page for the different states.
status_transitions
: A list of all status transitions (aggregated by start/end status) for the given period with the following fields:from_status_id
,from_status_label
,from_status_is_deleted
: The ID and label of the starting status, and whether it was deleted. For created leads, these fields are all null.to_status_id
,to_status_label
,to_status_is_deleted
: The ID and label of the ending status, and whether it was deleted.count
: The amount of leads that ever transitioned from the starting status to the ending status during the period._query
: The search query which lists the leads._leads_page_url
: The path to the lead search UI page which lists the leads.
status_transitions_summary
: A list of status transitions (aggregated by start/end status), summarized for the given period. For example, a lead that went from status A to status B, and then from status B to status C in the given period will be counted in the transition from A to C. The fields are the same as those returned instatus_transitions
.
curl -XGET "https://api.close.com/api/v1/report/statuses/lead/{ORGANIZATION_ID}/?{date_start,date_end,query}"
Response Headers
content-type: application/json
Response Body
{
"status_overview": [
{
"_leads_page_urls": {
"ended": "/search/lead_status%28status%3A%22Potential%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/",
"entered": "/search/%28original_lead_status%3A%22Potential%22%20and%20created%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20created%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%20or%20lead_status_change%28new_status%3A%22Potential%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29/",
"gained": "/search/not%20lead_status%28status%3A%22Potential%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20lead_status%28status%3A%22Potential%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/",
"left": "/search/lead_status_change%28old_status%3A%22Potential%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29/",
"lost": "/search/lead_status%28status%3A%22Potential%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20not%20lead_status%28status%3A%22Potential%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/",
"started": "/search/lead_status%28status%3A%22Potential%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29/"
},
"_queries": {
"ended": "lead_status(status:\"Potential\" on:\"2014-06-01 06:59:59\")",
"entered": "(original_lead_status:\"Potential\" and created >= \"2014-01-01 08:00:00\" and created <= \"2014-06-01 06:59:59\") or lead_status_change(new_status:\"Potential\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\")",
"gained": "not lead_status(status:\"Potential\" on:\"2014-01-01 08:00:00\") and lead_status(status:\"Potential\" on:\"2014-06-01 06:59:59\")",
"left": "lead_status_change(old_status:\"Potential\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\")",
"lost": "lead_status(status:\"Potential\" on:\"2014-01-01 08:00:00\") and not lead_status(status:\"Potential\" on:\"2014-06-01 06:59:59\")",
"started": "lead_status(status:\"Potential\" on:\"2014-01-01 08:00:00\")"
},
"change": 1268,
"change_percent": 3,
"ended": 49997,
"entered": 1270,
"gained": 1269,
"left": 2,
"lost": 1,
"started": 48729,
"status_id": "stat_a2RZn3jTsAA11zmBPpqQQ4ug8NqgUawkjyMdCu8yybX",
"status_is_deleted": false,
"status_label": "Potential"
},
{
"_leads_page_urls": {
"ended": "/search/lead_status%28status%3A%22Bad%20Fit%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/",
"entered": "/search/%28original_lead_status%3A%22Bad%20Fit%22%20and%20created%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20created%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%20or%20lead_status_change%28new_status%3A%22Bad%20Fit%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29/",
"gained": "/search/not%20lead_status%28status%3A%22Bad%20Fit%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20lead_status%28status%3A%22Bad%20Fit%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/",
"left": "/search/lead_status_change%28old_status%3A%22Bad%20Fit%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29/",
"lost": "/search/lead_status%28status%3A%22Bad%20Fit%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20not%20lead_status%28status%3A%22Bad%20Fit%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/",
"started": "/search/lead_status%28status%3A%22Bad%20Fit%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29/"
},
"_queries": {
"ended": "lead_status(status:\"Bad Fit\" on:\"2014-06-01 06:59:59\")",
"entered": "(original_lead_status:\"Bad Fit\" and created >= \"2014-01-01 08:00:00\" and created <= \"2014-06-01 06:59:59\") or lead_status_change(new_status:\"Bad Fit\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\")",
"gained": "not lead_status(status:\"Bad Fit\" on:\"2014-01-01 08:00:00\") and lead_status(status:\"Bad Fit\" on:\"2014-06-01 06:59:59\")",
"left": "lead_status_change(old_status:\"Bad Fit\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\")",
"lost": "lead_status(status:\"Bad Fit\" on:\"2014-01-01 08:00:00\") and not lead_status(status:\"Bad Fit\" on:\"2014-06-01 06:59:59\")",
"started": "lead_status(status:\"Bad Fit\" on:\"2014-01-01 08:00:00\")"
},
"change": 0,
"change_percent": 0,
"ended": 35,
"entered": 0,
"gained": 0,
"left": 0,
"lost": 0,
"started": 35,
"status_id": "stat_7a4mksScaP453DJeur2wdn8qXg3zcN3IQbbDeFZywNw",
"status_is_deleted": false,
"status_label": "Bad Fit"
},
{
"_leads_page_urls": {
"ended": "/search/lead_status%28status%3A%22Qualified%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/",
"entered": "/search/%28original_lead_status%3A%22Qualified%22%20and%20created%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20created%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%20or%20lead_status_change%28new_status%3A%22Qualified%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29/",
"gained": "/search/not%20lead_status%28status%3A%22Qualified%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20lead_status%28status%3A%22Qualified%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/",
"left": "/search/lead_status_change%28old_status%3A%22Qualified%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29/",
"lost": "/search/lead_status%28status%3A%22Qualified%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20not%20lead_status%28status%3A%22Qualified%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/",
"started": "/search/lead_status%28status%3A%22Qualified%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29/"
},
"_queries": {
"ended": "lead_status(status:\"Qualified\" on:\"2014-06-01 06:59:59\")",
"entered": "(original_lead_status:\"Qualified\" and created >= \"2014-01-01 08:00:00\" and created <= \"2014-06-01 06:59:59\") or lead_status_change(new_status:\"Qualified\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\")",
"gained": "not lead_status(status:\"Qualified\" on:\"2014-01-01 08:00:00\") and lead_status(status:\"Qualified\" on:\"2014-06-01 06:59:59\")",
"left": "lead_status_change(old_status:\"Qualified\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\")",
"lost": "lead_status(status:\"Qualified\" on:\"2014-01-01 08:00:00\") and not lead_status(status:\"Qualified\" on:\"2014-06-01 06:59:59\")",
"started": "lead_status(status:\"Qualified\" on:\"2014-01-01 08:00:00\")"
},
"change": 2,
"change_percent": 8,
"ended": 28,
"entered": 2,
"gained": 2,
"left": 0,
"lost": 0,
"started": 26,
"status_id": "stat_eQ5KZbBVePlxF7sUdiV7s0mDNBkUxGv7k4i0c7XsoqL",
"status_is_deleted": false,
"status_label": "Qualified"
}
],
"status_transitions": [
{
"_leads_page_url": "/search/original_lead_status%3A%22Potential%22%20and%20created%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20created%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22/",
"_query": "original_lead_status:\"Potential\" and created >= \"2014-01-01 08:00:00\" and created <= \"2014-06-01 06:59:59\"",
"count": 1270,
"from_status_id": null,
"from_status_is_deleted": null,
"from_status_label": null,
"to_status_id": "stat_a2RZn3jTsAA11zmBPpqQQ4ug8NqgUawkjyMdCu8yybX",
"to_status_is_deleted": false,
"to_status_label": "Potential"
},
{
"_leads_page_url": "/search/lead_status_change%28old_status%3A%22Potential%22%20new_status%3A%22Qualified%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29/",
"_query": "lead_status_change(old_status:\"Potential\" new_status:\"Qualified\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\")",
"count": 2,
"from_status_id": "stat_a2RZn3jTsAA11zmBPpqQQ4ug8NqgUawkjyMdCu8yybX",
"from_status_is_deleted": false,
"from_status_label": "Potential",
"to_status_id": "stat_eQ5KZbBVePlxF7sUdiV7s0mDNBkUxGv7k4i0c7XsoqL",
"to_status_is_deleted": false,
"to_status_label": "Qualified"
}
],
"status_transitions_summary": [
{
"_leads_page_url": "/search/created%20%3E%20%222014-01-01%2008%3A00%3A00%22%20and%20lead_status%28status%3A%22Potential%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/",
"_query": "created > \"2014-01-01 08:00:00\" and lead_status(status:\"Potential\" on:\"2014-06-01 06:59:59\")",
"count": 1269,
"from_status_id": null,
"from_status_is_deleted": null,
"from_status_label": null,
"to_status_id": "stat_a2RZn3jTsAA11zmBPpqQQ4ug8NqgUawkjyMdCu8yybX",
"to_status_is_deleted": false,
"to_status_label": "Potential"
},
{
"_leads_page_url": "/search/created%20%3E%20%222014-01-01%2008%3A00%3A00%22%20and%20lead_status%28status%3A%22Qualified%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/",
"_query": "created > \"2014-01-01 08:00:00\" and lead_status(status:\"Qualified\" on:\"2014-06-01 06:59:59\")",
"count": 1,
"from_status_id": null,
"from_status_is_deleted": null,
"from_status_label": null,
"to_status_id": "stat_eQ5KZbBVePlxF7sUdiV7s0mDNBkUxGv7k4i0c7XsoqL",
"to_status_is_deleted": false,
"to_status_label": "Qualified"
},
{
"_leads_page_url": "/search/lead_status%28status%3A%22Potential%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20lead_status%28status%3A%22Qualified%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/",
"_query": "lead_status(status:\"Potential\" on:\"2014-01-01 08:00:00\") and lead_status(status:\"Qualified\" on:\"2014-06-01 06:59:59\")",
"count": 1,
"from_status_id": "stat_a2RZn3jTsAA11zmBPpqQQ4ug8NqgUawkjyMdCu8yybX",
"from_status_is_deleted": false,
"from_status_label": "Potential",
"to_status_id": "stat_eQ5KZbBVePlxF7sUdiV7s0mDNBkUxGv7k4i0c7XsoqL",
"to_status_is_deleted": false,
"to_status_label": "Qualified"
}
]
}
Get an opportunity status change report
Get an opportunity status change report. The arguments and returned fields are similar to the lead status report (see above), with the following differences:
- Any returned numbers refer to the number of opportunities instead of leads.
- The opportunity status report may optionally be filtered by the opportunity user.
- The returned search queries in the
_queries
field are wrapped in a nested opportunity query (opportunity(...)
) and can be used as a query for the leads API endpoint. To pass the query to the opportunities API endpoint, only the query within the nested clause (in the parentheses) may be supplied. - In addition to returning paths to the lead search UI page, paths to the opportunity UI page are returned in the
_opportunities_page_urls
and_opportunities_page_url
fields.
curl -XGET "https://api.close.com/api/v1/report/statuses/opportunity/{ORGANIZATION_ID}/?{user_id,date_start,date_end,smart_view_id,query}"
Response Headers
content-type: application/json
Response Body
{
"status_overview": [
{
"_leads_page_urls": {
"ended": "/search/opportunity%28status%28status%3A%22Active%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/",
"entered": "/search/opportunity%28%28original_status%3A%22Active%22%20and%20created%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20created%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%20or%20status_change%28new_status%3A%22Active%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/",
"gained": "/search/opportunity%28not%20status%28status%3A%22Active%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20status%28status%3A%22Active%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/",
"left": "/search/opportunity%28status_change%28old_status%3A%22Active%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/",
"lost": "/search/opportunity%28status%28status%3A%22Active%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20not%20status%28status%3A%22Active%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/",
"started": "/search/opportunity%28status%28status%3A%22Active%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%29/"
},
"_opportunities_page_urls": {
"ended": "/opportunities/custom_filter_end_status_label=Active&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Active%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=ended&custom_filter_end_status_id=stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH/",
"entered": "/opportunities/custom_filter_end_status_label=Active&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=%28original_status%3A%22Active%22+and+created+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+created+%3C%3D+%222014-06-01+06%3A59%3A59%22%29+or+status_change%28new_status%3A%22Active%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=entered&custom_filter_end_status_id=stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH/",
"gained": "/opportunities/custom_filter_end_status_label=Active&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=not+status%28status%3A%22Active%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+status%28status%3A%22Active%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=gained&custom_filter_end_status_id=stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH/",
"left": "/opportunities/custom_filter_start_status_id=stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH&custom_filter_start_status_label=Active&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status_change%28old_status%3A%22Active%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=left/",
"lost": "/opportunities/custom_filter_start_status_id=stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH&custom_filter_start_status_label=Active&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Active%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+not+status%28status%3A%22Active%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=lost/",
"started": "/opportunities/custom_filter_start_status_id=stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH&custom_filter_start_status_label=Active&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Active%22+on%3A%222014-01-01+08%3A00%3A00%22%29&custom_filter_type=started/"
},
"_queries": {
"ended": "opportunity(status(status:\"Active\" on:\"2014-06-01 06:59:59\"))",
"entered": "opportunity((original_status:\"Active\" and created >= \"2014-01-01 08:00:00\" and created <= \"2014-06-01 06:59:59\") or status_change(new_status:\"Active\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))",
"gained": "opportunity(not status(status:\"Active\" on:\"2014-01-01 08:00:00\") and status(status:\"Active\" on:\"2014-06-01 06:59:59\"))",
"left": "opportunity(status_change(old_status:\"Active\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))",
"lost": "opportunity(status(status:\"Active\" on:\"2014-01-01 08:00:00\") and not status(status:\"Active\" on:\"2014-06-01 06:59:59\"))",
"started": "opportunity(status(status:\"Active\" on:\"2014-01-01 08:00:00\"))"
},
"change": -1,
"change_percent": -6,
"ended": 16,
"entered": 0,
"gained": 0,
"left": 1,
"lost": 1,
"started": 17,
"status_id": "stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH",
"status_is_deleted": false,
"status_label": "Active"
},
{
"_leads_page_urls": {
"ended": "/search/opportunity%28status%28status%3A%22Won%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/",
"entered": "/search/opportunity%28%28original_status%3A%22Won%22%20and%20created%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20created%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%20or%20status_change%28new_status%3A%22Won%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/",
"gained": "/search/opportunity%28not%20status%28status%3A%22Won%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20status%28status%3A%22Won%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/",
"left": "/search/opportunity%28status_change%28old_status%3A%22Won%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/",
"lost": "/search/opportunity%28status%28status%3A%22Won%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20not%20status%28status%3A%22Won%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/",
"started": "/search/opportunity%28status%28status%3A%22Won%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%29/"
},
"_opportunities_page_urls": {
"ended": "/opportunities/custom_filter_end_status_label=Won&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Won%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=ended&custom_filter_end_status_id=stat_wMS9M6HC2O3CSEOzF5g2vEGt6RM5R3RfhIQixdnmjf2/",
"entered": "/opportunities/custom_filter_end_status_label=Won&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=%28original_status%3A%22Won%22+and+created+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+created+%3C%3D+%222014-06-01+06%3A59%3A59%22%29+or+status_change%28new_status%3A%22Won%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=entered&custom_filter_end_status_id=stat_wMS9M6HC2O3CSEOzF5g2vEGt6RM5R3RfhIQixdnmjf2/",
"gained": "/opportunities/custom_filter_end_status_label=Won&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=not+status%28status%3A%22Won%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+status%28status%3A%22Won%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=gained&custom_filter_end_status_id=stat_wMS9M6HC2O3CSEOzF5g2vEGt6RM5R3RfhIQixdnmjf2/",
"left": "/opportunities/custom_filter_start_status_id=stat_wMS9M6HC2O3CSEOzF5g2vEGt6RM5R3RfhIQixdnmjf2&custom_filter_start_status_label=Won&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status_change%28old_status%3A%22Won%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=left/",
"lost": "/opportunities/custom_filter_start_status_id=stat_wMS9M6HC2O3CSEOzF5g2vEGt6RM5R3RfhIQixdnmjf2&custom_filter_start_status_label=Won&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Won%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+not+status%28status%3A%22Won%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=lost/",
"started": "/opportunities/custom_filter_start_status_id=stat_wMS9M6HC2O3CSEOzF5g2vEGt6RM5R3RfhIQixdnmjf2&custom_filter_start_status_label=Won&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Won%22+on%3A%222014-01-01+08%3A00%3A00%22%29&custom_filter_type=started/"
},
"_queries": {
"ended": "opportunity(status(status:\"Won\" on:\"2014-06-01 06:59:59\"))",
"entered": "opportunity((original_status:\"Won\" and created >= \"2014-01-01 08:00:00\" and created <= \"2014-06-01 06:59:59\") or status_change(new_status:\"Won\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))",
"gained": "opportunity(not status(status:\"Won\" on:\"2014-01-01 08:00:00\") and status(status:\"Won\" on:\"2014-06-01 06:59:59\"))",
"left": "opportunity(status_change(old_status:\"Won\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))",
"lost": "opportunity(status(status:\"Won\" on:\"2014-01-01 08:00:00\") and not status(status:\"Won\" on:\"2014-06-01 06:59:59\"))",
"started": "opportunity(status(status:\"Won\" on:\"2014-01-01 08:00:00\"))"
},
"change": 0,
"change_percent": 0,
"ended": 8,
"entered": 0,
"gained": 0,
"left": 0,
"lost": 0,
"started": 8,
"status_id": "stat_wMS9M6HC2O3CSEOzF5g2vEGt6RM5R3RfhIQixdnmjf2",
"status_is_deleted": false,
"status_label": "Won"
},
{
"_leads_page_urls": {
"ended": "/search/opportunity%28status%28status%3A%22Lost%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/",
"entered": "/search/opportunity%28%28original_status%3A%22Lost%22%20and%20created%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20created%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%20or%20status_change%28new_status%3A%22Lost%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/",
"gained": "/search/opportunity%28not%20status%28status%3A%22Lost%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20status%28status%3A%22Lost%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/",
"left": "/search/opportunity%28status_change%28old_status%3A%22Lost%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/",
"lost": "/search/opportunity%28status%28status%3A%22Lost%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20not%20status%28status%3A%22Lost%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/",
"started": "/search/opportunity%28status%28status%3A%22Lost%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%29/"
},
"_opportunities_page_urls": {
"ended": "/opportunities/custom_filter_end_status_label=Lost&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Lost%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=ended&custom_filter_end_status_id=stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD/",
"entered": "/opportunities/custom_filter_end_status_label=Lost&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=%28original_status%3A%22Lost%22+and+created+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+created+%3C%3D+%222014-06-01+06%3A59%3A59%22%29+or+status_change%28new_status%3A%22Lost%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=entered&custom_filter_end_status_id=stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD/",
"gained": "/opportunities/custom_filter_end_status_label=Lost&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=not+status%28status%3A%22Lost%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+status%28status%3A%22Lost%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=gained&custom_filter_end_status_id=stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD/",
"left": "/opportunities/custom_filter_start_status_id=stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD&custom_filter_start_status_label=Lost&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status_change%28old_status%3A%22Lost%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=left/",
"lost": "/opportunities/custom_filter_start_status_id=stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD&custom_filter_start_status_label=Lost&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Lost%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+not+status%28status%3A%22Lost%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=lost/",
"started": "/opportunities/custom_filter_start_status_id=stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD&custom_filter_start_status_label=Lost&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Lost%22+on%3A%222014-01-01+08%3A00%3A00%22%29&custom_filter_type=started/"
},
"_queries": {
"ended": "opportunity(status(status:\"Lost\" on:\"2014-06-01 06:59:59\"))",
"entered": "opportunity((original_status:\"Lost\" and created >= \"2014-01-01 08:00:00\" and created <= \"2014-06-01 06:59:59\") or status_change(new_status:\"Lost\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))",
"gained": "opportunity(not status(status:\"Lost\" on:\"2014-01-01 08:00:00\") and status(status:\"Lost\" on:\"2014-06-01 06:59:59\"))",
"left": "opportunity(status_change(old_status:\"Lost\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))",
"lost": "opportunity(status(status:\"Lost\" on:\"2014-01-01 08:00:00\") and not status(status:\"Lost\" on:\"2014-06-01 06:59:59\"))",
"started": "opportunity(status(status:\"Lost\" on:\"2014-01-01 08:00:00\"))"
},
"change": 1,
"change_percent": 25,
"ended": 5,
"entered": 1,
"gained": 1,
"left": 0,
"lost": 0,
"started": 4,
"status_id": "stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD",
"status_is_deleted": false,
"status_label": "Lost"
},
{
"_leads_page_urls": {
"ended": "/search/opportunity%28status%28status%3A%22On%20hold%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/",
"entered": "/search/opportunity%28%28original_status%3A%22On%20hold%22%20and%20created%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20created%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%20or%20status_change%28new_status%3A%22On%20hold%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/",
"gained": "/search/opportunity%28not%20status%28status%3A%22On%20hold%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20status%28status%3A%22On%20hold%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/",
"left": "/search/opportunity%28status_change%28old_status%3A%22On%20hold%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/",
"lost": "/search/opportunity%28status%28status%3A%22On%20hold%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20not%20status%28status%3A%22On%20hold%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/",
"started": "/search/opportunity%28status%28status%3A%22On%20hold%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%29/"
},
"_opportunities_page_urls": {
"ended": "/opportunities/custom_filter_end_status_label=On+hold&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22On+hold%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=ended&custom_filter_end_status_id=stat_rJaLa9RS71Ry5yXUxTXyc7siYvvPzeHSM61rkOSOFKQ/",
"entered": "/opportunities/custom_filter_end_status_label=On+hold&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=%28original_status%3A%22On+hold%22+and+created+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+created+%3C%3D+%222014-06-01+06%3A59%3A59%22%29+or+status_change%28new_status%3A%22On+hold%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=entered&custom_filter_end_status_id=stat_rJaLa9RS71Ry5yXUxTXyc7siYvvPzeHSM61rkOSOFKQ/",
"gained": "/opportunities/custom_filter_end_status_label=On+hold&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=not+status%28status%3A%22On+hold%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+status%28status%3A%22On+hold%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=gained&custom_filter_end_status_id=stat_rJaLa9RS71Ry5yXUxTXyc7siYvvPzeHSM61rkOSOFKQ/",
"left": "/opportunities/custom_filter_start_status_id=stat_rJaLa9RS71Ry5yXUxTXyc7siYvvPzeHSM61rkOSOFKQ&custom_filter_start_status_label=On+hold&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status_change%28old_status%3A%22On+hold%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=left/",
"lost": "/opportunities/custom_filter_start_status_id=stat_rJaLa9RS71Ry5yXUxTXyc7siYvvPzeHSM61rkOSOFKQ&custom_filter_start_status_label=On+hold&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22On+hold%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+not+status%28status%3A%22On+hold%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=lost/",
"started": "/opportunities/custom_filter_start_status_id=stat_rJaLa9RS71Ry5yXUxTXyc7siYvvPzeHSM61rkOSOFKQ&custom_filter_start_status_label=On+hold&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22On+hold%22+on%3A%222014-01-01+08%3A00%3A00%22%29&custom_filter_type=started/"
},
"_queries": {
"ended": "opportunity(status(status:\"On hold\" on:\"2014-06-01 06:59:59\"))",
"entered": "opportunity((original_status:\"On hold\" and created >= \"2014-01-01 08:00:00\" and created <= \"2014-06-01 06:59:59\") or status_change(new_status:\"On hold\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))",
"gained": "opportunity(not status(status:\"On hold\" on:\"2014-01-01 08:00:00\") and status(status:\"On hold\" on:\"2014-06-01 06:59:59\"))",
"left": "opportunity(status_change(old_status:\"On hold\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))",
"lost": "opportunity(status(status:\"On hold\" on:\"2014-01-01 08:00:00\") and not status(status:\"On hold\" on:\"2014-06-01 06:59:59\"))",
"started": "opportunity(status(status:\"On hold\" on:\"2014-01-01 08:00:00\"))"
},
"change": 0,
"change_percent": 0,
"ended": 1,
"entered": 0,
"gained": 0,
"left": 0,
"lost": 0,
"started": 1,
"status_id": "stat_rJaLa9RS71Ry5yXUxTXyc7siYvvPzeHSM61rkOSOFKQ",
"status_is_deleted": false,
"status_label": "On hold"
}
],
"status_transitions": [
{
"_leads_page_url": "/search/opportunity%28status_change%28old_status%3A%22Active%22%20new_status%3A%22Lost%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/",
"_opportunities_page_url": "/opportunities/custom_filter_start_status_id=stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH&custom_filter_end_status_label=Lost&custom_filter_start_status_label=Active&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status_change%28old_status%3A%22Active%22+new_status%3A%22Lost%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=transition&custom_filter_end_status_id=stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD/",
"_query": "opportunity(status_change(old_status:\"Active\" new_status:\"Lost\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))",
"count": 1,
"from_status_id": "stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH",
"from_status_is_deleted": false,
"from_status_label": "Active",
"to_status_id": "stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD",
"to_status_is_deleted": false,
"to_status_label": "Lost"
}
],
"status_transitions_summary": [
{
"_leads_page_url": "/search/opportunity%28status%28status%3A%22Active%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20status%28status%3A%22Lost%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/",
"_opportunities_page_url": "/opportunities/custom_filter_start_status_id=stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH&custom_filter_end_status_label=Lost&custom_filter_start_status_label=Active&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Active%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+status%28status%3A%22Lost%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=transition&custom_filter_end_status_id=stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD/",
"_query": "opportunity(status(status:\"Active\" on:\"2014-01-01 08:00:00\") and status(status:\"Lost\" on:\"2014-06-01 06:59:59\"))",
"count": 1,
"from_status_id": "stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH",
"from_status_is_deleted": false,
"from_status_label": "Active",
"to_status_id": "stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD",
"to_status_is_deleted": false,
"to_status_label": "Lost"
}
]
}
Get a custom report for just about any object in Close
Get a custom report for just about any object in Close. This endpoint returns data that allows graphing of arbitrary metrics and is what powers "Explorer" in the UI.
query
is an optional search query filter. When reporting on leads, any regular lead search query may be used. When reporting on activities or opportunities, only properties of the chosen object type may be used. For example,direction:incoming
may be used ifx
starts withemail.
. Defaults to*
, which includes all objects.y
is made up of the object type and field which is reported on the Y axis. For example the valuelead.count
(used by default) may be used to graph the number of leads, or a numeric field may be used. Examples:call.duration
(for call length),opportunity.value
(for value of opportunities).x
is the field which is reported on the X axis, for example "lead.custom.MRR" or "opportunity.date_created".interval
: Graph interval, i.e. the precision of the X axis. For time based graphs (x
is a date field), one ofauto
,hour
,day
,week
,month
,quarter
,year
(defaults toauto
, which is chosen based onstart
andend
). For graphs with a numeric X axis, an integer number can be specified to indicate the histogram interval (auto
by default).group_by
: Optional field name by which the report will be grouped. When grouping, a separate series will be returned for each group. By default no grouping is applied.transform_y
: Transformation function that gets applied to they
parameter. One ofsum
(default),avg
,min
, ormax
. Does not apply for.count
y
values ifx
is of the same object type.start
: Date or integer of the start of the X axis range. For dates, defaults to the date of creation of your organization.end
: Date or integer of the end of the X axis range. For dates, defaults to now.
To get a full list of fields that can be used, do a GET to /report/custom/fields/
. Only the number
data type can be used for the y
parameter.
curl -XGET "https://api.close.com/api/v1/report/custom/{ORGANIZATION_ID}/{?query,x,y,interval,transform_y,group_by,start,end}"
Response Headers
content-type: application/json
Response Body
# Example: Average call duration per quarter
# GET /report/custom/orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen/?query=duration>0&y=call.duration&x=call.date_created&transform_y=avg&interval=quarter
{
"x_values": [
"2013-04-01T00:00:00.000Z",
"2013-07-01T00:00:00.000Z",
"2013-10-01T00:00:00.000Z",
"2014-01-01T00:00:00.000Z"
],
"series": [
{
"data": [
27.42026825633383,
17.16701754385966,
73.07868681605004,
92.8684210526316
],
"type": "date"
}
],
"effective_interval": "quarter"
}
# Example: Number of contacted leads by month by their first communication date:
# GET /report/custom/lead/orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen/?query=contacted:yes&x=lead.first_communication&interval=month
{
"x_values": [
"2013-04-01T00:00:00.000Z",
"2013-05-01T00:00:00.000Z",
"2013-06-01T00:00:00.000Z",
"2013-07-01T00:00:00.000Z",
"2013-08-01T00:00:00.000Z",
"2013-09-01T00:00:00.000Z",
"2013-10-01T00:00:00.000Z",
"2013-11-01T00:00:00.000Z",
"2013-12-01T00:00:00.000Z",
"2014-01-01T00:00:00.000Z",
"2014-02-01T00:00:00.000Z"
],
"series": [
{
"data": [57, 31, 0, 10, 95, 63, 78, 31, 39, 51, 9],
"type": "date"
},
],
"effective_interval": "month"
}
# Example: Incoming emails by week starting from 2014:
# GET /report/custom/orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen/?query=direction:incoming&y=email.count&x=email.date_created&interval=week&start=2014-01-01
{
"x_values": [
"2014-01-06T00:00:00.000Z",
"2014-01-07T00:00:00.000Z",
"2014-01-08T00:00:00.000Z",
"2014-01-09T00:00:00.000Z",
"2014-01-10T00:00:00.000Z",
"2014-01-11T00:00:00.000Z"
],
"series": [
{
"data": [89, 0, 98, 68, 32, 41],
"type": "date"
}
]
}
# Example: Customer distribution by a custom field
# GET /report/custom/orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen/?query=lead_status:Customer&y=lead.count&x=lead.custom.MRR&interval=1000&end=3000
{
"x_values": [
{
"start": 0,
"end": 999,
"value": "0-999"
},
{
"start": 1000,
"end": 2999,
"value": "1000-2999"
},
{
"start": 2000,
"end": 2999,
"value": "2000-2999"
},
{
"start": 3000,
"end": 300,
"value": "3000"
}
],
"series": [
{
"data": [2, 3, 7],
"type": "numeric"
}
],
"effective_interval": 1000
}
# Example: Emails by year of their creation, grouped by direction
# GET /report/custom/orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen/?x=email.date_created&y=email.count&group_by=email.direction&interval=year
{
"x_values": [
"2013-01-01T00:00:00.000Z",
"2014-01-01T00:00:00.000Z"
],
"series": [
{
"data": [10, 120],
"type": "date"
},
{
"data": [8, 100],
"group_key": "outgoing",
"type": "date"
},
{
"data": [2, 20],
"group_key": "incoming",
"type": "date"
}
],
"effective_interval": "year"
}
# Example: Total opportunity value of won opportunities by year of when the opportunity was won grouped by value period:
# GET /report/custom/orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen/?query=status_type:won&x=opportunity.date_won&y=opportunity.value&group_by=opportunity.value_period&interval=year
{
"x_values": [
"2013-01-01T00:00:00.000Z",
"2014-01-01T00:00:00.000Z"
],
"series": [
{
"data": [5000, 10000],
"type": "date"
},
{
"data": [1000, 2000],
"group_key": "monthly",
"type": "date"
},
{
"data": [2000, 3000],
"group_key": "one_time",
"type": "date"
},
{
"data": [2000, 5000],
"group_key": "annual",
"type": "date"
}
],
"effective_interval": "year"
}
Email Templates
Email Templates are predefined emails that can be used over and over again when sending email. They save time when sending emails one at a time via the Close UI, and they are also used when initiating a single Bulk Email.
List email templates
List email templates.
curl -XGET "https://api.close.com/api/v1/email_template/{?is_archived}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"id": "tmpl_bTl0wRVLuzCpYkJnLX76KcbuYFpa4YEJVKNE19RGHUq",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"name": "Cold 1",
"subject": "I bet using other sales tool sucks",
"body": "You should try Close.",
"is_shared": true,
"attachments": [],
"date_created": "2013-02-20T09:20:14.229000+00:00",
"date_updated": "2013-02-20T09:20:14.229000+00:00",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"is_archived": false
}
]
}
Fetch an email template
Fetch an email template.
curl -XGET "https://api.close.com/api/v1/email_template/{id}/"
Response Headers
content-type: application/json
Response Body
{
"id": "tmpl_bTl0wRVLuzCpYkJnLX76KcbuYFpa4YEJVKNE19RGHUq",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"name": "Cold 1",
"subject": "I bet using other sales tool sucks",
"body": "You should try Close.",
"is_shared": true,
"attachments": [],
"date_created": "2013-02-20T09:20:14.229000+00:00",
"date_updated": "2013-02-20T09:20:14.229000+00:00",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"is_archived": false,
"used_by_sequences": [
{
"id": "seq_1BTljGuCooX0nbFoPihl07",
"name": "My Sequence"
}
]
}
Render an email template for the given lead/contact using the current user context
Render an email template for the given lead/contact using the current user context. Accepts two forms of usage:
- Single lead/contact:
lead_id
andcontact_id
is supplied (both required)
- Preview results from a search query
query
(required) contains a search queryentry
(optional, ranges from 0 to 99) specifies the index of the lead/contact that should be rendered.mode
(optional), which can have a value of:lead
(default), the first contact of the lead with the index given byentry
will be rendered (excluding leads that have no email addresses).contact
, thenentry
refers to the index of the contact (excluding contacts that have no emails). Will return an empty dict if there are no more entries.
curl -XGET "https://api.close.com/api/v1/email_template/{id}/render/{?lead_id, contact_id, query, entry, mode}"
Response Headers
content-type: application/json
Response Body
{
"lead_id": "lead_vYaUG0D39KdBeqVHbPkmvqaYopsdCBmDXW3tvJgwc2L",
"lead_display_name": "Bluth Company",
"contact_id": "cont_NdKMSOuamgB8ZlbNJW2WP17hfL3jQmf0hW6X8ichwQk",
"contact_display_name": "John Smith",
"email": "john@example.com",
"body": "Hi John,\n\nI hope you are having a great day.\n\nFrom,\nPhil\nphil@close.com",
"subject": "Checking In"
}
Create an email template
Create an email template.
curl -XPOST "https://api.close.com/api/v1/email_template/"
Request Headers
content-type: application/json
Request Body
{
"name": "inbound 1",
"subject": "test inbound subject",
"body": "test inbound body of an email.",
"is_shared": false
}
Response Headers
content-type: application/json
Response Body
{
"id": "tmpl_bTl0wRVLuzCpYkJnLX76KcbuYFpa4YEJVKNE19RGHUq",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-20T09:20:14.229000+00:00",
"date_updated": "2013-02-20T09:20:14.229000+00:00",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"name": "inbound 1",
"subject": "test inbound subject",
"body": "test inbound body of an email.",
"attachments": [],
"is_shared": false,
"is_archived": false,
"used_by_sequences": []
}
Update an email template
Update an email template.
curl -XPUT "https://api.close.com/api/v1/email_template/{id}/"
Request Headers
content-type: application/json
Request Body
{
"is_shared": true
}
Response Headers
content-type: application/json
Response Body
{
"id": "tmpl_bTl0wRVLuzCpYkJnLX76KcbuYFpa4YEJVKNE19RGHUq",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-20T09:20:14.229000+00:00",
"date_updated": "2013-02-20T09:20:14.229000+00:00",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"name": "inbound 1",
"subject": "test inbound subject",
"body": "test inbound body of an email.",
"attachments": [],
"is_shared": true,
"is_archived": false,
"used_by_sequences": []
}
Delete an email template
Connected Accounts
This endpoint can be used to pull information about the Email and Zoom accounts you currently have connected under Settings > Connected Accounts in Close and Email accounts you have the ability to send as via our Send As functionality.
Connected Accounts have three possible values for _type
:
google
- the connected account is a Gmail account using Google OAuth to connect to Close.custom_email
- the connected account is a non-Gmail email account. For example, this connected account type is used for our Mailgun and Sendgrid integrations.zoom
- the connected account is a Zoom account that is using our Zoom Integrationmicrosoft
- the connected account is a Microsoft account using Microsoft OAuth to connect to Close.
google
connected accounts have a synced_calendars
field that contains which calendars are synced in as part of our Meetings Sync
List all the connected accounts you can use in your organization
List all the connected accounts you can use in your organization.
You can filter down to a specific user by passing the ?user_id
query parameter.
curl -XGET "https://api.close.com/api/v1/connected_account/{?user_id}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"id": "emailacct_qG1RuJuy5baiXvVbIc2VelooJwGcKeIrQLNtTd9p6RO",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"identities": [
{
"email": "anthony@close.com",
"name": "Anthony Nemitz"
}
],
"synced_calendars": [
"anthony@close.com"
],
"_type": "google"
},
{
"id": "emailacct_ngOT8utnZjBlZyXJBS7hM9HkDphGvtt8J21VJm1KSqe",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"identities": [
{
"name": "Anthony Nemitz",
"email": "anthony@close.com"
},
{
"name": "Close CRM Support",
"email": "support@close.com"
}
],
"smtp": {
"username": "anthony@close.com",
"port": 465,
"use_ssl": true,
"host": "smtp.mailgun.org"
},
"imap": null,
"_type": "custom_email"
},
{
"id": "emailacct_0WwZ19CuOSGOtT2RMOqTPIMyvNMuFbfEr3Iul2hrWYm",
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"identities": [],
"email": "anthony@close.com",
"_type": "zoom"
},
]
}
Fetch a single connected account
Fetch a single connected account.
curl -XGET "https://api.close.com/api/v1/connected_account/{id}/"
Response Headers
content-type: application/json
Response Body
{
"id": "emailacct_qG1RuJuy5baiXvVbIc2VelooJwGcKeIrQLNtTd9p6RO",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"identities": [
{
"email": "anthony@close.com",
"name": "Anthony Nemitz"
}
],
"synced_calendars": [
"anthony@close.com"
],
"_type": "google"
}
Send As
The Send As feature allows a user to explicitly allow another user to send individual emails, bulk emails, and email sequences as them.
Send As permission must be explicitly granted by the user that's allowing another user to send as them. This permission can be revoked by the allowing user at any time.
List all Send As Associations by allowing or allowed user
List all Send As Associations by allowing or allowed user.
A user only has access to associations they are involved in. This means that when using this endpoint, allowing_user_id
or allowed_user_id
must be equal to your user ID. If neither filter is provided, allowing_user_id
is assumed by default.
curl -XGET "https://api.close.com/api/v1/send_as/{?allowing_user_id, allowed_user_id}"
Response Headers
Content-Type: application/json
Response Body
{
"data": [
{
"allowed_user_id": "user_t0HoZz9su15mvLE2pe8lp71nbpNxpalwcgKkGCjjkdS",
"allowing_user_id": "user_0fdmigMZ2pDeTMp9RHLkA8UCKDEv3ZbqyJywcdFVmq4",
"id": "sdas_3KlXHOKx4afZ19TfpxMISa",
"organization_id": "orga_KSMijQcpAZABHEsukAyeQHeNyNBOWOLjjK2Fi2lamzw"
}
]
}
Retrieve a single Send As Association
Retrieve a single Send As Association.
curl -XGET "https://api.close.com/api/v1/send_as/{id}/"
Response Headers
Content-Type: application/json
Response Body
{
"allowed_user_id": "user_t0HoZz9su15mvLE2pe8lp71nbpNxpalwcgKkGCjjkdS",
"allowing_user_id": "user_0fdmigMZ2pDeTMp9RHLkA8UCKDEv3ZbqyJywcdFVmq4",
"id": "sdas_3KlXHOKx4afZ19TfpxMISa",
"organization_id": "orga_KSMijQcpAZABHEsukAyeQHeNyNBOWOLjjK2Fi2lamzw"
}
Create a Send As Association
Create a Send As Association.
The allowing_user_id
must be equal to your user ID.
curl -XPOST "https://api.close.com/api/v1/send_as/"
Request Headers
Content-Type: application/json
Request Body
{
"allowing_user_id": "user_0fdmigMZ2pDeTMp9RHLkA8UCKDEv3ZbqyJywcdFVmq4",
"allowed_user_id": "user_t0HoZz9su15mvLE2pe8lp71nbpNxpalwcgKkGCjjkdS"
}
Response Headers
Content-Type: application/json
Response Body
{
"allowed_user_id": "user_t0HoZz9su15mvLE2pe8lp71nbpNxpalwcgKkGCjjkdS",
"allowing_user_id": "user_0fdmigMZ2pDeTMp9RHLkA8UCKDEv3ZbqyJywcdFVmq4",
"id": "sdas_3KlXHOKx4afZ19TfpxMISa",
"organization_id": "orga_KSMijQcpAZABHEsukAyeQHeNyNBOWOLjjK2Fi2lamzw"
}
Delete a Send As Association by ID
Delete a Send As Association by ID.
curl -XDELETE "https://api.close.com/api/v1/send_as/{id}/"
Response Headers
Response Body
Delete a Send As Association by allowed user
Delete a Send As Association by allowed user.
The allowing_user_id
must be equal to your user ID.
Supply both the allowing_user_id
and the allowed_user_id
to delete an association by those users.
curl -XDELETE "https://api.close.com/api/v1/send_as/{?allowing_user_id, allowed_user_id}"
Response Headers
Response Body
Edit Send As Associations in bulk
Edit Send As Associations in bulk.
You can allow and disallow many other users to send as you in a single command by supplying the user IDs you want to allow and disallow.
Once completed, this endpoint returns all existing associations where your user is the allowing user.
curl -XPOST "https://api.close.com/api/v1/send_as/bulk/"
Request Headers
Content-Type: application/json
Request Body
{
"allowed_user_ids": [
"user_t0HoZz9su15mvLE2pe8lp71nbpNxpalwcgKkGCjjkdS"
],
"disallowed_user_ids": [
"user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
]
}
Response Headers
Content-Type: application/json
Response Body
{
"data": [
{
"allowed_user_id": "user_t0HoZz9su15mvLE2pe8lp71nbpNxpalwcgKkGCjjkdS",
"allowing_user_id": "user_0fdmigMZ2pDeTMp9RHLkA8UCKDEv3ZbqyJywcdFVmq4",
"id": "sdas_3KlXHOKx4afZ19TfpxMISa",
"organization_id": "orga_KSMijQcpAZABHEsukAyeQHeNyNBOWOLjjK2Fi2lamzw"
}
]
}
Email Sequences
An Email Sequence is a series of emails to be sent, one by one, in specified time gaps to specific subscribers until they reply.
List Sequences
List Sequences
curl -XGET "https://api.close.com/api/v1/sequence/"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"id": "seq_1BTljGuCooX0nbFoPihl07",
"name": "My Sequence",
"status": "active",
"schedule_id": null,
"timezone": "America/Los_Angeles",
"steps": [
{
"id": "seqstep_3fdjsr0thQshwVXo8rWG47",
"delay": 0,
"email_template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn",
"threading": "old_thread",
"date_created": "2013-02-20T09:20:14.229000+00:00",
"date_updated": "2013-02-20T09:20:14.229000+00:00",
"created_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
},
{
"id": "seqstep_kjsd324toiweuroo812394",
"delay": 259200,
"email_template_id": "tmpl_l12k3as9d008324ljeANFTyS239048asdFdsVfnzaln",
"threading": "old_thread",
"date_created": "2013-02-20T09:25:14.000000+00:00",
"date_updated": "2013-02-20T09:25:14.000000+00:00",
"created_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
},
],
"date_created": "2013-02-20T09:20:14.229000+00:00",
"date_updated": "2013-02-20T09:20:14.229000+00:00",
"created_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
}
]
}
Fetch an Email Sequence
Fetch an Email Sequence.
curl -XGET "https://api.close.com/api/v1/sequence/{id}/"
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"id": "seq_1BTljGuCooX0nbFoPihl07",
"name": "My Sequence",
"status": "active",
"schedule_id": null,
"timezone": "America/Los_Angeles",
"steps": [
{
"id": "seqstep_3fdjsr0thQshwVXo8rWG47",
"delay": 0,
"email_template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn",
"threading": "old_thread",
"date_created": "2013-02-20T09:20:14.229000+00:00",
"date_updated": "2013-02-20T09:20:14.229000+00:00",
"created_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
},
{
"id": "seqstep_kjsd324toiweuroo812394",
"delay": 259200,
"email_template_id": "tmpl_l12k3as9d008324ljeANFTyS239048asdFdsVfnzaln",
"threading": "old_thread",
"date_created": "2013-02-20T09:25:14.000000+00:00",
"date_updated": "2013-02-20T09:25:14.000000+00:00",
"created_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
},
],
"date_created": "2013-02-20T09:20:00.000000+00:00",
"date_updated": "2013-02-20T09:20:00.000000+00:00",
"created_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"subscription_counts_by_status": {
"active": 10,
"paused": 5,
"finished": 25
}
}
Create an Email Sequence
Create an Email Sequence
curl -XPOST "https://api.close.com/api/v1/sequence/"
Request Headers
content-type: application/json
Request Body
{
"name": "My Sequence",
"schedule_id": null,
"timezone": "America/Los_Angeles",
"steps": [
{
"delay": 0,
"email_template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn",
"threading": "old_thread"
},
{
"delay": 259200,
"email_template_id": "tmpl_l12k3as9d008324ljeANFTyS239048asdFdsVfnzaln",
"threading": "old_thread"
},
]
}
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"id": "seq_1BTljGuCooX0nbFoPihl07",
"name": "My Sequence",
"status": "active",
"schedule_id": null,
"timezone": "America/Los_Angeles",
"steps": [
{
"id": "seqstep_3fdjsr0thQshwVXo8rWG47",
"delay": 0,
"email_template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn",
"threading": "old_thread",
"date_created": "2013-02-20T09:20:14.229000+00:00",
"date_updated": "2013-02-20T09:20:14.229000+00:00",
"created_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
},
{
"id": "seqstep_kjsd324toiweuroo812394",
"delay": 259200,
"email_template_id": "tmpl_l12k3as9d008324ljeANFTyS239048asdFdsVfnzaln",
"threading": "old_thread",
"date_created": "2013-02-20T09:25:14.000000+00:00",
"date_updated": "2013-02-20T09:25:14.000000+00:00",
"created_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
},
],
"date_created": "2013-02-20T09:20:14.229000+00:00",
"date_updated": "2013-02-20T09:20:14.229000+00:00",
"created_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
}
Update an Email Sequence
Update an Email Sequence.
Note: If you include steps
in the payload and exclude some of the existing steps in your sequence, it will remove those steps from the sequence entirely.
curl -XPUT "https://api.close.com/api/v1/sequence/{id}/"
Request Headers
content-type: application/json
Request Body
{
"name": "My New Sequence Name",
"steps": [
{"id": "seqstep_3fdjsr0thQshwVXo8rWG47"},
{"id": "seqstep_kjsd324toiweuroo812394"}
]
}
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"id": "seq_1BTljGuCooX0nbFoPihl07",
"name": "My New Sequence Name",
"status": "active",
"schedule_id": null,
"timezone": "America/Los_Angeles",
"steps": [
{
"id": "seqstep_3fdjsr0thQshwVXo8rWG47",
"delay": 0,
"email_template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn",
"threading": "old_thread",
"date_created": "2013-02-20T09:20:14.229000+00:00",
"date_updated": "2013-02-20T09:20:14.229000+00:00",
"created_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
},
{
"id": "seqstep_kjsd324toiweuroo812394",
"delay": 259200,
"email_template_id": "tmpl_l12k3as9d008324ljeANFTyS239048asdFdsVfnzaln",
"threading": "old_thread",
"date_created": "2013-02-20T09:25:14.000000+00:00",
"date_updated": "2013-02-20T09:25:14.000000+00:00",
"created_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
},
],
"date_created": "2013-02-20T09:20:14.229000+00:00",
"date_updated": "2013-02-20T09:20:14.229000+00:00",
"created_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"subscription_counts_by_status": {
"active": 10,
"paused": 5,
"finished": 25
}
}
Delete an Email Sequence
Delete an Email Sequence.
curl -XDELETE "https://api.close.com/api/v1/sequence/{id}/"
Response Headers
content-type: application/json
Response Body
{}
List Sequence Schedules
List Sequence Schedules.
Currently only 2 pre-created schedules are available
- Monday - Friday, any time.
- Monday - Friday, 9am – 4pm.
curl -XGET "https://api.close.com/api/v1/sequence_schedule/"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"id": "sched_3MvlPuSqL0NGJyY95MBMpF",
"name": "Any time",
"ranges": [
{"weekday": 1, "from": "00:00", "to": "23:59"},
{"weekday": 2, "from": "00:00", "to": "23:59"},
{"weekday": 3, "from": "00:00", "to": "23:59"},
{"weekday": 4, "from": "00:00", "to": "23:59"},
{"weekday": 5, "from": "00:00", "to": "23:59"},
]
},
{
"id": "sched_1eL83fHJodv0OtoibuJFAw",
"name": "9am – 4pm",
"ranges": [
{"weekday": 1, "from": "09:00", "to": "16:00"},
{"weekday": 2, "from": "09:00", "to": "16:00"},
{"weekday": 3, "from": "09:00", "to": "16:00"},
{"weekday": 4, "from": "09:00", "to": "16:00"},
{"weekday": 5, "from": "09:00", "to": "16:00"},
]
},
]
}
Fetch a Sequence Schedule
Fetch a Sequence Schedule.
curl -XGET "https://api.close.com/api/v1/sequence_schedule/{id}/"
Response Headers
content-type: application/json
Response Body
{
"id": "sched_3MvlPuSqL0NGJyY95MBMpF",
"name": "Any time",
"ranges": [
{"weekday": 1, "from": "00:00", "to": "23:59"},
{"weekday": 2, "from": "00:00", "to": "23:59"},
{"weekday": 3, "from": "00:00", "to": "23:59"},
{"weekday": 4, "from": "00:00", "to": "23:59"},
{"weekday": 5, "from": "00:00", "to": "23:59"},
]
}
List Sequence Subscriptions
List Sequence Subscriptions.
At least one of sequence_id
, contact_id
, and lead_id
is required.
curl -XGET "https://api.close.com/api/v1/sequence_subscription/{?sequence_id, contact_id, lead_id}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"id": "sub_wRlAku35U53xEV7PcNY3Qo",
"organization_id": "orga_bwwWG475APeuQGur0thQshwVXo8rIYecQHDWFanqhen",
"sequence_id": "seq_1BTljGuCooX0nbFoPihl07",
"contact_id": "cont_MEe412YKyJBXuTqbttZBbcofXr3uydwKEhhBJjyu3O3",
"contact_email": "contact@example.org",
"status": "active",
"sender_account_id": "emailacct_aslkdjfalksjdfCmLShmuvlPMFy7Ze61FVeEj1VXnlG",
"sender_name": "John Doe",
"sender_email": "john@salesteam.com",
"date_created": "2013-02-20T09:20:14.229000+00:00",
"date_updated": "2013-02-20T09:20:14.229000+00:00",
"created_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
}
]
}
Fetch a single Sequence Subscription
Fetch a single Sequence Subscription.
curl -XGET "https://api.close.com/api/v1/sequence_subscription/{id}/"
Response Headers
content-type: application/json
Response Body
{
"id": "sub_wRlAku35U53xEV7PcNY3Qo",
"organization_id": "orga_bwwWG475APeuQGur0thQshwVXo8rIYecQHDWFanqhen",
"sequence_id": "seq_1BTljGuCooX0nbFoPihl07",
"contact_id": "cont_MEe412YKyJBXuTqbttZBbcofXr3uydwKEhhBJjyu3O3",
"contact_email": "contact@example.org",
"status": "active",
"sender_account_id": "emailacct_aslkdjfalksjdfCmLShmuvlPMFy7Ze61FVeEj1VXnlG",
"sender_name": "John Doe",
"sender_email": "john@salesteam.com",
"date_created": "2013-02-20T09:20:14.229000+00:00",
"date_updated": "2013-02-20T09:20:14.229000+00:00",
"created_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
}
Subscribe a Contact to a Sequence
Subscribe a Contact to a Sequence.
curl -XPOST "https://api.close.com/api/v1/sequence_subscription/"
Request Headers
content-type: application/json
Request Body
{
"sequence_id": "seq_1BTljGuCooX0nbFoPihl07",
"contact_id": "cont_MEe412YKyJBXuTqbttZBbcofXr3uydwKEhhBJjyu3O3",
"contact_email": "contact@example.org",
"sender_account_id": "emailacct_aslkdjfalksjdfCmLShmuvlPMFy7Ze61FVeEj1VXnlG",
"sender_name": "John Doe",
"sender_email": "john@salesteam.com",
}
Response Headers
content-type: application/json
Response Body
{
"id": "sub_wRlAku35U53xEV7PcNY3Qo",
"organization_id": "orga_bwwWG475APeuQGur0thQshwVXo8rIYecQHDWFanqhen",
"sequence_id": "seq_1BTljGuCooX0nbFoPihl07",
"contact_id": "cont_MEe412YKyJBXuTqbttZBbcofXr3uydwKEhhBJjyu3O3",
"contact_email": "contact@example.org",
"status": "active",
"sender_account_id": "emailacct_aslkdjfalksjdfCmLShmuvlPMFy7Ze61FVeEj1VXnlG",
"sender_name": "John Doe",
"sender_email": "john@salesteam.com",
"date_created": "2013-02-20T09:20:14.229000+00:00",
"date_updated": "2013-02-20T09:20:14.229000+00:00",
"created_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
}
Update a specific Subscription
Update a specific Subscription.
curl -XPUT "https://api.close.com/api/v1/sequence_subscription/{id}/"
Request Headers
content-type: application/json
Request Body
{
"status": "paused",
}
Response Headers
content-type: application/json
Response Body
{
"id": "sub_wRlAku35U53xEV7PcNY3Qo",
"organization_id": "orga_bwwWG475APeuQGur0thQshwVXo8rIYecQHDWFanqhen",
"sequence_id": "seq_1BTljGuCooX0nbFoPihl07",
"contact_id": "cont_MEe412YKyJBXuTqbttZBbcofXr3uydwKEhhBJjyu3O3",
"contact_email": "contact@example.org",
"status": "paused",
"sender_account_id": "emailacct_aslkdjfalksjdfCmLShmuvlPMFy7Ze61FVeEj1VXnlG",
"sender_name": "John Doe",
"sender_email": "john@salesteam.com",
"date_created": "2013-02-20T09:20:14.229000+00:00",
"date_updated": "2013-02-20T09:20:14.229000+00:00",
"created_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"updated_by_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
}
Dialer
A dialer is associated with a specific Smart View and automatically calls each lead in it for you. This allows you to call leads in a Smart View faster.
Once the dialer for a Smart View is initiated, it starts making calls to each lead that belongs to it and connects you to the call once someone picks up.
Dialers can have two behaviors:
power
, which will call one lead in the Smart View at a timepredictive
, which will call multiple leads in the Smart View at a time and connect you with the first lead that answers.
This endpoint gives you information about a dialer session including: the saved_search_id
used in the dialer session, the type of the dialer sessions, the users included in the session, and more.
List or filter all dialer sessions
List or filter all dialer sessions
curl -XGET "https://api.close.com/api/v1/dialer/{?status, status__in, saved_search_id, user_id}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"status": "inactive",
"user_id": "user_b3MfYitXVOHOnqZo4uyPGB7Dcp7r4MeECQptHpWq0HQ",
"users": [
{
"is_active": false,
"state": "inactive",
"user_id": "user_b3MfYitXVOHOnqZo4uyPGB7Dcp7r4MeECQptHpWq0HQ"
}
],
"saved_search_id": "save_lch8hNQFbD9MgvMZbprURV715VVs1DEXSUl1xOA74p0",
"date_updated": "2018-07-31T14:15:11.496227",
"caller_id": "",
"organization_id": "orga_hE18j8OUPc8s0OzTFGtmf69iowhhPVmcLj5i9cEphe5",
"ring_mode": "more-voicemails",
"saved_search_is_user_dependent": false,
"date_created": "2018-07-17T12:35:01.230707",
"music_preference": "tone1",
"type": "power",
"id": "dial_23eLaYZDjeL8tzFQMW5sto"
},
{
"status": "inactive",
"user_id": "user_b3MfYitXVOHOnqZo4uyPGB7Dcp7r4MeECQptHpWq0HQ",
"users": [
{
"is_active": false,
"state": "inactive",
"user_id": "user_b3MfYitXVOHOnqZo4uyPGB7Dcp7r4MeECQptHpWq0HQ"
}
],
"saved_search_id": "save_iKY1BB4HsI5Zzbgz3J20ycs8aPZK3Z9fq7rArkA85Gi",
"date_updated": "2018-07-31T13:45:42.875237",
"caller_id": "+14356128874",
"organization_id": "orga_hE18j8OUPc8s0OzTFGtmf69iowhhPVmcLj5i9cEphe5",
"ring_mode": "more-voicemails",
"saved_search_is_user_dependent": false,
"date_created": "2018-07-31T13:45:07.444155",
"music_preference": "tone1",
"type": "predictive",
"id": "dial_4DejEkNkJOWj1jvqf5f6LO"
}
]
}
Get a single dialer session
Get a single dialer session.
Once you have a saved_search_id
for a dialer session, you can use the saved_search endpoint to find out more information about the Smart View being used.
curl -XGET "https://api.close.com/api/v1/dialer/{id}/"
Response Headers
content-type: application/json
Response Body
{
"status": "inactive",
"user_id": "user_b3MfYitXVOHOnqZo4uyPGB7Dcp7r4MeECQptHpWq0HQ",
"users": [
{
"is_active": false,
"state": "inactive",
"user_id": "user_b3MfYitXVOHOnqZo4uyPGB7Dcp7r4MeECQptHpWq0HQ"
}
],
"saved_search_id": "save_iKY1BB4HsI5Zzbgz3J20ycs8aPZK3Z9fq7rArkA85Gi",
"date_updated": "2018-07-31T13:45:42.875237",
"caller_id": "+14356128874",
"organization_id": "orga_hE18j8OUPc8s0OzTFGtmf69iowhhPVmcLj5i9cEphe5",
"ring_mode": "more-voicemails",
"saved_search_is_user_dependent": false,
"date_created": "2018-07-31T13:45:07.444155",
"music_preference": "tone1",
"type": "predictive",
"id": "dial_4DejEkNkJOWj1jvqf5f6LO"
}
Smart Views
Smart Views are "saved search queries" in Close and show up in the sidebar in the UI. They can be private for a user or shared with an entire Organization.
List Smart Views
List Smart Views.
curl -XGET "https://api.close.com/api/v1/saved_search/"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"user_id": null,
"is_shared": true,
"used_recently": true,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "*",
"id": "save_wRlAku35U53xEV7PcNY3QodEHlgLPonBKkGFAxo9Ehb",
"name": "All Leads"
},
{
"user_id": null,
"is_shared": true,
"used_recently": false,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "created <= 30 days ago",
"id": "save_MaDhSTaHGmIYLV9px97xqRzlR0DTOtW9rOBcB6OPxXZ",
"name": "Recently Created"
},
{
"user_id": null,
"is_shared": true,
"used_recently": false,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "updated <= 30 days ago",
"id": "save_ZoAxTuqNVjlMclOZ4LyG2va4KqhpZ3mYqCFzb7LWdxU",
"name": "Recently Updated"
},
{
"user_id": null,
"is_shared": true,
"used_recently": false,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "last_call <= 30 days ago",
"id": "save_qPIaAo1mWL3Bxt5RSegrVue33jAC931ixK9BQj58p4d",
"name": "Recently Called"
},
{
"user_id": null,
"is_shared": true,
"used_recently": false,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "last_email <= 30 days ago",
"id": "save_VPDZRlI7uDFPGT8bd9eyhz02s059i6iqbSZCSgtFoJ4",
"name": "Recently Emailed"
},
{
"user_id": null,
"is_shared": true,
"used_recently": false,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "calls = 0",
"id": "save_iYYUYTcdQlrIXOWPzoGYDJvbdyXI8HbAr6AkuD55Yht",
"name": "Never Called"
},
{
"user_id": null,
"is_shared": true,
"used_recently": false,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "emails = 0",
"id": "save_nlNapOed54ALqOrxz3YntHu6TIADqjcWygJBAhnJ6tK",
"name": "Never Emailed"
},
{
"user_id": null,
"is_shared": true,
"used_recently": false,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "status:potential",
"id": "save_OgRxITsFk25w8xoP5tVR96uoT1LsqBMyBkHDUR0g6It",
"name": "Status: Potential"
},
{
"user_id": null,
"is_shared": true,
"used_recently": false,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "status:bad_fit",
"id": "save_ZfRsDNxZIn0nAfLvaL1RRWWNoCkdnRuRebVfb0vnyYy",
"name": "Status: Bad Fit"
},
{
"user_id": null,
"is_shared": true,
"used_recently": false,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "status:qualified",
"id": "save_M4hSwbifKNEYs7KkL3TvHbZNMKKqZYPks85k76X5Xj9",
"name": "Status: Qualified"
},
{
"user_id": null,
"is_shared": true,
"used_recently": false,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "opportunity_user:me",
"id": "save_xt5NukhI1d45UWopOZAipq5XjaEXwen75sVfAVq1eT3",
"name": "Opportunities: Mine"
},
{
"user_id": null,
"is_shared": true,
"used_recently": false,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "opportunity:active",
"id": "save_UYRWiEaTUrUZqnVgjMl2YWHvSgS8Hu4By6aEj2JgQCS",
"name": "Opportunities: Active"
},
{
"user_id": null,
"is_shared": true,
"used_recently": false,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "opportunity:won",
"id": "save_ARQ8Pp2JdLYgXRREy8zJyP4n1JllkExGejrSf4kUfNm",
"name": "Opportunities: Won"
},
{
"user_id": null,
"is_shared": true,
"used_recently": false,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "opportunity:lost",
"id": "save_nBeX7rJ2Qtp0hCWxoeh1wPgHq1y5b139MIharZ0so9A",
"name": "Opportunities: Lost"
}
]
}
Get a single Smart View
Get a single Smart View
curl -XGET "https://api.close.com/api/v1/saved_search/{id}/"
Response Headers
content-type: application/json
Response Body
{
"user_id": null,
"is_shared": true,
"used_recently": false,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "*",
"id": "save_wRlAku35U53xEV7PcNY3QodEHlgLPonBKkGFAxo9Ehb",
"name": "All Leads"
}
Create a Smart View
Create a Smart View
curl -XPOST "https://api.close.com/api/v1/saved_search/"
Request Headers
content-type: application/json
Request Body
{
"name": "every lead",
"query": "called > 0 and email_opened < 10 mins ago"
}
Response Headers
content-type: application/json
Response Body
{
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"is_shared": false,
"used_recently": true,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "called > 0 and email_opened < 10 mins ago",
"id": "save_Cin23B1CYKX83dbNnBB4Q5F5QXl9ucmgrqNf0esq1Ir",
"name": "every lead"
}
Update a Smart View
Update a Smart View
curl -XPUT "https://api.close.com/api/v1/saved_search/{id}/"
Request Headers
content-type: application/json
Request Body
{
"name": "every lead"
}
Response Headers
content-type: application/json
Response Body
{
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"is_shared": false,
"used_recently": true,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"query": "*",
"id": "save_wRlAku35U53xEV7PcNY3QodEHlgLPonBKkGFAxo9Ehb",
"name": "every lead"
}
Delete a Smart View
Bulk Actions
Bulk actions are used to perform an "action" (send an email, update a lead status, etc.) on a number of leads all at once based on a Lead search query.
Pausing and resuming
You can pause an in-progress bulk action by sending { 'status': 'paused' }
. You can also resume it afterwards ({ 'status': 'resuming' }
), unless more than 7 days passed since you paused the action.
Receiving an email after you're done
Use "send_done_email": false
if you don't want to get a confirmation email after a bulk action is done.
List bulk emails
List bulk emails.
curl -XGET "https://api.close.com/api/v1/bulk_action/email/"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"status": "processing",
"query": "*",
"template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn",
"contact_preference": "lead",
"n_leads": 824,
"n_leads_processed": 523,
"send_done_email": false,
"id": "bulkemail_qmjJY85TSmMBqw1MKgL5o3LdSJkvklqfAwfdcjiRYCy",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-12-05T18:34:41.753000+00:00",
"date_updated": "2013-12-05T19:33:29.357000+00:00",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
}
]
}
Fetch a single bulk email object
Fetch a single bulk email object.
curl -XGET "https://api.close.com/api/v1/bulk_action/email/{id}/"
Response Headers
content-type: application/json
Response Body
{
"status": "processing",
"query": "*",
"template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn",
"contact_preference": "lead",
"n_leads": 824,
"n_leads_processed": 523,
"send_done_email": false,
"id": "bulkemail_qmjJY85TSmMBqw1MKgL5o3LdSJkvklqfAwfdcjiRYCy",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-12-05T18:34:41.753000+00:00",
"date_updated": "2013-12-05T19:33:29.357000+00:00",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
}
Initiate a new bulk email
Initiate a new bulk email.
contact_preference
can be set to lead
(only email the primary/first contact email of the lead) or contact
(email the first contact email of each contact of the lead).
curl -XPOST "https://api.close.com/api/v1/bulk_action/email/"
Request Headers
content-type: application/json
Request Body
{
"template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn",
"query": "*",
"contact_preference": "lead",
"send_done_email": false
}
Response Headers
content-type: application/json
Response Body
{
"status": "created",
"query": "*",
"template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn",
"contact_preference": "lead",
"n_leads": null,
"n_leads_processed": 0,
"send_done_email": false,
"id": "bulkemail_qmjJY85TSmMBqw1MKgL5o3LdSJkvklqfAwfdcjiRYCy",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-12-05T18:34:41.753000+00:00",
"date_updated": "2013-12-05T19:33:29.357000+00:00",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
}
List bulk sequence subscriptions
List bulk sequence subscriptions.
curl -XGET "https://api.close.com/api/v1/bulk_action/sequence_subscription/"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"status": "processing",
"query": "*",
"action_type": "subscribe",
"sequence_id": "seq_1BTljGuCooX0nbFoPihl07",
"sender_account_id": "emailacct_aslkdjfalksjdfCmLShmuvlPMFy7Ze61FVeEj1VXnlG",
"sender_name": "John Doe",
"sender_email": "john@salesteam.com",
"contact_preference": "lead",
"n_leads": 824,
"n_leads_processed": 523,
"send_done_email": false,
"id": "bulkseqsub_qmjJY85TSmMBqw1MKgL5o3LdSJkvklqfAwfdcjiRYCy",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-12-05T18:34:41.753000+00:00",
"date_updated": "2013-12-05T19:33:29.357000+00:00",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
}
]
}
Fetch a single bulk sequence subscription object
Fetch a single bulk sequence subscription object.
curl -XGET "https://api.close.com/api/v1/bulk_action/sequence_subscription/{id}/"
Response Headers
content-type: application/json
Response Body
{
"status": "processing",
"query": "*",
"action_type": "subscribe",
"sequence_id": "seq_1BTljGuCooX0nbFoPihl07",
"sender_account_id": "emailacct_aslkdjfalksjdfCmLShmuvlPMFy7Ze61FVeEj1VXnlG",
"sender_name": "John Doe",
"sender_email": "john@salesteam.com",
"contact_preference": "lead",
"n_leads": 824,
"n_leads_processed": 523,
"send_done_email": false,
"id": "bulkseqsub_qmjJY85TSmMBqw1MKgL5o3LdSJkvklqfAwfdcjiRYCy",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-12-05T18:34:41.753000+00:00",
"date_updated": "2013-12-05T19:33:29.357000+00:00",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
}
Initiate a new bulk sequence subscription
Initiate a new bulk sequence subscription.
action_type
must be one of:
subscribe
to create a new sequence subscription for contacts that have never received the given sequence.resume
to resume any paused sequence subscriptions for the given sequence or all sequences ifsequence_id
is not provided.resume_finished
to resume any finished sequence subscriptions for the given sequence or all sequences ifsequence_id
is not provided.pause
to pause any active sequence subscriptions for the given sequence or all sequences ifsequence_id
is not provided.
sequence_id
, sender_account_id
, sender_name
, sender_email
and contact_preference
are required if action_type
is subscribe
.
contact_preference
can be set to:
lead
to only subscribe the primary/first contact email of the lead.contact
to subscribe the primary email of each contact of the lead.
curl -XPOST "https://api.close.com/api/v1/bulk_action/sequence_subscription/"
Request Headers
content-type: application/json
Request Body
{
"query": "*",
"action_type": "subscribe",
"sequence_id": "seq_1BTljGuCooX0nbFoPihl07",
"sender_account_id": "emailacct_aslkdjfalksjdfCmLShmuvlPMFy7Ze61FVeEj1VXnlG",
"sender_name": "John Doe",
"sender_email": "john@salesteam.com",
"contact_preference": "lead",
}
Response Headers
content-type: application/json
Response Body
{
"status": "processing",
"query": "*",
"action_type": "subscribe",
"sequence_id": "seq_1BTljGuCooX0nbFoPihl07",
"sender_account_id": "emailacct_aslkdjfalksjdfCmLShmuvlPMFy7Ze61FVeEj1VXnlG",
"sender_name": "John Doe",
"sender_email": "john@salesteam.com",
"contact_preference": "lead",
"n_leads": 824,
"n_leads_processed": 523,
"send_done_email": false,
"id": "bulkseqsub_qmjJY85TSmMBqw1MKgL5o3LdSJkvklqfAwfdcjiRYCy",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-12-05T18:34:41.753000+00:00",
"date_updated": "2013-12-05T19:33:29.357000+00:00",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
}
List bulk deletes
List bulk deletes.
curl -XGET "https://api.close.com/api/v1/bulk_action/delete/"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"status": "done",
"query": "status:outdated",
"n_leads": 77,
"n_leads_processed": 77,
"send_done_email": false,
"id": "bulkdelete_asdVYCm54A0El829k39e7nIvlCSDDhVLuyb8aspGSET",
"organization_id": "orga_jhdHenKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X",
"created_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU"
"date_created": "2015-03-16T00:19:50.141000+00:00",
"date_updated": "2015-03-16T00:20:09.442000+00:00"
}
]
}
Fetch a single bulk delete object
Fetch a single bulk delete object.
curl -XGET "https://api.close.com/api/v1/bulk_action/delete/{id}/"
Response Headers
content-type: application/json
Response Body
{
"status": "done",
"query": "status:outdated",
"n_leads": 77,
"n_leads_processed": 77,
"send_done_email": false,
"id": "bulkdelete_asdVYCm54A0El829k39e7nIvlCSDDhVLuyb8aspGSET",
"organization_id": "orga_jhdHenKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X",
"created_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU"
"date_created": "2015-03-16T00:19:50.141000+00:00",
"date_updated": "2015-03-16T00:20:09.442000+00:00"
}
Initiate a new bulk delete
Initiate a new bulk delete.
Use "send_done_email": false
if you don't want to get a confirmation email after the bulk action is done.
curl -XPOST "https://api.close.com/api/v1/bulk_action/delete/"
Request Headers
content-type: application/json
Request Body
{
"query": "lead_status:Potential"
}
Response Headers
content-type: application/json
Response Body
{
"status": "created",
"query": "lead_status:Potential",
"n_leads": null,
"n_leads_processed": 0,
"send_done_email": true,
"id": "bulkdelete_asdVYCm54A0El829k39e7nIvlCSDDhVLuyb8aspGSET",
"organization_id": "orga_jhdHenKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X",
"created_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU"
"date_created": "2015-03-16T00:19:50.141000+00:00",
"date_updated": "2015-03-16T00:20:09.442000+00:00"
}
List bulk edits
List bulk edits.
curl -XGET "https://api.close.com/api/v1/bulk_action/edit/"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"status": "done",
"type": "set_lead_status",
"lead_status_id": "stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8",
"query": "lead_status:Potential",
"n_leads": 100,
"n_leads_processed": 100,
"send_done_email": false,
"id": "bulkedit_asdVYCm54A0El829k39e7nIvlCSDDhVLuyb8aspGSET",
"organization_id": "orga_jhdHenKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X",
"created_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU"
"date_created": "2015-03-16T00:19:50.141000+00:00",
"date_updated": "2015-03-16T00:20:09.442000+00:00"
}
]
}
Fetch a single bulk edit object
Fetch a single bulk edit object.
curl -XGET "https://api.close.com/api/v1/bulk_action/edit/{id}/"
Response Headers
content-type: application/json
Response Body
{
"status": "done",
"type": "set_lead_status",
"lead_status_id": "stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8",
"query": "lead_status:Potential",
"n_leads": 100,
"n_leads_processed": 100,
"send_done_email": false,
"id": "bulkedit_asdVYCm54A0El829k39e7nIvlCSDDhVLuyb8aspGSET",
"organization_id": "orga_jhdHenKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X",
"created_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU"
"date_created": "2015-03-16T00:19:50.141000+00:00",
"date_updated": "2015-03-16T00:20:09.442000+00:00"
}
Initiate a new bulk edit
Initiate a new bulk edit.
Pass additional parameters depending on which type
is passed:
set_lead_status
will set the Lead Status on all leads. It expects:lead_status_id
- ID of the Lead Status to use.
clear_custom_field
will clear/remove/unset a specific custom field from all leads. It expects:custom_field_id
orcustom_field_name
- ID or exact name of the custom field to remove.
set_custom_field
will set/update/add a specific custom field on all leads. It expects:custom_field_id
orcustom_field_name
- ID or exact name of the custom field to set/update.custom_field_value
- New value. Usecustom_field_values
to pass multiple values to custom fields that support it.custom_field_operation
-replace
,add
, orremove
(defaults toreplace
). Only applicable for custom fields that accept multiple values.
Use "send_done_email": false
if you don't want to get a confirmation email after the bulk action is done.
curl -XPOST "https://api.close.com/api/v1/bulk_action/edit/"
Request Headers
content-type: application/json
Request Body
{
"query": "lead_status:Potential",
"type": "set_lead_status",
"lead_status_id": "stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8"
}
Response Headers
content-type: application/json
Response Body
{
"status": "created",
"type": "set_lead_status",
"lead_status_id": "stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8",
"query": "lead_status:Potential",
"n_leads": null,
"n_leads_processed": 0,
"send_done_email": true,
"id": "bulkedit_asdVYCm54A0El829k39e7nIvlCSDDhVLuyb8aspGSET",
"organization_id": "orga_jhdHenKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X",
"created_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
"updated_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU"
"date_created": "2015-03-16T00:19:50.141000+00:00",
"date_updated": "2015-03-16T00:20:09.442000+00:00"
}
Integration Links
This endpoint can be used to set up integration links available in Close.
Each link has a name
(displayed as link text), url
template and a type
.
Type can be one of:
lead
contact
opportunity
Note that you can only create/edit/delete custom fields if you're an admin.
Get all integration links for your organization
Get all integration links for your organization
curl -XGET "https://api.close.com/api/v1/integration_link/"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"id": "ilink_wRlAku35U53xEV7PcNY3QodEHlgLPonBKkGFAxo9Ehb",
"name": "Google Search",
"url": "http://google.com/search?q={{lead.display_name}}",
"type": "lead"
},
{
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"id": "ilink_wRlAku35U53xEV7PcNY3QodEHlgLPonBKkGFAxo9Ehz",
"name": "LinkedIn",
"url": "https://www.linkedin.com/vsearch/p?keywords={{contact.name}}",
"type": "contact"
}
]
}
Get a single integration link
Get a single integration link
curl -XGET "https://api.close.com/api/v1/integration_link/{id}/"
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"id": "ilink_wRlAku35U53xEV7PcNY3QodEHlgLPonBKkGFAxo9Ehb",
"name": "Google Search",
"url": "http://google.com/search?q={{lead.display_name}}",
"type": "lead"
}
Create an integration link
Create an integration link
curl -XPOST "https://api.close.com/api/v1/integration_link/"
Request Headers
content-type: application/json
Request Body
{
"name": "Google Search",
"url": "http://google.com/search?q={{lead.display_name}}",
"type": "lead"
}
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"id": "ilink_wRlAku35U53xEV7PcNY3QodEHlgLPonBKkGFAxo9Ehb",
"name": "Google Search",
"url": "http://google.com/search?q={{lead.display_name}}",
"type": "lead"
}
Update an integration link
Update an integration link
curl -XPUT "https://api.close.com/api/v1/integration_link/{id}/"
Request Headers
content-type: application/json
Request Body
{
"name": "Google Lookup"
}
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"id": "ilink_wRlAku35U53xEV7PcNY3QodEHlgLPonBKkGFAxo9Ehb",
"name": "Google Lookup",
"url": "http://google.com/search?q={{lead.display_name}}",
"type": "lead"
}
Delete an integration link
Exports
This endpoint can be used to export data out of Close.
Export leads, opportunities, or contacts, based on a lead search query
Export leads, opportunities, or contacts, based on a lead search query. You will receive a link to the generated file via email once the export is done.
The exported file is GZIP compressed to make your download and our upload faster. The content-encoding
HTTP header will be set to gzip
and the content-type
HTTP header will be set to text/csv
for CSV exports or application/json
for JSON exports.
query (optional)
The search query used to narrow the exported results down. By default, all leads are exported.
format
Format of the exported file. The choices are: csv
, json
. JSON is recommended for raw backups or data migrations.
type
Type of the export.
leads
: For CSV exports, it results in one row per lead. For JSON exports, this is the recommended type and is a superset of the other two types.contacts
: For CSV exports, it results in one row per contact.lead_opps
: For CSV exports, it results in one row per opportunity.
fields (optional)
By default we return all the data fields in each export type. If you only need specific fields exported, you can explicitly list them in fields
to get smaller exports.
include_activities (optional)
Activities aren't included in any exports by default. If you want all your Activities exported as well, pass "include_activities": true
. Note: this only works for leads
type with json
format.
include_smart_fields (optional)
Smart Fields aren't included in any exports by default. If you want all of them exported as well, pass "include_smart_fields": true
. Note: this only works for leads
type with json
format or any type formatted as csv
.
Use "send_done_email": false
if you don't want to get a confirmation email after the bulk action is done.
curl -XPOST "https://api.close.com/api/v1/export/lead/"
Request Headers
content-type: application/json
Request Body
{
"query": "status:won",
"format": "csv",
"type": "leads",
"send_done_email": false
}
Response Headers
content-type: application/json
Response Body
{
"id": "expo_yasdalskdjjflkahxrvLG8iVupzjoJVRPgrGhJ0A0b3bae",
"status": "created",
"download_url": null,
"type": "leads",
"query": "status:won",
"format": "csv",
"fields": [
"id", "display_name", "name", "description", "url", "status_id",
"status_label", "addresses", "contacts", "custom", "created_by",
"created_by_name", "updated_by", "updated_by_name", "date_created",
"date_updated"
],
"n_docs": null,
"n_docs_processed": 0,
"created_by": "user_askldasdfjYjsbL57wDamaysp1DJcuZWSQ1Z9oHNSqM",
"updated_by": "user_askldasdfjYjsbL57wDamaysp1DJcuZWSQ1Z9oHNSqM",
"date_created": "2014-04-02T15:00:05.190000+00:00",
"date_updated": "2014-04-02T23:36:30.719000+00:00",
"organization_id": "orga_alksdjdfjasdfkljasdlkfjfaklsdjf",
"send_done_email": false
}
Export opportunities, based on opportunity filters
Export opportunities, based on opportunity filters.
params (optional)
A dictionary of filters, which would be used for the /opportunity/
endpoint.
format
Format of the exported file. The choices are: csv
, json
.
fields (optional)
By default we return all the data fields. If you only need specific fields exported, you can explicitly list them in fields to get smaller exports.
Use "send_done_email": false
if you don't want to get a confirmation email after the bulk action is done.
curl -XPOST "https://api.close.com/api/v1/export/opportunity/"
Request Headers
content-type: application/json
Request Body
{
'params': {
'user_id__in': 'id_1,id_2',
'status_id':'st_id'
},
'format': 'csv',
"send_done_email": false
}
Response Headers
content-type: application/json
Response Body
{
"id": "expo_ASFasdfasdAY8VZhRiSn5UG2wNGRUrRurHdaN7kQp6",
"status": "created",
"download_url": null,
"type": "opps",
"params": {
'user_id__in': 'id_1,id_2',
'status_id':'st_id'
},
"format": "csv",
"fields": [
"id", "user_id", "user_name", "value", "value_period", "confidence",
"date_won", "status_id", "status_label", "status_type", "contact_id",
"note", "lead_id", "lead_name", "created_by", "created_by_name",
"updated_by", "updated_by_name", "date_created", "date_updated"
],
"n_docs": null,
"n_docs_processed": 0,
"created_by": "user_askldasdfjYjsbL57wDamaysp1DJcuZWSQ1Z9oHNSqM",
"updated_by": "user_askldasdfjYjsbL57wDamaysp1DJcuZWSQ1Z9oHNSqM",
"date_created": "2014-04-01T16:50:22.256000+00:00",
"date_updated": "2014-04-02T00:55:34.967000+00:00",
"organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"send_done_email": false
}
Get a single Export
Get a single Export (e.g. to check its status
or get a download_url
)
status
can have one of these values:created
,started
,in_progress
,done
,error
.
curl -XGET "https://api.close.com/api/v1/export/{id}/"
Response Headers
content-type: application/json
Response Body
{
"id": "expo_9lHXk6sbznxcuQOEASDF59arhUCdS2CqNm9OTv6yb",
"status": "in_progress",
"download_url": null,
"type": "lead_opps",
"query": "*",
"format": "csv",
"fields": [
"id", "name", "title", "phones", "emails", "urls", "created_by",
"updated_by", "date_created", "date_updated"
],
"n_docs": 100000,
"n_docs_processed": 5000,
"created_by": "user_askldasdfjYjsbL57wDamaysp1DJcuZWSQ1Z9oHNSqM",
"updated_by": "user_askldasdfjYjsbL57wDamaysp1DJcuZWSQ1Z9oHNSqM",
"date_created": "2014-04-02T15:32:54.774000+00:00",
"date_updated": "2014-04-02T23:35:59.704000+00:00",
"organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"send_done_email": false
}
List all the exports
List all the exports
curl -XGET "https://api.close.com/api/v1/export/"
Response Headers
content-type: application/json
Response Body
{
"data": [
{
"id": "expo_yasd512lkhIhxrvLG8iVupzjoJVRPgrGhJ0A0b3bae",
"status": "done",
"download_url": "https://url-to-generated-leads.csv",
"type": "leads",
"query": "*",
"format": "csv",
"fields": [
"id", "display_name", "name", "description", "url", "status_id",
"status_label", "addresses", "contacts", "custom", "created_by",
"created_by_name", "updated_by", "updated_by_name", "date_created",
"date_updated"
],
"n_docs": 100000,
"n_docs_processed": 100000,
"created_by": "user_askldasdfjYjsbL57wDamaysp1DJcuZWSQ1Z9oHNSqM",
"updated_by": "user_askldasdfjYjsbL57wDamaysp1DJcuZWSQ1Z9oHNSqM",
"date_created": "2014-04-02T15:00:05.190000+00:00",
"date_updated": "2014-04-02T23:36:30.719000+00:00",
"organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"send_done_email": false
},
{
"id": "expo_9lHXk6sbASDKFJNZ59arhUCdS2CqNm9OTv6yb",
"status": "done",
"download_url": "https://url-to-generated-contacts.json",
"type": "contacts",
"query": "*",
"format": "json",
"fields": [
"id", "name", "title", "phones", "emails", "urls", "created_by",
"updated_by", "date_created", "date_updated"
],
"n_docs": 100000,
"n_docs_processed": 100000,
"created_by": "user_askldasdfjYjsbL57wDamaysp1DJcuZWSQ1Z9oHNSqM",
"updated_by": "user_askldasdfjYjsbL57wDamaysp1DJcuZWSQ1Z9oHNSqM",
"date_created": "2014-04-02T15:32:54.774000+00:00",
"date_updated": "2014-04-02T23:35:59.704000+00:00",
"organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"send_done_email": false
},
{
"id": "expo_9lHXk6sbznxcuQOEASDF59arhUCdS2CqNm9OTv6yb",
"status": "in_progress",
"download_url": null,
"type": "lead_opps",
"query": "*",
"format": "csv",
"fields": [
"id", "name", "title", "phones", "emails", "urls", "created_by",
"updated_by", "date_created", "date_updated"
],
"n_docs": 100000,
"n_docs_processed": 5000,
"created_by": "user_askldasdfjYjsbL57wDamaysp1DJcuZWSQ1Z9oHNSqM",
"updated_by": "user_askldasdfjYjsbL57wDamaysp1DJcuZWSQ1Z9oHNSqM",
"date_created": "2014-04-02T15:32:54.774000+00:00",
"date_updated": "2014-04-02T23:35:59.704000+00:00",
"organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"send_done_email": false
},
{
"id": "expo_ASFasdfasdAY8VZhRiSn5UG2wNGRUrRurHdaN7kQp6",
"status": "done",
"download_url": "https://url-to-generated-opps.csv",
"type": "opps",
"params": {
"organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_id": "stat_laksdjfxOOHx2JnhqtovutN3zeuARGfzB21x5t1W88G"
},
"format": "csv",
"fields": [
"id", "user_id", "user_name", "value", "value_period", "confidence",
"date_won", "status_id", "status_label", "status_type", "contact_id",
"note", "lead_id", "lead_name", "created_by", "created_by_name",
"updated_by", "updated_by_name", "date_created", "date_updated"
],
"n_docs": 100000,
"n_docs_processed": 100000,
"created_by": "user_askldasdfjYjsbL57wDamaysp1DJcuZWSQ1Z9oHNSqM",
"updated_by": "user_askldasdfjYjsbL57wDamaysp1DJcuZWSQ1Z9oHNSqM",
"date_created": "2014-04-01T16:50:22.256000+00:00",
"date_updated": "2014-04-02T00:55:34.967000+00:00",
"organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"send_done_email": false
}
],
"has_more": false
}
Phone Numbers
This endpoint shows you all the phone numbers that exist in your organization and lets you rent new numbers. It lets you label them and configure their settings.
There are a few types of phone numbers:
internal
- means the number is owned and controlled by Close.external
- the number is owned by you and can only be used for outbound Close calls as a caller ID (e.g. it could be your company cell phone number).virtual
- the number is owned by you, but the calls are routed to Close via BYOC.
Whether a given phone number belongs to an individual user or to a group of users is determined by the is_group_number
boolean. Learn more about group numbers.
If a given phone number is a group number, it will list all of its participating users' IDs in participants
and all of the participating phone numbers in phone_numbers
.
List or search for phone numbers
List or search for phone numbers.
curl -XGET "https://api.close.com/api/v1/phone_number/{?number, user_id, is_group_number}"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [
{
"organization_id": "orga_0981234320958235n8n7ElZZ3qyRF3QI8fJxTSAYr5X",
"user_id": "user_9u28091283453453QcUwV7tbwZRpe3sA215Ftv8OvbU",
"id": "phon_asdjkfev50ZKOqTVndOFN4effzv99vDvpDxrks9XLU3",
"is_group_number": false,
"label": "Primary Number",
"number": "+16503335555",
"number_formatted": "+1 650-333-5555",
"type": "internal",
"sms_enabled": true,
"supports_sms_to_countries": ["CA", "US"],
"voicemail_greeting_url": null,
"forward_to": null,
"forward_to_enabled": false,
"forward_to_formatted": null,
"date_created": "2016-07-18T22:54:24.787000+00:00",
"date_updated": "2016-07-18T22:55:55.938000+00:00"
},
{
"organization_id": "orga_0981234320958235n8n7ElZZ3qyRF3QI8fJxTSAYr5X",
"user_id": "user_9u28091283453453QcUwV7tbwZRpe3sA215Ftv8OvbU",
"id": "phon_973589ev50ZKOqTVndOFN4effz092753608234569U3",
"label": "My Personal Cell",
"number": "+14151231234",
"number_formatted": "+1 415-123-1234",
"type": "external",
"sms_enabled": false,
"supports_sms_to_countries": [],
"date_created": "2016-07-18T22:54:24.787000+00:00",
"date_updated": "2016-07-18T22:55:55.938000+00:00"
},
{
"organization_id": "orga_0981234320958235n8n7ElZZ3qyRF3QI8fJxTSAYr5X",
"user_id": null,
"id": "phon_324230958beOjoa6F42w5Hlkdjfg8p3wmIPnTuvNbaX",
"is_group_number": true,
"label": "Group Number",
"number": "+16508881234",
"number_formatted": "+1 650-888-1234",
"type": "internal",
"sms_enabled": true,
"supports_sms_to_countries": ["CA", "US"],
"participants": [
"user_DFPQM1RBaF9qRM9N84nv9QbaeY69br4m8hRAO5aHNgI",
"user_450934860934850940958QbaeY69laksjdflkajllga",
"user_alksd2930458f50amfasmlhaeYlWERTJfdflkJJAAax",
],
"phone_numbers": [],
"phone_numbers_formatted": [],
"voicemail_greeting_url": null,
"forward_to": null,
"forward_to_enabled": false,
"forward_to_formatted": null,
"date_created": "2016-07-14T20:37:23.022000+00:00",
"date_updated": "2016-07-18T22:54:41.548000+00:00"
}
]
}
Retrieve a single phone number
Retrieve a single phone number.
curl -XGET "https://api.close.com/api/v1/phone_number/{id}/"
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_0981234320958235n8n7ElZZ3qyRF3QI8fJxTSAYr5X",
"user_id": "user_9u28091283453453QcUwV7tbwZRpe3sA215Ftv8OvbU",
"id": "phon_asdjkfev50ZKOqTVndOFN4effzv99vDvpDxrks9XLU3",
"is_group_number": false,
"label": "Primary Number",
"number": "+16503335555",
"number_formatted": "+1 650-333-5555",
"type": "internal",
"sms_enabled": true,
"supports_sms_to_countries": ["CA", "US"],
"voicemail_greeting_url": null,
"forward_to": null,
"forward_to_enabled": false,
"forward_to_formatted": null,
"date_created": "2016-07-18T22:54:24.787000+00:00",
"date_updated": "2016-07-18T22:55:55.938000+00:00"
}
Update a phone number
Update a phone number.
You need the "Manage Group Phone Numbers" permission to update a group number. You can only update your own personal numbers.
You can:
- Change a
label
of your number. - Set up call forwarding via
forward_to
andforward_to_enabled
. - Set up a voicemail greeting by including a URL of an mp3 recording in
voicemail_greeting_url
. We require the URL to be secure (i.e. starting with https://). - Modify which team members are part of a group number via
participants
. This should be a list of user IDs. - Modify which external phone numbers are part of a group number via
phone_numbers
. This should be a list of phone numbers in E.164 international format, e.g. "+16503334444".
curl -XPUT "https://api.close.com/api/v1/phone_number/{id}/"
Request Headers
content-type: application/json
Request Body
{
"label": "My number w/ forwarding",
"forward_to": "+16502221111",
"forward_to_enabled": true,
"voicemail_greeting_url": "https://s3.amazonaws.com/bucket/aaa-bbb-ccc.mp3"
}
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_0981234320958235n8n7ElZZ3qyRF3QI8fJxTSAYr5X",
"user_id": "user_9u28091283453453QcUwV7tbwZRpe3sA215Ftv8OvbU",
"id": "phon_asdjkfev50ZKOqTVndOFN4effzv99vDvpDxrks9XLU3",
"is_group_number": false,
"label": "My number w/ forwarding",
"number": "+16503335555",
"number_formatted": "+1 650-333-5555",
"type": "internal",
"sms_enabled": true,
"supports_sms_to_countries": ["CA", "US"],
"voicemail_greeting_url": "https://s3.amazonaws.com/bucket/aaa-bbb-ccc.mp3",
"forward_to": "+16502221111",
"forward_to_enabled": true,
"forward_to_formatted": "+1 650-222-1111",
"date_created": "2016-07-18T22:54:24.787000+00:00",
"date_updated": "2016-07-22T22:55:55.938000+00:00"
}
Delete a phone number
Delete a phone number.
You need the "Manage Group Phone Numbers" permission to delete a group number. You can only delete your own personal numbers.
curl -XDELETE "https://api.close.com/api/v1/phone_number/{id}/"
Response Headers
content-type: application/json
Response Body
{}
Rent an internal phone number
Rent an internal phone number.
Renting a phone number incurs a cost. You need the "Manage Group Phone Numbers" permission to rent group numbers.
Accepts the following fields:
country
(required): A two letter ISO country code (e.g.US
for United States).sharing
(required):personal
for a number that belongs to an individual user, orgroup
for a group number.prefix
(optional): A string with the phone number prefix or area code, not including the country code.with_sms
(optional): By default, SMS-capable numbers are rented if Close supports SMS for the given country. Renting an SMS-capable number can be forced by setting this flag totrue
. If set tofalse
, certain prefixes that don't support SMS can be rented in countries where Close supports SMS. In most scenarios, this flag should not be passed unless ahas-voice-only
error status is received (see below).
If a number was rented, a 201 response is returned with the new number. If no
number was rented (4xx response code), the response contains a status
field
which may contain one of the values below. New statuses may be added in the
future.
has-voice-only
: This country/prefix combination only has non-SMS-capable numbers. You can attempt renting the number by passingwith_sms
asfalse
.needs-more-info
: More information (such as proof of address) is needed to rent this number. This number can only be rented by contacting Close support.billing-error
: An error related to billing has occurred. For example, the telephony budget has been reached, or there are not enough funds and recharging failed.error
: An error has occurred while renting this number. A human-readable message is returned in theerror
field.
curl -XPOST "https://api.close.com/api/v1/api/v1/phone_number/request/internal/"
Request Headers
content-type: application/json
Request Body
{
"country": "US",
"sharing": "personal",
"prefix": "650",
}
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_0981234320958235n8n7ElZZ3qyRF3QI8fJxTSAYr5X",
"user_id": "user_9u28091283453453QcUwV7tbwZRpe3sA215Ftv8OvbU",
"id": "phon_MiLNdBqo8utNOf1U78RaZgQB1Iq6rRGftiDW5C8B9uL",
"number": "+16503335555",
"number_formatted": "+1 650-333-5555",
"country": "US",
"type": "internal",
"sms_enabled": true,
"is_group_number": false,
"label": null,
"forward_to": null,
"forward_to_formatted": null,
"forward_to_enabled": false,
"voicemail_greeting_url": null,
"supports_sms_to_countries": ["CA", "PR", "US"],
"date_created": "2021-03-17T11:45:56.651057",
"date_updated": "2021-03-17T11:45:56.651057"
}
Event Log
Most actions in Close that change an object are logged in the event log. For example, creating a lead, sending an email, or deleting a note will create an event log entry. The event log API allows you to access these events, up to 30 days back in history.
For privacy reasons, certain fields are only visible to non-admins for one hour.
Event format
An event object consists of the following fields:
date_created
: Event creation datedate_updated
: Even update date. Note that existing events can be updated if multiple actions to the same object happen in a short time frame. In this case, an event’sdate_updated
may change, but thedate_created
will stay the same.organization_id
: The organization IDuser_id
: The ID of the user who generated this event, ornull
if the event wasn’t directly generated by a user action.request_id
: A string with the unique request identifier. Multiple events from the same request can be associated by looking at the request identifier.api_key_id
: The API key ID used if the event was generated by a request made through the Close API using an API key, otherwisenull
.object_type
: Type of the object. Examples arelead
,activity.email
,status_change.opportunity
. For a full list, see List of events.object_id
: The ID of the object that is affected.lead_id
: The ID of the corresponding lead, if any, ornull
. In case of a lead event, this is equivalent toobject_id
.action
: The type of the event. The most common types are:created
: An object was created.updated
: An object was updated.deleted
: An object was deleted.
Certain object types can generate other actions (
merged
,completed
,sent
, etc.). For a full list, see List of events.changed_fields
: For update events, contains a list of fields that have changed.data
: Contains the payload of the affected object as if you fetched it via API (null
for delete events). For non-admins, this field is only returned for events less than one hour old.previous_data
: For update events, this contains a dictionary of fields that have changed and their previous values. For delete events, this contains all the object attributes. For non-admins, this field is only returned for events less than one hour old.meta
: Contains additional helpful information for certain event types.bulk_action_id
: For events caused by bulk actions, contains the bulk action ID.merge_source_lead_id
: For lead merge events, contains the ID of the source lead (that is being merged into the destination lead).merge_destination_lead_id
: For lead merge events, contains the ID of the destination lead (that the source lead merges into).request_method
: For events that are associated with an HTTP request, contains the request method of the request (e.g.POST
).request_path
: For events that are associated with an HTTP request, contains the request path of the request (e.g./api/v1/lead/
).
Event consolidation
Multiple updated
events for the same object may be consolidated into one event. In this case, an existing event is updated: The updated event will retain the original date_created
and have a new date_updated
. The updated event’s data
will contain the updated state of the object, and the attributes in previous_data
are merged (e.g. if a lead’s name changes from A to B, and then from B to C, the updated event would contain {"data": {"name": "C"}, "previous_data": {"name": "A"}}
).
List of events
Here is the full list of events grouped by object type and action:
Lead (
lead
)created
- a lead is created in your organization (regardless of the method).updated
- an existing lead is updated. It's triggered when:- Any of the lead's basic fields change, e.g.
name
,description
,url
,status
, etc. - A contact is added or removed (the
contact_ids
list of the lead changes). - Addresses (
addresses
) or custom field values (custom
) are added, removed, or updated.
Note: Changes to a lead's activities, opportunities, tasks, and updates to existing contacts do not trigger this event (even though they may affect the lead's
date_updated
).- Any of the lead's basic fields change, e.g.
deleted
- a lead is deleted. Note that deleting a lead will cause additionaldeleted
events on child objects like activities, opportunities, tasks, and contacts.merged
- two leads are merged.lead_id
anddata
contain the lead ID and data of the resulting (destination) lead. Note that you will also getupdated
anddeleted
events for the leads and any related objects involved in the merge. All events related to the merge containmerge_source_lead_id
andmerge_destination_lead_id
in themeta
field of the event, pointing to the source lead's and destination lead's ID, respectively (where the source lead merges into the destination lead).
- Contact (
contact
)created
- a contact is created in your organization.updated
- a contact is updated. It's triggered when:- Any of the contact's basic fields change, e.g.
name
,title
. - Any of the contact's nested fields change, e.g. when an email changes, a new phone number is added, or a URL is removed.
- Any of the contact's basic fields change, e.g.
deleted
- a contact is deleted.
- Opportunity (
opportunity
)created
- an opportunity is created.updated
- an opportunity is updated. It's triggered when any of the opportunity's basic fields change, e.g.status
,date_won
,value
,value_period
,confidence
. It is not triggered whenvalue_currency
changes, since it's an organization-wide setting.deleted
- an opportunity is deleted.
- Tasks (
task.SUBTYPE
, see the Tasks section for a list of possible subtypes, e.g.task.lead
)created
- a task is created.updated
- a task is updated. It's triggered when any of the basic fields on a task change. Depending on the task type, the fields can be different, but some examples are:is_complete
,date
,text
,opportunity_value
,subject
,emails
.deleted
- a task is deleted.completed
- a task is marked as done.
- Email (
activity.email
)created
- an email is created. It can either be an incoming email that was synced, or an outgoing email (either scheduled to be sent viastatus: "outbox"
or created withstatus: "draft"
via the UI).updated
- an email is updated. It's triggered when any of the basic email fields change (e.g.status
,subject
,body_text
,body_html
,opens
, etc.). We generally discourage from using this event type because many updates happen when a user is drafting an email due to periodic auto-saves. Look atcreated
orsent
for useful (and less noisy) alternatives.deleted
- an email is deleted.sent
- an outgoing email is sent through our UI or API. Note that this event is triggered when the email is actually sent, not when the user clicks "send" (which only puts the email in the outbox and schedules the sending). Emails sent via your email provider, outside of Close, do not trigger this event. They do however trigger acreated
event when they are synced via IMAP.
- Email thread (
activity.email_thread
)created
- an email thread is created. It can happen when an email is synced and it doesn't match any of the existing threads, or when a new email thread is created via the API or UI.updated
- an email thread is updated. It's triggered when a thread's fields change, e.g.emails
,n_emails
,latest_normalized_subject
,participants
.deleted
- an email thread is deleted. This happens when all of the emails are deleted from a thread (each triggering a separatedeleted
) or when the thread is merged into another one.
- Call (
activity.call
)created
- a call is created. It can be triggered by:- A user initiating a call.
- A user transferring a call.
- An inbound call coming in.
- A user manually logging a call (or a call being logged via the API).
updated
- a call is updated. It's triggered when any of the basic call fields change (e.g.note
,status
,duration
,recording_url
, etc.). We generally discourage from using this event type because many updates happen when a user is writing a call note due to preiodic auto-saves. Look atcreated
orcompleted
for useful (and less noisy) alternatives.deleted
- a call is deleted.completed
- a call is completed. This event is not triggered for calls made outside of Close (e.g. manually logged calls).
- SMS (
activity.sms
)created
- an SMS is created. It's triggered on either an inbound SMS that was sent to a Close phone number or the creation of an outbound SMS (either scheduled to be sent viastatus: "outbox"
or created withstatus: "draft"
via the UI).updated
- an SMS is updated. It's triggered when any of the basic SMS fields change (e.g.status
,text
,remote_phone
,local_phone
, etc.). We generally discourage from using this event type because many updates happen when a user is drafting an SMS. Look atcreated
orsent
for useful (and less noisy) alternatives.deleted
- an SMS is deleted.sent
- an outbound SMS is sent through our UI or API. Note that this event is triggered when the SMS is actually sent, not when the user clicks "send" (which moves the SMS intooutbox
status).
- Note (
activity.note
)created
- a note is created.updated
- a note is updated. It's triggered periodically while a user is typing a note.deleted
- a note is deleted.
- Meeting (
activity.meeting
)created
- a meeting is created.updated
- a meeting is updated.deleted
- a meeting is deleted.scheduled
- a meeting is scheduled. It's triggered when a meeting in the future is created, the start time of an upcoming meeting changes (a meeting is rescheduled), or a meeting moves tostatus: "upcoming"
.started
- a meeting has started. It's triggered when a meeting moves tostatus: "in-progress"
.completed
- a meeting is completed. It's triggered when a meeting moves tostatus: "completed"
.canceled
- a meeting is canceled. It's triggered when a meeting moves tostatus: "canceled"
.
- Lead status change (
activity.lead_status_change
)created
- a lead status change activity is created. Note that changing the status of a lead also results in alead.updated
event (with the old status value being available inprevious_attributes
).updated
- a lead status change activity is updated. It's triggered when the same user/API client updates the status of the same lead more than once within a short time. To "unclutter" the activity stream, we don't create a new status change for the consecutive updates, but instead update an existing status change with the most recent status innew_status
.deleted
- a lead status change is deleted. This happens when the status change was done by mistake and reverted within a short time.
- Opportunity status change (
activity.opportunity_status_change
)created
- an opportunity status change activity is created. Note that changing the status of an opportunity also results in anopportunity.updated
event (with the old status value being available inprevious_attributes
).updated
- an opportunity status change activity is updated. It's triggered when the same user/API client updates the status of the same opportunity more than once within a short time. To "unclutter" the activity stream, we don't create a new status change for the consecutive updates, but instead update an existing status change with the most recent status innew_status
.deleted
- an opportunity status change is deleted. This happens when the status change was done by mistake and reverted within a short time.
- Task completed (
activity.task_completed
)created
- a task completed activity is created, which occurs upon the completion of a "lead" task. Note that completing a lead's task will also result incompleted
andupdated
events on the task (lead.task
), and in aupdated
event on the lead.deleted
- a task completed activity is deleted. This happens when a corresponding completed task is marked as incomplete again. Note that un-completing a task will also result in aupdated
event on the task (task.lead
), and anupdated
event on the lead.
- Import (
import
)created
- a CSV import is created. Note that you'll also get acreated
event for each lead that's created via this import.updated
- a CSV import is updated. It's triggered when any of the import's fields change, e.g.status
,s3_url
,total_imported
,total_failed
. This gets triggered frequently while the CSV import is processed and allows you to monitor the progress of an import. Look atcreated
orcompleted
for a useful (and less noisy) alternatives.completed
- an import is completed.reverting
- an import has begun the reversion process. Note that you'll also get events for changes made as a part of the revert process.reverted
- an import has been successfully reverted
- Export (
export.lead
,export.opportunity
)created
- an export is created (i.e. when a new export was requested via the UI or the API).updated
- an export of your data is updated. It's triggered when any of the export's fields change, (e.g.status
,n_docs_processed
,n_docs
,download_url
,fields
). This gets triggered frequently while the export is processed and allows you to monitor its progress. Look atexport.created
orexport.completed
as useful (and less noisy) alternatives.completed
- an export is completed.
- Bulk actions (
bulk_action.delete
,bulk_action.edit
,bulk_action.email
,bulk_action.sequence_subscription
)created
- a bulk action is created.updated
- a bulk action is updated. It's triggered when any of the bulk action's basic fields change, e.g.status
,n_docs_processed
,n_docs
. This gets triggered frequently while the bulk action is processed and allows you to monitor its progress. Also see thecreated
orcompleted
actions for more useful (and less noisy) alternatives.completed
- a bulk action is completed.paused
- a bulk action is paused and requires the user's attention to resume (e.g. if you updated your email provider's credentials during a bulk email).
- Lead Custom fields (
custom_fields.lead
)created
- a lead custom field is created for the first time.updated
- a lead custom field is updated. It's triggered when any of the basic attributes of a custom field change, i.e.name
,type
, orchoices
.deleted
- a lead custom field is deleted.
- Contact Custom fields (
custom_fields.contact
)created
- a contact custom field is created for the first time.updated
- a contact custom field is updated. It's triggered when any of the basic attributes of a custom field change, i.e.name
,type
, orchoices
.deleted
- a contact custom field is deleted.
- Activity Custom fields (
custom_fields.activity
)created
- an Activity Custom Field is created for the first time.updated
- an Activity Custom Field is updated. It's triggered when any of the basic attributes of a custom field change, i.e.name
,type
, orchoices
.deleted
- an Activity Custom Field is deleted, it can be triggered by:- The Activity Custom Field is deleted.
- The Custom Activity Type this field belongs to is deleted.
- Custom Activity Type (
custom_activity_type
)created
- a Custom Activity Type is created for the first time.updated
- a Custom Activity Type is updated, it can be triggered by:- Any of the Custom Activity Type's basic fields change such as
name
,description
,api_create_only
etc. - The Acitivity Custom Field order is changed.
- A new Activity Custom Field is added to the Custom Activity Type.
- An deleted Activity Custom Field is removed from the Custom Activity Type.
- Any of the Custom Activity Type's basic fields change such as
deleted
- A custom Activity Type is deleted.
- Custom Activity (
activity.custom_activity
)created
- A Custom Activity instance is created for the first time.updated
- A Custom Activity instance is updated. Note, changes to Custom Activity Type do not modify existing activities of that type or triggerupdated
events.deleted
- A Custom Activity instance is deleted.
- Lead and opportunity status (
status.lead
,status.opportunity
)created
- a new lead or opportunity status is created.updated
- a lead or opportunity status is updated. It's triggered when thelabel
of a status changes.deleted
- a lead or opportunity status is deleted.
- Membership (
membership
)activated
- a membership is activated in your organization (e.g. when an invited user accepts the invitation or when you re-add a previously removed user). It contains the details of a membership along with embedded user data.deactivated
- a membership is deactivated in your organization (e.g. when you remove a user). It contains the details of a membership along with embedded user data.
- Group (
group
)created
- a new group is created.updated
- a group is created or its members are added or removed.deleted
- a group is deleted.
- Saved search (
saved_search
)created
- a smart view is created.updated
- a smart view is updated. It's triggered when any of the basic fields change on a smart view, e.g.is_shared
,shared_with
,query
,name
. It is not triggered when the lead results of the smart view change.
- Phone Number (
phone_number
)created
- a new phone number is created.updated
- a phone number is updated. It's triggered when any of the basic fields change on a phone number, e.g.forward_to_enabled
,participants
,voicemail_greeting_url
.deleted
- a phone number is deleted.
- Email template (
email_template
)created
- an email template is created.updated
- an email template is updated. It's triggered when any of the basic fields change, e.g.is_shared
,name
,subject
,body
,attachments
.deleted
- an email template is deleted.
- Email Sequence (
sequence
)created
- an email sequence is created.updated
- an email sequence is updated. It's triggered when any of the fields change, including the fields of the embeddedsteps
.deleted
- an email sequence is deleted.
- Email Sequence Subscription (
sequence_subscription
)created
- an email sequence subscription is created.updated
- an email sequence subscription is updated. It's triggered when any of its fields change, e.g.status
might change fromactive
topaused
.deleted
- an email sequence is deleted. It's triggered when the lead, contact, or email address associated with the subscription is deleted.
Retrieve a single event by ID
Retrieve a single event by ID.
The response contains a dictionary with a single event, using the format outlined in “Event format”.
curl -XGET "https://api.close.com/api/v1/event/{id}/"
Response Headers
content-type: application/json
Response Body
{
"action": "created",
"changed_fields": [],
"data": {
"_type": "Note",
"contact_id": null,
"created_by": "user_KIZUpNp8AsMwrh79jq7KIkGMyjtabG32ivOaG30F3sF",
"created_by_name": "Gob Bluth",
"date_created": "2016-10-19T12:22:10.433000+00:00",
"date_updated": "2016-10-19T12:22:10.433000+00:00",
"id": "acti_4LNDQk2uhg7t8fGUWPyHX7cpCVH9PJtCyCssXFcao3e",
"lead_id": "lead_sHR5sxie4dKOBkODA2flGciHen2c91YEpvTPt8x1NU0",
"note": "My note.",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"updated_by": "user_KIZUpNp8AsMwrh79jq7KIkGMyjtabG32ivOaG30F3sF",
"updated_by_name": "Gob Bluth",
"user_id": "user_KIZUpNp8AsMwrh79jq7KIkGMyjtabG32ivOaG30F3sF",
"user_name": "Gob Bluth",
"users": []
},
"date_created": "2016-10-19T12:22:10.434000",
"date_updated": "2016-10-19T12:22:10.434000",
"id": "ev_17VaZdcdnsMNyWY9ZJnjph",
"lead_id": "lead_sHR5sxie4dKOBkODA2flGciHen2c91YEpvTPt8x1NU0",
"meta": {
"request_method": "POST",
"request_path": "/api/v1/activity/note/"
},
"object_id": "acti_4LNDQk2uhg7t8fGUWPyHX7cpCVH9PJtCyCssXFcao3e",
"object_type": "note",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"previous_data": {},
"request_id": "req_2skaL7v81TflDfovw8A1CC",
"user_id": "user_KIZUpNp8AsMwrh79jq7KIkGMyjtabG32ivOaG30F3sF",
}
Retrieve a list of events
Retrieve a list of events.
Can be filtered by the following parameters:
date_updated
: The date/time of when the event was last updated, in ISO format. Can be filtered by range (date_updated__gte=X&date_updated__lte=Y
). Note: For pagination, it is recommended to use cursors instead of this filter (see below).object_type
: If specified, only events for objects of a given type are returned. Example:object_type=lead
object_id
: If specified, only events for the given object are returned. No related object events are returned. Example:object_id=lead_123
action
: Only events of specified actions are returned. Example:action=deleted
lead_id
: If specified, events for the given lead, including any of its related objects (contacts, activities, opportunities, tasks) are returned.user_id
: Only return events of the given user.request_id
: Only events emitted while processing this specific API request.
Only certain combinations of filters are supported. date_updated
can be optionally used with any allowed filter combination. Supported combinations are:
object_type
andobject_id
object_type
andaction
object_id
andaction
lead_id
andobject_type
lead_id
,object_type
andaction
lead_id
,user_id
andobject_type
lead_id
,user_id
,object_type
andaction
lead_id
anduser_id
user_id
andobject_id
user_id
,object_id
andaction
user_id
andobject_type
user_id
,object_type
andaction
- Just
lead_id
- Just
user_id
- Just
request_id
The response is a dictionary with the following fields:
data
: A list of events (dictionaries), using the format outlined in “Event format”.cursor_next
: Cursor string to retrieve the next page of events, i.e. events before the given ID (earlier date), ornull
if no more objects are available.cursor_previous
: Cursor string to retrieve the previous page of events, i.e. events after the given ID (later date), ornull
if no more objects are available.
Events are always ordered by date (latest first), i.e. the date_updated
field. Note that even though date_created
and date_updated
may only have millisecond-precision, two or more events for the same object are guaranteed to be returned in the proper order.
The endpoint supports the following parameters for pagination, and does not support _limit
and _skip
:
_cursor
: Pagination using a cursor string (cursor_next
orcursor_previous
from a previous response). Note that you still need to supply any other filters (except fordate_updated
) that were used in the previous query._limit
: Maximum number of events to return (capped at and defaulting to 50).
Cursors are a reliable way to go to the next or previous page of events (unlike filtering by date_updated
, where you may need to account for and filter out multiple events happening in the same millisecond). However, cursors are not designed to stream new events: Events may be visible through the API in a different order than they were triggered (but the ordering returned by the API is correct). Also, event consolidation of multiple recent events to the same object may occur. To avoid missing recent events when paginating, we recommend to scan the latest five minutes of events.
In the example response, to retrieve the next older batch of events, specify _cursor=cursor2
.
curl -XGET "https://api.close.com/api/v1/event/{?date_updated__{lt|gt|lte|gte}, object_type, object_id, lead_id, action, user_id}"
Response Headers
content-type: application/json
Response Body
{
"data": [
// list of events
],
"cursor_previous": "cursor1",
"cursor_next": "cursor2",
}
Webhook Subscriptions
Please review the Webhooks documentation for more details.
The following API can be used to manage your Webhook subscriptions.
List Webhook subscriptions
List Webhook subscriptions.
The response contains the subscriptions for your organization.
curl -XGET "https://api.close.com/api/v1/webhook/"
Response Headers
content-type: application/json
Response Body
{
"has_more": false,
"data": [{
"status": "active",
"updated_by": "user_lAm7YqrzZj10t1GLK5eTOaRgPkaChswxydbhUhGRbbM",
"date_updated": "2018-12-06T19:22:51.830989",
"created_by": "user_lAm7YqrzZj10t1GLK5eTOaRgPkaChswxydbhUhGRbbM",
"verify_ssl": true,
"events": [{
"action": "updated",
"object_type": "activity.note"
}, {
"action": "created",
"object_type": "lead"
}, {
"action": "updated",
"object_type": "lead"
}, {
"action": "created",
"object_type": "activity.call"
}, {
"action": "created",
"object_type": "activity.note"
}],
"url": "https://test.example.com",
"date_created": "2018-12-06T19:15:09.590432",
"id": "whsub_6un6NQjYTaFdgtIZsTDXP6"
}]
}
Retrieve a single Webhook subscription
Retrieve a single Webhook subscription.
The response contains the subscription details.
curl -XGET "https://api.close.com/api/v1/webhook/{id}/"
Response Headers
content-type: application/json
Response Body
{
"status": "active",
"updated_by": "user_lAm7YqrzZj10t1GLK5eTOaRgPkaChswxydbhUhGRbbM",
"url": "https://test.example.com",
"created_by": "user_lAm7YqrzZj10t1GLK5eTOaRgPkaChswxydbhUhGRbbM",
"id": "whsub_6un6NQjYTaFdgtIZsTDXP6",
"date_updated": "2018-12-06T19:15:09.590439",
"date_created": "2018-12-06T19:15:09.590432",
"verify_ssl": true,
"events": [{
"action": "created",
"object_type": "lead"
}, {
"action": "updated",
"object_type": "lead"
}, {
"action": "created",
"object_type": "activity.call"
}, {
"action": "created",
"object_type": "activity.note"
}, {
"action": "updated",
"object_type": "activity.note"
}]
}
Create new Webhook subscription
Create new Webhook subscription.
The subscription event object_type
and action
values are the same as in the event log.
curl -XPOST "https://api.close.com/api/v1/webhook/"
Request Headers
content-type: application/json
Request Body
{
"url": "https://test.example.com",
"events": [{
"object_type": "lead",
"action": "created"
},
{
"object_type": "lead",
"action": "updated"
},
{
"object_type": "activity.call",
"action": "created"
},
{
"object_type": "activity.note",
"action": "created"
},
{
"object_type": "activity.note",
"action": "updated"
}
]
}
Response Headers
content-type: application/json
location: https://api.close.com/api/v1/webhook/{id}/
Response Body
{
"status": "active",
"updated_by": "user_lAm7YqrzZj10t1GLK5eTOaRgPkaChswxydbhUhGRbbM",
"url": "https://test.example.com",
"created_by": "user_lAm7YqrzZj10t1GLK5eTOaRgPkaChswxydbhUhGRbbM",
"id": "whsub_6un6NQjYTaFdgtIZsTDXP6",
"date_updated": "2018-12-06T19:15:09.590439",
"date_created": "2018-12-06T19:15:09.590432",
"verify_ssl": true,
"signature_key": "058bfb6a3d8cfdc4da7c3be5901b16ae11da982b46a25fb2cd7016e97a140a1c",
"events": [{
"action": "created",
"object_type": "lead"
}, {
"action": "updated",
"object_type": "lead"
}, {
"action": "created",
"object_type": "activity.call"
}, {
"action": "created",
"object_type": "activity.note"
}, {
"action": "updated",
"object_type": "activity.note"
}]
}
Create new Webhook subscription with event filters
Create new Webhook subscription with event filters.
More advanced event filtering can be achieved by specifying event filters when
creating/modifying a webhook subscription. For a webhook to be fired the event
must match these extra filters as well as the specified object_type
and action
values.
Event filters use JSON to specify filtering conditions on event fields. The following filter operators can be combined to apply sophisticated filtering logic.
- Equals:
{"type": "equals", "value": "<value>"}
This filter matches only if the entire value is the same as provided. - Contains:
{"type": "contains", "value": "<value>"}
This searches for a particular value in an array. It can also be used to match a partial string for string fields. - And:
{"type": "and", "filters": [<filter1>, <filter2>, ...]}
This matches when all provided individual filters match. - Or:
{"type": "or", "filters": [<filter1>, <filter2>, ...]}
This matches when one or more provided individual filters match.
The matching operators above can be applied to individual parts of the event using these two methods of accessing field values:
- Field Accessor:
{"type": "field_accessor", "field": "<field name>", "filter": <some other filter>}
This filter allows you to access a specific field in a JSON document and match this field's value against the specified filter. - Any value in an array:
{"type": "any_array_value", "filter": <some other filter>}
This searches for any matching values inside a JSON list/array.
Examples:
user_id
string field of an event equals user_lAm7YqrzZj10t1GLK5eTOaRgPkaChswxydbhUhGRbbM
{
"type": "field_accessor",
"field": "user_id",
"filter": {
"type": "equals",
"value": "user_lAm7YqrzZj10t1GLK5eTOaRgPkaChswxydbhUhGRbbM"
}
}
Drill into event to match user_id
of the data
object to match events created by user user_lAm7YqrzZj10t1GLK5eTOaRgPkaChswxydbhUhGRbbM
{
"type": "field_accessor",
"field": "data",
"filter": {
"type": "field_accessor",
"field": "user_id",
"filter": {
"type": "equals",
"value": "user_lAm7YqrzZj10t1GLK5eTOaRgPkaChswxydbhUhGRbbM"
}
}
}
Match events for leads with string travel
in the name (e.g. 'Bluth travel company', case sensitive)
{
"type": "field_accessor",
"field": "data",
"filter": {
"type": "field_accessor",
"field": "name",
"filter": {
"type": "contains",
"value": "travel"
}
}
}
Match events for leads that had their name
changed. This uses a contains
filter because changed_fields
is an array of field names.
{
"type": "field_accessor",
"field": "changed_fields",
"filter": {
"type": "contains",
"value": "name"
}
}
Match events for leads that had their name
or description
changed
{
"type": "field_accessor",
"field": "changed_fields",
"filter": {
"type": "or",
"filters": [
{
"type": "contains",
"value": "name"
},
{
"type": "contains",
"value": "description"
}
]
}
}
Match events that have two custom fields set to specific values
{
"type": "and",
"filters": [
{
"type": "field_accessor",
"field": "data",
"filter": {
"type": "field_accessor",
"field": "custom.lcf_rR9HjgjI4SYy1X1IlMOozK2VkxMgU5NnHquTR8DVxoQ",
"filter": {
"type": "equals",
"value": "product_1234"
}
}
},
{
"type": "field_accessor",
"field": "data",
"filter": {
"type": "field_accessor",
"field": "custom.lcf_vwqYhEFwzPyfCErS8uQ77is1wFLvr9BgVi6cTfbFM48",
"filter": {
"type": "equals",
"value": "sub_product_5678"
}
}
}
]
}
Use any_array_value
to match events that have any address in Maryland, USA
{
"type": "field_accessor",
"field": "data",
"filter": {
"type": "field_accessor",
"field": "addresses",
"fiter": {
"type": "any_array_value",
"filter": {
"type": "and",
"filters": [
{
"type": "field_accessor",
"field": "state",
"filter": {
"type": "equals",
"value": "MD"
}
},
{
"type": "field_accessor",
"field": "country",
"filter": {
"type": "equals",
"value": "US"
}
}
]
}
}
}
}
curl -XPOST "https://api.close.com/api/v1/webhook/"
Request Headers
content-type: application/json
Request Body
{
"url": "https://test.example.com",
"events": [{
"object_type": "lead",
"action": "created",
"extra_filter": {"type": "field_accessor", "field": "user_id", "filter": {"type": "equals", "value": "user_lAm7YqrzZj10t1GLK5eTOaRgPkaChswxydbhUhGRbbM"}
}
}
]
}
Response Headers
content-type: application/json
Response Body
{
"status": "active",
"updated_by": "user_lAm7YqrzZj10t1GLK5eTOaRgPkaChswxydbhUhGRbbM",
"url": "https://test.example.com",
"created_by": "user_lAm7YqrzZj10t1GLK5eTOaRgPkaChswxydbhUhGRbbM",
"id": "whsub_6un6NQjYTaFdgtIZsTDXP6",
"date_updated": "2018-12-06T19:15:09.590439",
"date_created": "2018-12-06T19:15:09.590432",
"verify_ssl": true,
"signature_key": "058bfb6a3d8cfdc4da7c3be5901b16ae11da982b46a25fb2cd7016e97a140a1c",
"events": [{
"action": "created",
"object_type": "lead",
"extra_filter": {"type": "field_accessor", "field": "user_id", "filter": {"type": "equals", "value": "user_lAm7YqrzZj10t1GLK5eTOaRgPkaChswxydbhUhGRbbM"}
}]
}
Update existing Webhook subscription
Update existing Webhook subscription.
status
active
- subscription is activepaused
- subscription is paused
curl -XPUT "https://api.close.com/api/v1/webhook/{id}/"
Request Headers
content-type: application/json
Request Body
{
"status": "paused"
}
Response Headers
content-type: application/json
Response Body
{
"status": "paused",
"updated_by": "user_lAm7YqrzZj10t1GLK5eTOaRgPkaChswxydbhUhGRbbM",
"date_updated": "2018-12-06T19:21:12.226090",
"created_by": "user_lAm7YqrzZj10t1GLK5eTOaRgPkaChswxydbhUhGRbbM",
"id": "whsub_6un6NQjYTaFdgtIZsTDXP6",
"url": "https://test.example.com",
"date_created": "2018-12-06T19:15:09.590432",
"verify_ssl": true,
"events": [{
"action": "created",
"object_type": "lead"
}, {
"action": "updated",
"object_type": "lead"
}, {
"action": "created",
"object_type": "activity.call"
}, {
"action": "created",
"object_type": "activity.note"
}, {
"action": "updated",
"object_type": "activity.note"
}]
}
Delete Webhook subscription
Custom Activities
Custom Activities let you create arbitrary activity types with user defined fields. To work with Custom Activities, you will need to create a Custom Activity Type and likely add one or more Activity Custom Fields to that type. Once the Custom Activity Type is defined, you can create Custom Activity instances of that type as you would any other activity.
Custom Activity Type and Custom Activity instance APIs are defined below, for Activity Custom Fields, see Create a new Activity Custom Field.
List Custom Activity Types
List Custom Activity Types.
The response will include all Custom Activity Types, including Custom Field metadata for your organization.
curl -XGET "https://api.close.com/api/v1/custom_activity/"
Response Headers
content-type: application/json
Response Body
{
"data": [
{
"api_create_only": true,
"created_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"date_created": "2020-07-09T15:36:16.795350",
"date_updated": "2020-07-09T15:36:16.795350",
"description": "An API event only, with no fields.",
"editable_with_roles": [],
"fields": [],
"id": "actitype_33dpZWDiI0KoJsmQFCKbgi",
"name": "API Event",
"organization_id": "orga_BmczgkI1yJt896ACb956T0iaySHH0FhRyo6wfKUuU4c",
"updated_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6"
},
{
"api_create_only": false,
"created_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"date_created": "2020-07-27T21:28:39.765523",
"date_updated": "2020-07-27T21:28:39.765523",
"description": "Heppens when the lead signs up for the newsletter",
"editable_with_roles": [],
"fields": [
{
"accepts_multiple_values": false,
"converting_to_type": null,
"description": "Email of the person who signed up for the newsletter",
"editable_with_roles": [],
"id": "acf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S",
"name": "Email Address",
"required": true,
"type": "text"
},
{
"accepts_multiple_values": true,
"converting_to_type": null,
"description": null,
"editable_with_roles": [],
"id": "acf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g",
"name": "Wants Marketing Materials",
"required": false,
"type": "choices"
}
],
"id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y",
"name": "Newsletter Signup",
"organization_id": "orga_BmczgkI1yJt896ACb956T0iaySHH0FhRyo6wfKUuU4c",
"updated_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6"
}
]
}
Retrieve a single Custom Activity Type
Retrieve a single Custom Activity Type.
The response contains the Custom Activity Type including most Custom Field metadata.
curl -XGET "https://api.close.com/api/v1/custom_activity/{id}/"
Response Headers
content-type: application/json
Response Body
{
"api_create_only": false,
"created_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"date_created": "2020-07-27T21:28:39.765523",
"date_updated": "2020-07-27T21:28:39.765523",
"description": "Heppens when the lead signs up for the newsletter",
"editable_with_roles": [],
"fields": [
{
"accepts_multiple_values": false,
"converting_to_type": null,
"description": "Email of the person who signed up for the newsletter",
"editable_with_roles": [],
"id": "acf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S",
"name": "Email Address",
"required": true,
"type": "text"
},
{
"accepts_multiple_values": true,
"converting_to_type": null,
"description": null,
"editable_with_roles": [],
"id": "acf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g",
"name": "Wants Marketing Materials",
"required": false,
"type": "choices"
}
],
"id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y",
"name": "Newsletter Signup",
"organization_id": "orga_BmczgkI1yJt896ACb956T0iaySHH0FhRyo6wfKUuU4c",
"updated_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6"
}
Create new Custom Activity Type
Create new Custom Activity Type.
The type must be created before activity custom fields can be added.
curl -XPOST "https://api.close.com/api/v1/custom_activity/"
Request Headers
content-type: application/json
Request Body
{
"name": "Demo Requested",
"description": "Lead requested a product demo.",
"api_create_only": false,
"editable_with_roles": [
"admin"
]
}
Response Headers
content-type: application/json
location: https://api.close.com/api/v1/custom_activity/{id}/
Response Body
{
"api_create_only": false,
"created_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"date_created": "2020-08-07T15:18:33.797245",
"date_updated": "2020-08-07T15:18:33.797245",
"description": "Lead requested a product demo.",
"editable_with_roles": [
"admin"
],
"fields": [],
"id": "actitype_4cvujO1jQQkVYGPCiMsqMW",
"name": "Demo Requested",
"organization_id": "orga_BmczgkI1yJt896ACb956T0iaySHH0FhRyo6wfKUuU4c",
"updated_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6"
}
Update existing Custom Activity Type
Update existing Custom Activity Type.
The type's name
, description
, api_create_only
and editable_with_roles
may be updated here.
These properties will be updated immediately in the Custom Activity API.
Field order can be set here, but adding, modifying or removing fields from a Custom Activity Type must be done using the Custom Field API. The field order is a display property only, and does not affect the request and response for the Custom Activity API.
curl -XPUT "https://api.close.com/api/v1/custom_activity/{id}/"
Request Headers
content-type: application/json
Request Body
{
"fields": [
{
"id": "acf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g"
},
{
"id": "acf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S"
}
],
"name": "Newsletter Signup"
}
Response Headers
content-type: application/json
Response Body
{
"api_create_only": false,
"created_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"date_created": "2020-07-27T21:28:39.765523",
"date_updated": "2020-08-07T16:23:36.429990",
"description": null,
"editable_with_roles": [],
"fields": [
{
"accepts_multiple_values": true,
"converting_to_type": null,
"description": null,
"editable_with_roles": [],
"id": "acf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g",
"name": "Wants Marketing Materials",
"required": false,
"type": "choices"
},
{
"accepts_multiple_values": false,
"converting_to_type": null,
"description": "Email of the person who signed up for the newsletter",
"editable_with_roles": [],
"id": "acf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S",
"name": "Email Address",
"required": true,
"type": "text"
}
],
"id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y",
"name": "Newsletter Signup",
"organization_id": "orga_BmczgkI1yJt896ACb956T0iaySHH0FhRyo6wfKUuU4c",
"updated_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6"
}
Delete a Custom Activity Type
Delete a Custom Activity Type.
curl -XDELETE "https://api.close.com/api/v1/custom_activity/{id}/"
Response Headers
content-type: application/json
Response Body
{}
List or filter all Custom Activity instances
List or filter all Custom Activity instances.
Custom Fields appear in the format: custom.{custom_field_id}
. See Custom Fields.
curl -XGET "https://api.close.com/api/v1/activity/custom/{?lead_id, user_id, date_created__gt, date_created__lt, custom_activity_type_id, custom_activity_type_id__in}"
Response Headers
content-type: application/json
Response Body
{
"data": [
{
"organization_id": "orga_BmczgkI1yJt896ACb956T0iaySHH0FhRyo6wfKUuU4c",
"contact_id": null,
"date_updated": "2020-08-04T17:37:56.439000+00:00",
"user_name": "Bruce Wayne",
"created_by_name": "Bruce Wayne",
"id": "acti_5J7mimiIKB1tQ3gVduP0c4UhXbNj5ptMLteAWRJu7Sf",
"created_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"status": "draft",
"user_id": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"users": [],
"lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T",
"_type": "CustomActivity",
"updated_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y",
"date_created": "2020-08-04T16:45:35.367000+00:00",
"updated_by_name": "Bruce Wayne",
"custom.acf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": "Yes"
},
{
"organization_id": "orga_BmczgkI1yJt896ACb956T0iaySHH0FhRyo6wfKUuU4c",
"contact_id": null,
"date_updated": "2020-08-04T16:46:02.705000+00:00",
"user_name": "Bruce Wayne",
"created_by_name": "Bruce Wayne",
"id": "acti_v0VS1AZAg8LjnpBm1hZz83UZ3yWK0n9SdVV5i8yC6he",
"created_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"status": "published",
"user_id": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"users": [],
"lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T",
"_type": "CustomActivity",
"updated_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"custom_activity_type_id": "actitype_33dpZWDiI0KoJsmQFCKbgi",
"date_created": "2020-08-04T16:45:29.612000+00:00",
"updated_by_name": "Bruce Wayne"
}
],
"has_more": false
}
Retrieve a single Custom Activity instance
Retrieve a single Custom Activity instance.
curl -XGET "https://api.close.com/api/v1/activity/custom/{id}/"
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_BmczgkI1yJt896ACb956T0iaySHH0FhRyo6wfKUuU4c",
"contact_id": null,
"date_updated": "2020-08-04T17:37:56.439000+00:00",
"user_name": "Bruce Wayne",
"created_by_name": "Bruce Wayne",
"id": "acti_5J7mimiIKB1tQ3gVduP0c4UhXbNj5ptMLteAWRJu7Sf",
"created_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"status": "draft",
"user_id": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"users": [],
"lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T",
"_type": "CustomActivity",
"updated_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y",
"date_created": "2020-08-04T16:45:35.367000+00:00",
"updated_by_name": "Bruce Wayne",
"custom.acf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": "Yes"
}
Create a new Custom Activity instance
Create a new Custom Activity instance.
curl -XPOST "https://api.close.com/api/v1/activity/custom/"
Request Headers
content-type: application/json
Request Body
{
"custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y",
"lead_id": "lead_p9bdo1sTVDvc81drMF1IxJBSHiLFZqaABYRu7ZHuxhP",
"custom.acf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": "Yes",
"custom.acf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S": "thedarknight@close.com"
}
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_BmczgkI1yJt896ACb956T0iaySHH0FhRyo6wfKUuU4c",
"contact_id": null,
"date_updated": "2020-08-04T17:37:56.439000+00:00",
"user_name": "Bruce Wayne",
"created_by_name": "Bruce Wayne",
"id": "acti_5J7mimiIKB1tQ3gVduP0c4UhXbNj5ptMLteAWRJu7Sf",
"created_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"status": "published",
"user_id": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"users": [],
"lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T",
"_type": "CustomActivity",
"updated_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y",
"date_created": "2020-08-04T16:45:35.367000+00:00",
"updated_by_name": "Bruce Wayne",
"custom.acf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": "Yes",
"custom.acf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S": "thedarknight@close.com"
}
Create a draft Custom Activity instance
Create a draft Custom Activity instance.
Custom Activity instances will be created by default with the 'published' status. All required fields will be validated in this status. To create an activity without setting all required fields, you can use the "draft" status.
curl -XPOST "https://api.close.com/api/v1/activity/custom/"
Request Headers
content-type: application/json
Request Body
{
"custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y",
"lead_id": "lead_p9bdo1sTVDvc81drMF1IxJBSHiLFZqaABYRu7ZHuxhP",
"status": "draft",
"custom.acf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": "Yes",
}
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_BmczgkI1yJt896ACb956T0iaySHH0FhRyo6wfKUuU4c",
"contact_id": null,
"date_updated": "2020-08-04T17:37:56.439000+00:00",
"user_name": "Bruce Wayne",
"created_by_name": "Bruce Wayne",
"id": "acti_5J7mimiIKB1tQ3gVduP0c4UhXbNj5ptMLteAWRJu7Sf",
"created_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"status": "draft",
"user_id": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"users": [],
"lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T",
"_type": "CustomActivity",
"updated_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y",
"date_created": "2020-08-04T16:45:35.367000+00:00",
"updated_by_name": "Bruce Wayne",
"custom.acf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": "Yes",
}
Updating a Custom Activity instance
Updating a Custom Activity instance.
A Custom Activity can be updated to add, change or remove any Custom Fields and to change the status between "draft" and "published".
curl -XPUT "https://api.close.com/api/v1/activity/custom/"
Request Headers
content-type: application/json
Request Body
{
"custom.acf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": null,
"custom.acf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S": "thedarknight@close.com",
"status": "published"
}
Response Headers
content-type: application/json
Response Body
{
"organization_id": "orga_BmczgkI1yJt896ACb956T0iaySHH0FhRyo6wfKUuU4c",
"contact_id": null,
"date_updated": "2020-08-04T17:37:56.439000+00:00",
"user_name": "Bruce Wayne",
"created_by_name": "Bruce Wayne",
"id": "acti_5J7mimiIKB1tQ3gVduP0c4UhXbNj5ptMLteAWRJu7Sf",
"created_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"status": "published",
"user_id": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"users": [],
"lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T",
"_type": "CustomActivity",
"updated_by": "user_U4isiILfWWMxwMwIo4KwVV2huE1RABZRGLxUfFQHTl6",
"custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y",
"date_created": "2020-08-04T16:45:35.367000+00:00",
"updated_by_name": "Bruce Wayne",
"custom.acf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S": "thedarknight@close.com"
}
Delete a Custom Activity instance
Changelog
Mar 31st, 2021 - Change to the Email Sequence API
When listing Email Sequence Subscriptions, it is now required to filter by sequence_id
, lead_id
or contact_id
.
Jan 5th, 2021 - Changes to the Email Sequence API
- Failed attempt at creation/update/deletion of an Email Sequence because of an issue with permissions will now return a 403 error instead of a 401 error.
- Errors pertaining to Sequence Steps will no longer give you a deep nested
error structure (e.g.
{"field-errors": {"steps": {"errors": {...}}}}
), but rather a simple high-level error (e.g.{"error": "The delay of a Sequence Step must not be larger than 365 days."}
).
Oct 29th, 2020 - Microsoft Connected Accounts
It is now possible to connect Microsoft Accounts via OAuth for connecting Office 365 email. The new Connected Account type is documented in the Connected Accounts API.
Oct 9th, 2020 - Send As API
It is now possible to use the Send As feature through the API by using the Send As API. You can get which email accounts you can use to send emails through the Connected Accounts API.
Oct 3rd, 2020 - Active Calls on the Users Availability API
You can now use the Users Availability API to determine which users in your organization are currently on active phone calls in Close.
Sep 18th, 2020 - New URL for the Custom Field API
The recommended URL for the Custom Field API has changed from
/custom_fields/*/
to /custom_field/*/
. The latter form is more consistent
with every other endpoint in our API. The old endpoint will continue to work,
however, we recommend everybody to migrate to the new endpoint.
Aug 13th, 2020 - Groups
Groups are collection of Users. If you often use the same set of Users for filtering and reporting, you can now name them and use a Group in various places in Close.
Aug 7th, 2020 - Custom Activities Beta
We are beginning a limited beta test of a new Custom Activities feature. This feature will
allow users to define arbitrary activity types specific to their workflow.
The custom_activities
, activity/custom
and custom_fields/activity
defined here are not yet
accessible to all API users, and may change before the feature is launched.
Jun 30th, 2020 - Connected Accounts and clarification on field usage in integrations
You can now use the Connected Accounts endpoint to get
information about any accounts you have connected in
Settings > Connected Accounts.
This is particularly useful in finding a sender_account_id
when
subscribing a contact to a sequence
Additionally, we have also added a clarification to the Fields section regarding the use of response fields in integrations. Non-custom fields that are returned by an endpoint that are not listed in our sample response should not be used in integrations, as they may change without warning.
May 19th, 2020 - HTTP/2 and Header Casing
We have started deploying new infrastructure that supports HTTP/2 connections. The HTTP/2 specification requires lowercase headers and HTTP/1.1 states header names are case insensitive. Therefore, we have updated our documentation to specify lowercase header names but will continue to support case insensitive headers in requests for HTTP/1.1 connections. Responses will have header names normalized to lowercase.
Apr 30th, 2020 - Custom Field Description
Custom Fields now have an optional description property, which is a longer description of the field that may be shown to users for context. This applies to both Lead and Contact Custom Fields.
Apr 6th, 2020 - Custom Fields on Contacts
Contacts can now have Custom Fields attached to them. A new API endpoint allows you to create Contact Custom Fields. Values for Contact Custom Fields can be attached to a Contact through the Contact API.
Dec 10th, 2019 - Introducing Pipelines
Pipelines are named and ordered groups of Opportunity Statuses. You can:
- Create, update, and delete Pipelines via the Pipeline API.
- Create Opportunity Statuses in a specific Pipeline via the Opportunity Status API.
- Reorder Opportunity Statuses within a Pipeline and move them between
Pipelines by sending a
PUT
to the Pipeline API.
With the introduction of Pipelines, we are deprecating the
opportunity_statuses
field in the Organizanization API and
Me API. Use the pipelines
field instead.
Nov 13th, 2019 - Deprecate old Activity Report endpoint
The new Activity Report endpoint was released May 8th, 2019 and should now be used to
retrieve all Activitiy Report data. The older version of this endpoint is
deprecated and will be removed in the future. The new version uses a POST
to /report/activity/
and the old version uses a GET
to /report/activity/{ORGANIZATION_ID}/
.
Oct 31st, 2019 - Deprecate setting a status on an Opportunity via the status
field
All new integrations should use the status_id
field when POST/PUTting to the
Opportunity API. Using a status label in the status
field, albeit conveninent
at first, could lead to broken integrations when users rename statuses in the
UI.
Oct 12th, 2019 - Add new endpoint for Meeting activities (Currently in beta)
A new /activity/meeting/
endpoint has been added that allows you to interact with
Close Meeting activities synced from Google Calendar. This feature is currently in beta,
so the API is subject to change.
Aug 20th, 2019 - POST HTTP Status Code
For newer APIs, we return a 201
HTTP Status Code for
POST requests when creating an entity. We also include a
Location
header with the URL for the new entity. Existing APIs
will continue to return a 200
for POST requests.
Jul 2nd, 2019 - Add multiple value support to the bulk edit action
custom_field_values
and custom_field_operation
can now be used when creating
bulk edit actions to replace, add, or remove multiple values at once on custom
fields that accept multiple values.
June 18th, 2019 - Add event filtering to webhook subscriptions
Webhook subscriptions now support the extra_filter
field which allows
filtering of events based on field and value changes.
May 10th, 2019 - Add API key ID to events
The events available from the event log and webhooks now contain the API key ID if the changes were made using an API key.
May 8th, 2019 - Add new activity report endpoint
A new activity report endpoint has been added that allows fetching more metrics. The list of available metrics is also exposed in the reporting API.
Apr. 25th, 2019 - Support for Multi-Select Custom Fields
"Choices" and "User" type Custom Fields can accept multiple values now:
- Create a multi-value Custom Field by POSTing
{"accepts_multiple_values": true}
to the Lead Custom Field API. - Set multiple values for the Custom Field on a Lead by POSTing
{"custom.lcf_xyz": ["Value 1", "Value 2", "Value 3"]}
to the Lead API.
Apr. 9th, 2019 - All exports are now compressed with GZIP
All exports are now compressed with GZIP. Downloads will now set HTTP headers Content-Encoding: gzip
, and Content-Type: text/csv
or Content-Type: application/json
depending on export format.
Mar. 7th, 2019 - Drop the field plan_type
from the Membership
API
The plan_type
field for the Membership
API has been dropped for organizations that use the new billing system, given they cannot have different plans for their members.
The field is still available to organizations using the previous billing system, until they switch to the new one.
Feb. 22, 2019 - New Base URL
We've switched the base URL of our API from https://app.close.io/api/v1/ to https://api.close.com/api/v1/
The old base URL is now deprecated.
Feb. 18, 2019 - Additional country fields
We've added country information to a few of our endpoints:
- Contact API responses include country information for each phone number.
- Phone Number API includes a list of countries the number can send SMS to.
- SMS API includes country information for the local and remote phone number.
Jan. 25, 2019 - Event Log Fields
Events retrieved by non-admins will now include the data
and previous_data
fields for events not older than 1 hour. Older events will not include these fields as before.
Nov. 28, 2018 - Webhooks Subscription API
Added Webhooks subscription API.