Welcome to the Close.io REST API specification.
See our GitHub page for a Python API client implementation and CSV upload script example.
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.
Example cURL request with an api key.
curl "https://app.close.io/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://app.close.io/api/v1
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://closeio_url/api/v1/activity/
curl -u apikey: https://closeio_url/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.
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.
Updating specific fields only
In the Close.io 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
Send us an email at support@close.io with the URL of your webhook and we will POST the data to that endpoint for each created/updated lead. Here's an example payload:
{
"model": "lead",
"event": "create", # create|update|delete|merge
"data": { ... } # serialized object, same as the response of `/lead/{id}/`. In the case of a delete it will just be the 'id' of the object. A merge event will have the source_id and destination_id in the payload.
}
A webhook request is attempted up to 3 times with retries taking place every 5 minutes.
Rate Limits
We enforce API call rate limits to protect our infrastructure from excessive numbers of requests. Limits are enforced per API key and grouped together by endpoint and request type (e.g. GET, PUT, etc). Each API response will have the following three headers to provide rate limiting information about its specific endpoint.
X-Rate-Limit-Limit: Request limit enforced for this endpointX-Rate-Limit-Remaining: Requests left in the enforcement windowX-Rate-Limit-Reset: Seconds remaining before this enforcement window ends
In addition to these headers a 429 response will provide the following information:
{
"error": {
"message": "API call count exceeded for this 30 second window",
"rate_reset": 11, # Seconds remaining until the next enforcement window starts
"rate_limit": 2400, # Request limit enforced for this endpoint
"rate_window": 30 # Number of seconds in enforcement window
}
}
We ask if you receive a 429 response that you sleep the number of seconds specified by the rate_reset value before making additional requests to this endpoint.
Leads
Leads are the most important object in Close.io. 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.io 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.
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://app.close.io/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"
}
],
"created_by": null,
"id": "cont_o0kP3Nqyq0wxr5DLWIEm8mVr6ZpI0AhonKLDG0V5Qjh",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-01T00:54:51.331000+00:00",
"emails": [
{
"type": "office",
"email_lower": "thedarkknight@close.io",
"email": "thedarkknight@close.io"
}
],
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
}
],
"custom.lcf_ORxgoOQ5YH1p7lDQzFJ88b4z0j7PLLTRaG66m8bmcKv": "Website contact form",
"date_updated": "2013-02-06T20:53:01.977000+00:00",
"description": "",
"html_url": "https://app.close.io/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": "P F",
"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": "P F",
"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://app.close.io/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"
}
],
"created_by": null,
"id": "cont_o0kP3Nqyq0wxr5DLWIEm8mVr6ZpI0AhonKLDG0V5Qjh",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-01T00:54:51.331000+00:00",
"emails": [
{
"type": "office",
"email_lower": "thedarkknight@close.io",
"email": "thedarkknight@close.io"
}
],
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
}
],
"custom.lcf_ORxgoOQ5YH1p7lDQzFJ88b4z0j7PLLTRaG66m8bmcKv": "Website contact form",
"date_updated": "2013-02-06T20:53:01.977000+00:00",
"html_url": "https://app.close.io/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": "P F",
"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": "P F",
"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
statusorstatus_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
statuscontaining the label of an already-created status object.
custom.FIELD_ID (optional)
- You can set custom fields by setting
custom.FIELD_IDto 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 using the
customfield dict or thecustom.FIELD_NAMEsyntax (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://app.close.io/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_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_lower": "gob@example.com",
"email": "gob@example.com"
}
],
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
}
],
"date_updated": "2013-02-20T05:30:24.854000+00:00",
"html_url": "https://app.close.io/lead/lead_70jZ5hiVt5X31MZ3vJ0R0GJMqJEihkoF7TtSVFbN2ty/",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"custom.lcf_ORxgoOQ5YH1p7lDQzFJ88b4z0j7PLLTRaG66m8bmcKv": "Website contact form",
"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
statusandstatus_idinPOST /lead/above.
custom.FIELD_ID (optional)
- See description for
custom.FIELD_IDinPOST /lead/above. - Additionally, you can unset a single field by using
{ "custom.FIELD_ID": null }, e.g.:
{ "custom.lcf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c": null }
curl -XPUT "https://app.close.io/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_lower": "gob@example.com",
"email": "gob@example.com"
}
],
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
}
],
"date_updated": "2013-02-20T05:43:41.622000+00:00",
"html_url": "https://app.close.io/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://app.close.io/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://app.close.io/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.
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://app.close.io/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_lower": "tobiasfunke@close.io",
"email": "tobiasfunke@close.io"
}
],
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
},
{
"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"
}
],
"created_by": null,
"id": "cont_o0kP3Nqyq0wxr5DLWIEm8mVr6ZpI0AhonKLDG0V5Qjh",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"date_created": "2013-02-01T00:54:51.331000+00:00",
"emails": [
{
"type": "office",
"email_lower": "thedarkknight@close.io",
"email": "thedarkknight@close.io"
}
],
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
},
{
"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_lower": "bluth@close.io",
"email": "bluth@close.io"
}
],
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
},
{
"name": "Close.io Support",
"title": null,
"date_updated": "2013-02-01T00:59:33.689000+00:00",
"phones": [
{
"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_lower": "support@close.io",
"email": "support@close.io"
}
],
"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_lower": "phil@close.io",
"email": "phil@close.io"
}
],
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
},
{
"name": "Gob",
"title": "sr. vice president",
"date_updated": "2013-02-20T05:44:14.700000+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_lower": "gob@example.com",
"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": [
{
"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_lower": "gob@example.com",
"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": [
{
"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_lower": "gob@example.com",
"email": "gob@example.com"
}
],
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
}
]
}
Fetch a single contact
Fetch a single contact
curl -XGET "https://app.close.io/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": [
{
"phone": "+18004445555",
"phone_formatted": "+1 800-444-5555",
"type": "office"
}
],
"emails": [
{
"type": "office",
"email_lower": "gob@example.com",
"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://app.close.io/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"}
]
}
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":[
{"phone":"9045551234","type":"mobile"}
],
"emails":[
{"email":"john@example.com","type":"office"}
],
"urls":[
{"url":"http://twitter.com/google/","type":"url"}
]
}
Update an existing contact
Update an existing contact.
curl -XPUT "https://app.close.io/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":[
{"phone":"9045551234","type":"mobile"}
],
"emails":[
{"email":"john@example.com","type":"office"}
],
"urls":[
{"url":"http://twitter.com/google/","type":"url"}
]
}
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.
thread_emails parameter:
- (Default) when this parameter is not present,
Emailobjects will be returned for each email message. - A value of
truewill returnEmailThreadobjects representing email conversations. Stripped-down version ofEmailobjects will also be returned. - A value of
onlywill returnEmailThreadobjects representing email conversations.Emailobjects will not be returned.
curl -XGET "https://app.close.io/api/v1/activity/{?lead_id, user_id, 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.io/ - 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.io"
],
"subject": "Testing testing!!!!",
"opens": [],
"status": "sent",
"_type": "Email",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"updated_by_name": "Bruce Wayne",
"envelope": {
"from": [
{
"email": "phil@close.io",
"name": "Phil Freo"
}
],
"sender": [
{
"email": "phil@close.io",
"name": "Phil Freo"
}
],
"to": [
{
"email": "phil@close.io",
"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.io/?utm_source=signature&utm_medium=email&utm_campaign=signature'>Close.io</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.io/ - sales communication made simple",
"expand": true
}
],
"send_attempts": [],
"lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h",
"sender": "phil@close.io",
"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.io! 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.io"
],
"subject": "Welcome to Close.io!",
"opens": [],
"status": "inbox",
"_type": "Email",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"updated_by_name": "Bruce Wayne",
"envelope": {
"from": [
{
"email": "karan@close.io",
"name": ""
}
],
"sender": [
{
"email": "karan@close.io",
"name": ""
}
],
"to": [
{
"email": "phil+sample@close.io",
"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.io!"
},
"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.io",
"bcc": [],
"date_created": "2013-02-01T00:54:51.274000+00:00",
"template_id": null,
"cc": []
}
]
}
List or filter all Call activities
List or filter all Call activities.
curl -XGET "https://app.close.io/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",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"note": "",
"phone": "+16503334444",
"contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk",
"date_created": "2013-02-20T06:34:33.637000+00:00",
"duration": 0,
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"id": "acti_Ay0QqN91HKAHVQUesISYV8QlhDobGfWb1Ui3TE75pJR",
"lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp"
}
]
}
Fetch a single Call activity
Fetch a single Call activity
curl -XGET "https://app.close.io/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",
"note": "",
"duration": 0,
"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"
}
Log a Call activity manually
Log a Call activity manually (for calls made outside of the Close.io 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://app.close.io/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",
"duration": 153,
"note": "call notes go here",
"source": "External",
"remote_phone": "+16505551234",
"phone": "+16505551234",
"voicemail_url": null,
"recording_url": null
}
Delete a Call activity
Delete a Call activity.
curl -XDELETE "https://app.close.io/api/v1/activity/call/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}
List or filter all Created activities
List or filter all Created activities.
curl -XGET "https://app.close.io/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": []
}
]
}
Fetch a single Created activity
Fetch a single Created activity
curl -XGET "https://app.close.io/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": []
}
List or filter all Email activities
List or filter all Email activities.
You'll get one object per email message.
curl -XGET "https://app.close.io/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.io",
"to": [
"phil@close.io"
],
"cc": [],
"bcc": [],
"subject": "Testing testing!!!!",
"envelope": {
"from": [
{
"email": "phil@close.io",
"name": "Phil Freo"
}
],
"sender": [
{
"email": "phil@close.io",
"name": "Phil Freo"
}
],
"to": [
{
"email": "phil@close.io",
"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.io/ - 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.io/?utm_source=signature&utm_medium=email&utm_campaign=signature'>Close.io</a> – sales communication made simple",
"body_text_quoted": [
{
"text": "Cool!\n\nThis is rad. <3\n\n\n______________________________________________\nSent via http://close.io/ - 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": []
},
{
"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.io"
],
"subject": "Welcome to Close.io!",
"opens": [],
"status": "inbox",
"_type": "Email",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"updated_by_name": "Bruce Wayne",
"envelope": {
"from": [
{
"email": "karan@close.io",
"name": ""
}
],
"sender": [
{
"email": "karan@close.io",
"name": ""
}
],
"to": [
{
"email": "phil+sample@close.io",
"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.io!"
},
"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.io",
"bcc": [],
"date_created": "2013-02-01T00:54:51.274000+00:00",
"template_id": null,
"cc": []
}
]
}
Fetch a single Email activity
Fetch a single Email activity
curl -XGET "https://app.close.io/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.io"
],
"subject": "Welcome to Close.io!",
"opens": [],
"status": "inbox",
"_type": "Email",
"updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"updated_by_name": "Bruce Wayne",
"envelope": {
"from": [
{
"email": "karan@close.io",
"name": ""
}
],
"sender": [
{
"email": "karan@close.io",
"name": ""
}
],
"to": [
{
"email": "phil+sample@close.io",
"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.io!"
},
"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.io",
"bcc": [],
"date_created": "2013-02-01T00:54:51.274000+00:00",
"template_id": null,
"cc": []
}
Create an Email activity
Create an Email activity.
status must be one of the following:
inboxto log an already received email.draftto create a draft email.scheduledto send an email at a scheduled date and time, which must be specified in thedate_scheduledfield.outboxto actually send an email. To delay email sending by a few seconds (to allow undo), specifysend_inin seconds (must be less than 60).sentto 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.io 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.
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://app.close.io/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.io!",
"sender": "karan@close.io",
"to": [
"phil+sample@close.io"
],
"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.io",
"to": ["phil+sample@gclose.io"],
"cc": [],
"bcc": [],
"envelope": null,
"subject": "Welcome to Close.io!",
"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": []
}
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://app.close.io/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.io",
"to": ["phil+sample@gclose.io"],
"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": []
}
Delete an Email activity
Delete an Email activity.
curl -XDELETE "https://app.close.io/api/v1/activity/email/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}
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://app.close.io/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.io>",
"subject": "Excited to have you on board!",
"body_preview": "Hey Karen,\r\n\r\nThanks for signing up for Close.io. My name is Steli Efti and I'm\r\nthe CEO of Close.io. 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.io",
"name": "Steli Efti"
}
],
"in_reply_to": null,
"message_id": "<5483d346af89c_c0031a60fdc11130711c@ns5001546.ip-192-95-32.net.mail>",
"reply_to": [],
"sender": [
{
"email": "steli@close.io",
"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": []
},
{
"_type": "Email",
"to": [
"carlos@abc.com"
],
"cc": [],
"bcc": [],
"body_preview": "Hey Carlos,\r\n\r\nThanks for signing up for Close.io. My name is Steli Efti and I'm\r\nthe CEO of Close.io. 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.io",
"name": "Steli Efti"
}
],
"in_reply_to": null,
"message_id": "<5478b0283055a_724e3fb94e13cb5c60513397@ns5001376.ip-192-95-32.net.mail>",
"reply_to": [],
"sender": [
{
"email": "steli@close.io",
"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.io>",
"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": []
},
{
"_type": "Email",
"sender": "Steli Efti <steli@close.io>",
"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.io. My name is Steli Efti and I'm\r\nthe CEO of Close.io. 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.io",
"name": "Steli Efti"
}
],
"in_reply_to": null,
"message_id": "<5475a850a030a_620f1ba3e246281806c1@ns5000834.ip-142-4-219.net.mail>",
"reply_to": [],
"sender": [
{
"email": "steli@close.io",
"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": []
}
],
"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.io",
"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 EmailThread activity
Fetch a single EmailThread activity
curl -XGET "https://app.close.io/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.io>",
"subject": "Excited to have you on board!",
"body_preview": "Hey Karen,\r\n\r\nThanks for signing up for Close.io. My name is Steli Efti and I'm\r\nthe CEO of Close.io. 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.io",
"name": "Steli Efti"
}
],
"in_reply_to": null,
"message_id": "<5483d346af89c_c0031a60fdc11130711c@ns5001546.ip-192-95-32.net.mail>",
"reply_to": [],
"sender": [
{
"email": "steli@close.io",
"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": []
},
{
"_type": "Email",
"to": [
"carlos@abc.com"
],
"cc": [],
"bcc": [],
"body_preview": "Hey Carlos,\r\n\r\nThanks for signing up for Close.io. My name is Steli Efti and I'm\r\nthe CEO of Close.io. 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.io",
"name": "Steli Efti"
}
],
"in_reply_to": null,
"message_id": "<5478b0283055a_724e3fb94e13cb5c60513397@ns5001376.ip-192-95-32.net.mail>",
"reply_to": [],
"sender": [
{
"email": "steli@close.io",
"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.io>",
"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": []
},
{
"_type": "Email",
"sender": "Steli Efti <steli@close.io>",
"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.io. My name is Steli Efti and I'm\r\nthe CEO of Close.io. 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.io",
"name": "Steli Efti"
}
],
"in_reply_to": null,
"message_id": "<5475a850a030a_620f1ba3e246281806c1@ns5000834.ip-142-4-219.net.mail>",
"reply_to": [],
"sender": [
{
"email": "steli@close.io",
"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": []
}
],
"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.io",
"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"
}
Delete an EmailThread activity
Delete an EmailThread activity.
This will also delete all the email activities belonging to this thread.
curl -XDELETE "https://app.close.io/api/v1/activity/emailthread/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}
List or filter all Note activities
List or filter all Note activities.
curl -XGET "https://app.close.io/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.io! 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 Note activity
Fetch a single Note activity
curl -XGET "https://app.close.io/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.io! 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"
}
Create a Note activity
Create a Note activity.
curl -XPOST "https://app.close.io/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"
}
Update a Note activity
Update a Note activity.
curl -XPUT "https://app.close.io/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"
}
Delete a Note activity
Delete a Note activity.
curl -XDELETE "https://app.close.io/api/v1/activity/note/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}
List or filter all LeadStatusChange activities
List or filter all LeadStatusChange activities.
curl -XGET "https://app.close.io/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"
}
]
}
Fetch a single LeadStatusChange activity
Fetch a single LeadStatusChange activity
curl -XGET "https://app.close.io/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"
}
List or filter all OpportunityStatusChange activities
List or filter all OpportunityStatusChange activities.
curl -XGET "https://app.close.io/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",
"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 OpportunityStatusChange activity
Fetch a single OpportunityStatusChange activity
curl -XGET "https://app.close.io/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"
}
List or filter all TaskCompleted activities
List or filter all TaskCompleted activities.
curl -XGET "https://app.close.io/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 TaskCompleted activity
Fetch a single TaskCompleted activity
curl -XGET "https://app.close.io/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",
}
}
Delete a TaskCompleted activity
Delete a TaskCompleted activity.
curl -XDELETE "https://app.close.io/api/v1/activity/task_completed/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}
List or filter all SMS activities
List or filter all SMS activities.
curl -XGET "https://app.close.io/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",
"local_phone": "+16503334444",
"remote_phone": "+18183004000",
"remote_phone_formatted": "+1 818-300-4000",
"text": "SMS in Close.io? 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 SMS activity
Fetch a single SMS activity.
curl -XGET "https://app.close.io/api/v1/activity/sms/{id}/"
Response Headers
Content-Type: application/json
Response Body
{
"id": "acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp",
"_type": "SMS",
"date_sent": null,
"direction": "inbound",
"status": "inbox",
"local_phone": "+16503334444",
"remote_phone": "+18183004000",
"remote_phone_formatted": "+1 818-300-4000",
"text": "SMS in Close.io? 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"
}
Create an SMS activity
Create an SMS activity.
status must be one of the following:
inboxto log an already received SMS.draftto create a draft SMS.scheduledto send an SMS at a scheduled date and time, which must be specified in thedate_scheduledfield.outboxto actually send an SMS. To delay SMS sending by a few seconds (to allow undo), specifysend_inin seconds (must be less than 60).sentto 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://app.close.io/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.",
"remote_phone": "+18183334444",
"remote_phone_formatted": "+1 818-333-4444",
"local_phone": "+14154445555",
"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
}
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://app.close.io/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!",
"remote_phone": "+18183334444",
"remote_phone_formatted": "+1 818-333-4444",
"local_phone": "+14154445555",
"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
}
Delete an SMS 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,
queryis an optional search query filter. Only opportunity properties may be used in the filter. For example,note:importantwill only show opportunities which contain the textimportantin their note. Or,status_change(old_status:active new_status:won date:yesterday)will only show opportunities that transitioned from statusactiveto statuswonon the previous day._order_byallows:date_won,date_updated,date_created,value,confidence,user_name(each of them allows descending order by prepending a minus, e.g._order_by=-date_won)value_periodallows:one_time,monthly,annual- Multiple values for
user_id,status_id,status_label,status_typeandvalue_periodcan be specified using the in operator, e.g.status_type__in=active,won. _group_byallows:user_id,date_won__week,date_won__month,date_won__quarterdate_won__yearto group results by the given criteria.When grouping results, the
dataarray contains a list of groups instead of objects. A group consists of the following fields:keycontaining a unique group key,objectscontaining the list of objects for the given group,total_resultscontaining 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:
yearandmonth, containing the year and month (1-12) for the given group, - if grouping by quarter:
yearandquarter, containing the year and quarter (1-4) for the given group, - if grouping by week:
weekyearandweek, containing the ISO week year and ISO week number for the given group, - if grouping by user:
user_idanduser_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_resultsmay not match the length ofobjects. When paginating, thekeyvalue may be used to combine groups across multiple pages. Sorting using_order_bymay 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__weekwill show the most recent weeks first. When grouping byuser_id, results are ordered by the user's full name.lead_queryis an optional lead search query filter.
curl -XGET "https://app.close.io/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,
"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",
"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": "P F",
"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": "one_time",
"value_formatted": "$500",
"value_currency": "USD",
"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": "P F",
"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": "P F",
"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://app.close.io/api/v1/opportunity/{id}/"
Response Headers
Content-Type: application/json
Response Body
{
"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",
"created_by": null,
"lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
"note": "Bruce needs new software for the Bat Cave.",
"value": 50000,
"value_period": "one_time",
"value_formatted": "$500",
"value_currency": "USD",
"date_created": "2013-02-01T00:54:51.337000+00:00",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_name": "Wayne Enterprises (Sample Lead)",
"user_name": "P F",
"id": "oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt"
}
Create an opportunity
Create an opportunity.
status and status_id (optional)
- Optionally post either
statusorstatus_id(but not both). If neither property exists, the organization's default (first) status will be used when creating new opportunities. - (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
statuscontaining the label of an already-created status object.
curl -XPOST "https://app.close.io/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
{
"status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_label": "Active",
"status_type": "active",
"date_won": null,
"confidence": 90,
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"contact_id": null,
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"date_updated": "2013-02-20T10:11:50.520000+00:00",
"created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
"note": "i hope this deal closes...",
"value": 500,
"value_period": "monthly",
"value_formatted": "$50 monthly",
"value_currency": "USD",
"date_created": "2013-02-20T10:11:50.520000+00:00",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_name": "Wayne Enterprises (Sample Lead)",
"user_name": "Anthony Nemitz",
"id": "oppo_bJoqD4QX21AfA2fAGX5HmPQ1EgGoWBannvLj4khIfPH"
}
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: See description for status and status_id in POST /opportunity/ above.
curl -XPUT "https://app.close.io/api/v1/opportunity/{id}/"
Request Headers
Content-Type: application/json
Request Body
{
"status_id": "stat_5ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk"
}
Response Headers
Content-Type: application/json
Response Body
{
"status_id": "stat_5ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"status_label": "Won",
"status_type": "won",
"date_won": "2013-02-20",
"confidence": 75,
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"contact_id": null,
"updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"date_updated": "2013-02-20T10:06:25.248000+00:00",
"created_by": null,
"lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
"note": "Bruce needs new software for the Bat Cave.",
"value": 50000,
"value_period": "one_time",
"value_formatted": "$500",
"value_currency": "USD",
"date_created": "2013-02-01T00:54:51.337000+00:00",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"lead_name": "Wayne Enterprises (Sample Lead)",
"user_name": "P F",
"id": "oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt"
}
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_typeandobject_idare null, since the lead is already returned inlead_id.incoming_email: One or multiple incoming emails on an email thread. Theobject_typeisemailthread, andobject_idis the ID of the corresponding email thread. Multiple unread emails in one thread are consolidated into one task. Theemailsarray contains a list of email activity IDs related to this task. Thesubjectfield 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_typeisemailthread, andobject_idis the ID of the corresponding email thread. A reference to the email you sent originally is stored inemail_id. Thesubjectandbody_previewfields contain data related the email you should follow up on.missed_call: A missed call. Theobject_typeiscall, andobject_idis the activity ID of the call that was missed. Thephonefield contains the phone number of the remote party, thelocal_phonefield 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_typeiscall, andobject_idis the ID of the corresponding call. Thephonefield contains the phone number of the remote party.voicemail: A voicemail. Just likemissed_call, with the additional fieldsvoicemail_durationandvoicemail_url.opportunity_due: Indicates that an opportunity is scheduled to close on this date. Theobject_typeisopportunity, andobject_idis the ID of the corresponding opportunity.incoming_sms: An incoming SMS. Theobject_typeissms, andobject_idis the ID of the corresponding SMS. Theremote_phonefield contains the phone number of the sender, thelocal_phonefield 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://app.close.io/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": "P F",
"contact_id": null,
"contact_name": null,
"created_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"created_by_name": "P F",
"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.io",
"object_id": null,
"object_type": null,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"text": "Connect with Account Manager",
"updated_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"updated_by_name": "P F"
},
{
"_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": "P F",
"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": "P F",
"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": "P F",
"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": "P F",
"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://app.close.io/api/v1/task/{id}/"
Response Headers
Content-Type: application/json
Response Body
{
"_type": "lead",
"assigned_to": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"assigned_to_name": "P F",
"contact_id": null,
"contact_name": null,
"created_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"created_by_name": "P F",
"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.io",
"object_id": null,
"object_type": null,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"text": "Connect with Account Manager",
"updated_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"updated_by_name": "P F"
}
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://app.close.io/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": "P F",
"contact_id": null,
"contact_name": null,
"created_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"created_by_name": "P F",
"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.io",
"object_id": null,
"object_type": null,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"text": "Connect with Account Manager",
"updated_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"updated_by_name": "P F"
}
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://app.close.io/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": "P F",
"contact_id": null,
"contact_name": null,
"created_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"created_by_name": "P F",
"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.io",
"object_id": null,
"object_type": null,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"text": "Connect with Account Manager",
"updated_by": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"updated_by_name": "P F"
}
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://app.close.io/api/v1/task/{?...}"
Request Headers
Content-Type: application/json
Request Body
{
"_params": { "id": "task_aRUZXCm9lMb2LwipTPhfFoFbCsUnaoQh1ncQ7WLnjlI,task_qhRXeZMdsZ4jxnBf589mpjE7BLb6lo5WTIEFMY7cbsf,task_pexvrlCZXiGlzvCp0HcnWcbBR0QNQwi0XFOKMqoUE8G" },
"is_complete": true
}
Response Headers
Content-Type: application/json
Response Body
{
"ok": true
}
Delete a task
Users
Users represent Close.io user accounts, usually your co-workers / sales reps inside your company/organization.
Special instance of `/user/{your_user_id}/`
Special instance of /user/{your_user_id}/. Good for determining the id of the Organization you are in.
curl -XGET "https://app.close.io/api/v1/me/"
Response Headers
Content-Type: application/json
Response Body
{
"id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"first_name": "Anthony",
"last_name": "Nemitz",
"date_created": "2012-08-29T13:46:31.870000+00:00",
"date_updated": "2013-02-08T06:17:00.583000+00:00",
"email": "anthony@close.io",
"image": "https://secure.gravatar.com/avatar/0ff7116c35caeba6d174affd45730cfd",
"phone": null,
"last_used_timezone": "America/Denver",
"memberships": [
{
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"record_calls": false,
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"track_email_opens": true,
"role": "admin",
"id": "memb_I4Tx9tZwz5npqdGtd0baWtjjlpeFf45OBlkAAKcF3Gc"
}
],
"organizations": [
{
"name": "Sample Data",
"lead_statuses": [
{
"id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Potential"
},
{
"id": "stat_2ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Bad Fit"
},
{
"id": "stat_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Qualified"
}
],
"opportunity_statuses": [
{
"id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Active",
"type": "active"
},
{
"id": "stat_5ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Won",
"type": "won"
},
{
"id": "stat_6ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Lost",
"type": "lost"
},
{
"id": "stat_7ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "On hold"
"type": "active"
}
],
"created_by": null,
"date_updated": "2013-02-20T04:38:01.961000+00:00",
"date_created": "2013-02-01T00:54:51.097000+00:00",
"id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"updated_by": null
},
],
"email_accounts": [
{
"receive_attempts_count": 0,
"user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
"smtp": {
"username": "anthony@close.io",
"use_ssl": true,
"host": "smtp.gmail.com",
"port": 465
},
"imap": {
"username": "anthony@close.io",
"use_ssl": true,
"host": "imap.gmail.com",
"port": 993
},
"organization_id": "orga_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"identities": [],
"id": "emailacct_qG1RuJuy5baiXvVbIc2VelooJwGcKeIrQLNtTd9p6RO"
}
],
"phone_numbers": [
{
"date_updated": "2013-02-01T01:09:43.539000+00:00",
"organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"number": "16502822249",
"date_created": "2013-02-01T01:09:43.539000+00:00"
}
],
"sip_user": {
"username": "kasjfdioashfausfsljdf",
"date_updated": "2012-08-29T13:46:32.601000+00:00",
"secret": "ierhunflqwfnqfqfqfq3fq2f",
"server": "phone.plivo.com",
"date_created": "2012-08-29T13:46:32.601000+00:00"
}
}
Fetch a single user
Fetch a single user.
curl -XGET "https://app.close.io/api/v1/user/{id}/"
Response Headers
Content-Type: application/json
Response Body
{
"id": "user_912jAIAEWR0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"email": "stefan@close.io",
"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://app.close.io/api/v1/user/"
Response Headers
Content-Type: application/json
Response Body
{
"has_more": true,
"data": [
{
"id": "user_912jAIAEWR0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
"email": "stefan@close.io",
"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.io",
"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.
curl -XGET "https://app.close.io/api/v1/user/availability/{?organization_id}"
Response Headers
Content-Type: application/json
Response Body
{
"data":[
{
"user_id":"user_1N20948hwBVXvszcZQCvhQJdrWA9abYQ3VgUwNAjKt2",
"availability":[
{
"status":"offline",
"type":"mobile"
},
{
"status":"offline",
"type":"native"
},
{
"status":"offline",
"type":"web"
}
]
},
{
"user_id":"user_DnOuer5wrIt1fvxkb0mdHmiJ4GRDs8q3NEWK5RYf4Jg",
"availability":[
{
"status":"offline",
"type":"mobile"
},
{
"status":"offline",
"type":"native"
},
{
"status":"offline",
"type":"web"
}
]
},
{
"user_id":"user_QFha5W7whnUVB0TRwDhnDvmw8YJVFbYP1JvtSEWdhXP",
"availability":[
{
"status":"online",
"type":"mobile"
},
{
"status":"offline",
"type":"native"
},
{
"status":"offline",
"type":"web"
}
]
},
{
"user_id":"user_rrZMCl6e4gn3CpW1NX0X9fhAJJG0juhNTST3vjmQjT5",
"availability":[
{
"status":"offline",
"type":"mobile"
},
{
"status":"offline",
"type":"native"
},
{
"status":"online",
"type":"web"
}
]
}
]
}
Organizations
Organizations are "environments" in Close.io where your team works. Most Close.io 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.io 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://app.close.io/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"
}
],
"opportunity_statuses": [
{
"id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Active",
"type": "active"
},
{
"id": "stat_5ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Won",
"type": "won"
},
{
"id": "stat_6ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Lost",
"type": "lost"
},
{
"id": "stat_7ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "On hold"
"type": "active"
}
],
"created_by": null,
"memberships": [
{
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"user_phone": "16502822245",
"user_first_name": "P",
"user_full_name": "P F",
"user_last_name": "F",
"track_email_opens": true,
"role": "admin",
"id": "memb_wLKueFux8M2u2jshQPichvA5V44hpECtoljWbJS1PeY",
"record_calls": false,
"user_email": "phil+sample@close.io"
},
{
"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": "admin",
"id": "memb_hLHF3LsUI6N7twH1derRHiHEKeE843ttSYmsun4xkCn",
"record_calls": false,
"user_email": "phil@close.io"
},
{
"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": "admin",
"id": "memb_I4Tx9tZwz5npqdGtd0baWtjjlpeFf45OBlkAAKcF3Gc",
"record_calls": false,
"user_email": "anthony@close.io"
}
],
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",
"updated_by": null
}
Update organization's `name`, `currency`, and reorder existing `lead_statuses` and `opportunity_statuses`
Update organization's name, currency, and reorder existing lead_statuses and opportunity_statuses.
curl -XPUT "https://app.close.io/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"
}
],
"opportunity_statuses": [
{
"id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Active",
"type": "active"
},
{
"id": "stat_5ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Won",
"type": "won"
},
{
"id": "stat_6ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Lost",
"type": "lost"
},
{
"id": "stat_7ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "On hold"
"type": "active"
}
],
"currency": "USD",
"currency_symbol": "$",
"created_by": null,
"memberships": [
{
"user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
"user_phone": "16502822245",
"user_first_name": "P",
"user_full_name": "P F",
"user_last_name": "F",
"track_email_opens": true,
"role": "admin",
"id": "memb_wLKueFux8M2u2jshQPichvA5V44hpECtoljWbJS1PeY",
"record_calls": false,
"user_email": "phil+sample@close.io"
}
],
"date_updated": "2013-02-20T04:38:01.961000+00:00",
"date_created": "2013-02-01T00:54:51.097000+00:00",
"id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
"updated_by": null
}
Custom Fields
Custom fields let you store arbitrary data on leads. This endpoint allows you to manage their structure, rename them, change their types, etc. Learn more about custom fields.
Note that you can only create/edit/delete custom fields if you're an admin.
List all the custom fields for your organization
List all the custom fields for your organization.
curl -XGET "https://app.close.io/api/v1/custom_fields/lead/"
Response Headers
Content-Type: application/json
Response Body
{
"has_more": false,
"data": [
{
"id": "lcf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c",
"name": "# of users",
"type": "number",
"choices": [],
"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",
"type": "choices",
"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",
"type": "text",
"choices": [],
"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",
"type": "text",
"choices": [],
"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",
"type": "date",
"choices": [],
"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 custom field's details
Fetch custom field's details.
curl -XGET "https://app.close.io/api/v1/custom_fields/lead/{id}/"
Response Headers
Content-Type: application/json
Response Body
{
"id": "lcf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c",
"name": "# of users",
"type": "number",
"choices": [],
"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 custom field
Create a new custom field.
name is the user-readable name of the field.
type determines which values are accepted when posting custom.FIELD_ID to the Lead API endpoint:
textaccepts any text value, e.g."Some Value"numberaccepts numeric values - both integers and floats, e.g.2or5.5dateaccepts date values (without the time component), e.g."2014-06-12"datetimeaccepts date values (including the time component), e.g."2014-06-27T22:00:00-08:00"choicesaccepts all the values specified in thechoicesfield, e.g."some valid choice"hiddenaccepts any value but is never shown in the UI. It's a good place to store information useful only to API integrations.
choices is a list of valid values for a custom field of type == 'choices'.
curl -XPOST "https://app.close.io/api/v1/custom_fields/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",
"type": "number",
"choices": [],
"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 custom field
Update a custom field - you can rename it, change its type, 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.
curl -XPUT "https://app.close.io/api/v1/custom_fields/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",
"type": "text",
"choices": [],
"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 custom field
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://app.close.io/api/v1/status/lead/"
Response Headers
Content-Type: application/json
Response Body
{
"has_more": false,
"data": [
{
"id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Potential"
},
{
"id": "stat_2ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Bad Fit"
},
{
"id": "stat_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Qualified"
},
{
"id": "stat_8ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Not Serious"
}
]
}
Create a new status that can be applied to leads
Create a new status that can be applied to leads
curl -XPOST "https://app.close.io/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"
}
Update
Update (rename) a "lead status" option.
Note: to update the status of a particular lead, see PUT /lead/{lead_id}/
curl -XPUT "https://app.close.io/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"
}
Delete a lead status option
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://app.close.io/api/v1/status/opportunity/"
Response Headers
Content-Type: application/json
Response Body
{
"has_more": false,
"data": [
{
"id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Active",
"type": "active"
},
{
"id": "stat_5ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Won",
"type": "won"
},
{
"id": "stat_6ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Lost",
"type": "lost"
},
{
"id": "stat_7ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "On hold"
"type": "active"
}
]
}
Create an opportunity status
Create an opportunity status. There are three different types of opportunity statuses: active, won, lost.
curl -XPOST "https://app.close.io/api/v1/status/opportunity/"
Request Headers
Content-Type: application/json
Request Body
{
"label": "Closed",
"type": "won"
}
Response Headers
Content-Type: application/json
Response Body
{
"id": "stat_10diZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Closed",
"type": "won"
}
Update
Update (rename) an opportunity status option.
curl -XPUT "https://app.close.io/api/v1/status/opportunity/{status_id}/"
Request Headers
Content-Type: application/json
Request Body
{
"label": "Renamed",
"type": "active"
}
Response Headers
Content-Type: application/json
Response Body
{
"id": "stat_10diZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"label": "Renamed",
"type": "active"
}
Delete an opportunity status
Reporting
These endpoints return some raw aggregate data used by the Reporting features of Close.io. Any fields related to revenue are returned in cents. Any duration values are returned in seconds.
Get an activity report for an organization
Get an activity report for an organization.
curl -XGET "https://app.close.io/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://app.close.io/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 filter leads included in the report by specifying a query.
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 (endedminusstarted).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_queriescontaining 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://app.close.io/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
_queriesfield 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_urlsand_opportunities_page_urlfields.
curl -XGET "https://app.close.io/api/v1/report/statuses/opportunity/{ORGANIZATION_ID}/?{user_id,date_start,date_end,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.io
Get a custom report for just about any object in Close.io. This endpoint returns data that allows graphing of arbitrary metrics and is what powers "Explorer" in the UI.
queryis 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:incomingmay be used ifxstarts withemail.. Defaults to*, which includes all objects.yis 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).xis 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 (xis a date field), one ofauto,hour,day,week,month,quarter,year(defaults toauto, which is chosen based onstartandend). For graphs with a numeric X axis, an integer number can be specified to indicate the histogram interval (autoby 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 theyparameter. One ofsum(default),avg,min, ormax. Does not apply for.countyvalues ifxis 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://app.close.io/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.io UI, and they are also used when initiating a single Bulk Email.
List email templates
List email templates.
curl -XGET "https://app.close.io/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.io.",
"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://app.close.io/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.io.",
"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
}
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_idandcontact_idis 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 byentrywill be rendered (excluding leads that have no email addresses).contact, thenentryrefers 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://app.close.io/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.io",
"subject": "Checking In"
}
Create an email template
Create an email template.
curl -XPOST "https://app.close.io/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
}
Update an email template
Update an email template.
curl -XPUT "https://app.close.io/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
}
Delete an email template
Smart Views
Smart Views are "saved search queries" in Close.io 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://app.close.io/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://app.close.io/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://app.close.io/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://app.close.io/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 (e.g. to check their statuses).
curl -XGET "https://app.close.io/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 (e.g. to check its status).
curl -XGET "https://app.close.io/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 for the given `query`
Initiate a new bulk email for the given query. 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://app.close.io/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"
}
Resume a paused bulk email
Resume a paused bulk email.
curl -XPUT "https://app.close.io/api/v1/bulk_action/email/{id}/"
Request Headers
Content-Type: application/json
Request Body
{
"status": "resuming"
}
Response Headers
Content-Type: application/json
Response Body
{
"query": "*",
"status": "resuming",
"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"
}
List bulk deletes
List bulk deletes (e.g. to check their statuses).
curl -XGET "https://app.close.io/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 (e.g. to check its status).
curl -XGET "https://app.close.io/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"
}
Bulk delete all leads returned by a given search `query`
Bulk delete all leads returned by a given search query.
Use "send_done_email": false if you don't want to get a confirmation email after the bulk action is done.
curl -XPOST "https://app.close.io/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 (e.g. to check their statuses).
curl -XGET "https://app.close.io/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 (e.g. to check its status).
curl -XGET "https://app.close.io/api/v1/bulk_action/delete/{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"
}
Bulk edit all leads returned by a given search `query`
Bulk edit all leads returned by a given search query.
Pass additional parameters depending on which type is passed:
set_lead_statuswill set the Lead Status on all leads. It expects:lead_status_id- ID of the Lead Status to use.
clear_custom_fieldwill clear/remove/unset a specific custom field from all leads. It expects:custom_field_idorcustom_field_name- ID or exact name of the custom field to remove.
set_custom_fieldwill set/update/add a specific custom field on all leads. It expects:custom_field_idorcustom_field_name- ID or exact name of the custom field to set/update.custom_field_value- New value.
Use "send_done_email": false if you don't want to get a confirmation email after the bulk action is done.
curl -XPOST "https://app.close.io/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.io.
Each link has a name (displayed as link text), url template and a type.
Type can be one of:
leadcontactopportunity
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://app.close.io/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://app.close.io/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://app.close.io/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://app.close.io/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.io.
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 compressed to make your download and our upload faster. If you export more than 2GB of data, the file is compressed using GZIP. Otherwise, ZIP is used.
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://app.close.io/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://app.close.io/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)
statuscan have one of these values:created,started,in_progress,done,error.
curl -XGET "https://app.close.io/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://app.close.io/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. 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.io.external- the number is owned by you and can only be used for outbound Close.io 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.io 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://app.close.io/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,
"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,
"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,
"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://app.close.io/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,
"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 can:
- Change a
labelof your number. - Set up call forwarding via
forward_toandforward_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://app.close.io/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,
"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.
Few restriction apply:
- You need to be an admin to modify or delete a group number.
- You cannot delete your primary personal number.
curl -XDELETE "https://app.close.io/api/v1/phone_number/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}
Event Log
Most actions in Close.io 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.
Please note that you need to be on the Business plan or higher to use this endpoint. For privacy reasons, certain fields are only visible for organization admins.
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_updatedmay change, but thedate_createdwill stay the same.organization_id: The organization IDuser_id: The ID of the user who generated this event, ornullif 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.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 (nullfor delete events). This field is only returned for organization admins.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. This field is only returned for organization admins.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_idslist 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 additionaldeletedevents on child objects like activities, opportunities, tasks, and contacts.merged- two leads are merged.lead_idanddatacontain the lead ID and data of the resulting (destination) lead. Note that you will also getupdatedanddeletedevents for the leads and any related objects involved in the merge. All events related to the merge containmerge_source_lead_idandmerge_destination_lead_idin themetafield 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_currencychanges, 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 atcreatedorsentfor useful (and less noisy) alternatives.deleted- an email is deleted.sent- an outgoing email is sent trough 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.io, do not trigger this event. They do however trigger acreatedevent 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 atcreatedorcompletedfor useful (and less noisy) alternatives.deleted- a call is deleted.completed- a call is completed. This event is not triggered for calls made external to Close.io (e.g. manually logged calls).
- 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.
- 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.updatedevent (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.updatedevent (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 incompletedandupdatedevents on the task (lead.task), and in aupdatedevent 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 aupdatedevent on the task (task.lead), and anupdatedevent on the lead.
- Import (
import)created- a CSV import is created. Note that you'll also get acreatedevent 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 atcreatedorcompletedfor a useful (and less noisy) alternatives.completed- an import is completed.deleted- a CSV import is reverted. Note that you'll also get adeletedevent for each lead that was deleted as part of this revert.
- 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.createdorexport.completedas useful (and less noisy) alternatives.completed- an export is completed.
- Bulk actions (
bulk_action.delete,bulk_action.edit,bulk_action.email)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 thecreatedorcompletedactions 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).
- Custom fields (
custom_fields.lead)created- a custom field is created for the first time.updated- a 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 custom field 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 thelabelof 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.
- 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.
- 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.
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://app.close.io/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=leadobject_id: If specified, only events for the given object are returned. No related object events are returned. Example:object_id=lead_123action: Only events of specified actions are returned. Example:action=deletedlead_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_typeandobject_idobject_typeandactionobject_idandactionlead_idandobject_typelead_id,object_typeandactionlead_id,user_idandobject_typelead_id,user_id,object_typeandactionlead_idanduser_iduser_idandobject_iduser_id,object_idandactionuser_idandobject_typeuser_id,object_typeandaction- 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), ornullif 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), ornullif 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_nextorcursor_previousfrom 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://app.close.io/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",
}