Close.io API Documentation

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

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.

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.

GET
/lead/{?query, _limit, _skip, _fields}

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": "+1234",
                            "phone_formatted": "+1 234",
                            "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"
                }
            ],
            "date_updated": "2013-02-06T20:53:01.977000+00:00",
            "description": "",
            "html_url": "https://app.close.io/lead/lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O/",
            "created_by": null,
            "custom": {},
            "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,
                    "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"
                }
            ],
            "updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
            "date_created": "2013-02-01T00:54:51.333000+00:00",
            "id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
            "name": "Wayne Enterprises (Sample Lead)"
        }
    ]
}
GET
/lead/{id}/

Retrieve a single lead. Includes everything about a lead except for its activities.

curl -XGET "https://app.close.io/api/v1/lead/{id}/"
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": "+1234",
                    "phone_formatted": "+1 234",
                    "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"
        }
    ],
    "date_updated": "2013-02-06T20:53:01.977000+00:00",
    "html_url": "https://app.close.io/lead/lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O/",
    "created_by": null,
    "custom": {},
    "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,
            "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"
        }
    ],
    "updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
    "date_created": "2013-02-01T00:54:51.333000+00:00",
    "id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
    "description": ""
}
POST
/lead/

Create a new lead. Contacts, addresses, and custom fields can all be nested in the lead. Currently, activities, tasks, and opportunities must be posted separately.

status and status_id (optional)

  • Optionally post either status or status_id (but not both). If neither property exists, the organization's default (first) status will be used when creating new leads.
  • (Recommended) Use status_id (like in the example payload), so that users can rename statuses in the UI without breaking your implementation.
  • Alternatively, you can post a status containing the label of an already-created status object.
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": {
        "Source": "Website contact form",
        "Transportation": "Segway"
    },
    "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": {
        "Source": "Website contact form",
        "Transportation": "Segway"
    },
    "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."
}
PUT
/lead/{id}/

Update an existing lead. Supports non-destructive patches.

status: See description for status and status_id in POST /lead/ above.

custom: To update a single custom field without removing the others, use custom.field_name: updated_value instead of custom: { all: 'fields', listed: 'here' }. You can also unset a single field by using custom.field_name: 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",
    "custom": {},
    "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
/lead/{id}/

Delete a lead

curl -XDELETE "https://app.close.io/api/v1/lead/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}
POST
/lead/merge/

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.

GET
/contact/

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": "+1234",
                    "phone_formatted": "+1 234",
                    "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"
        }
    ]
}
GET
/contact/{id}/

Fetch a single contact

curl -XGET "https://app.close.io/api/v1/contact/{id}/"
Response Headers
Content-Type: application/json
Response Body
{
    "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",
    "emails": [
        {
            "type": "office",
            "email_lower": "gob@example.com",
            "email": "gob@example.com"
        }
    ],
    "organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
    "date_created": "2013-02-20T05:44:35.625000+00:00",
    "id": "cont_3lUrUYmceYjzeqrIqF5jpSppZemyxvgquE8Oq1kM6p0",
    "updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo"
}
POST
/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",
    "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"}
    ]
}
PUT
/contact/{id}/

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",
    "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
/contact/{id}/

Delete a contact

curl -XDELETE "https://app.close.io/api/v1/contact/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}

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.).

GET
/activity/{?lead_id, user_id, date_created__gt, date_created__lt, _fields}

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, Email objects will be returned for each email message.
  • A value of true will return EmailThread objects representing email conversations. Stripped-down version of Email objects will also be returned.
  • A value of only will return EmailThread objects representing email conversations. Email objects 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",
            "updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
            "date_updated": "2013-02-20T05:44:35.667000+00:00",
            "created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
            "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",
            "updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
            "date_updated": "2013-02-20T05:44:31.955000+00:00",
            "created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
            "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",
            "updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
            "date_updated": "2013-02-20T05:30:24.870000+00:00",
            "created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
            "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",
            "need_smtp_credentials": false,
            "user_id": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
            "created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
            "to": [
                "phil@close.io"
            ],
            "subject": "Testing testing!!!!",
            "opens": [],
            "status": "sent",
            "_type": "Email",
            "updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
            "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. &lt;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> &ndash; 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",
            "updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
            "date_updated": "2013-02-01T01:06:35.668000+00:00",
            "created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
            "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",
            "need_smtp_credentials": false,
            "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",
            "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": []
        }
    ]
}
GET
/activity/note/{?lead_id, user_id, date_created__gt, date_created__lt}

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",
            "updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
            "date_updated": "2013-02-01T01:06:35.668000+00:00",
            "created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
            "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"
        }
    ]
}
POST
/activity/note/

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",
    "updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
    "date_updated": "2013-02-20T06:39:57.266000+00:00",
    "created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
    "organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
    "contact_id": null,
    "date_created": "2013-02-20T06:39:57.266000+00:00",
    "id": "acti_kwWA3rOfy4BnaZ8QQk3RIIAz51dU9ayiluy1s961Oiw",
    "lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp"
}
PUT
/activity/note/{id}/

Update an existing 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",
    "updated_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
    "date_updated": "2013-02-20T06:41:59.846000+00:00",
    "created_by": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo",
    "organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
    "contact_id": null,
    "date_created": "2013-02-20T06:39:57.266000+00:00",
    "id": "acti_kwWA3rOfy4BnaZ8QQk3RIIAz51dU9ayiluy1s961Oiw",
    "lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp"
}
GET
/activity/email/{?lead_id, user_id, date_created__gt, date_created__lt}

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",
            "direction": "outgoing",
            "user_id": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
            "created_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
            "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. &lt;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> &ndash; 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": [],
            "need_smtp_credentials": false
        },
        {
            "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",
            "need_smtp_credentials": false,
            "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",
            "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": []
        }
    ]
}
GET
/activity/emailthread/{?lead_id, user_id, date_created__gt, date_created__lt}

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
{}
POST
/activity/email/

Create an Email activity.

status:

  • outbox to actually send an email.
  • sent to log an already sent email.

We'll render an Email Template server-side if you include a template_id without including body_text or body_html in your POST.

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,
    "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
{}
PUT
/activity/email/{id}/

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
{}
Response Headers
Content-Type: application/json
Response Body
{}
POST
/activity/call/

Log a Call activity manually (for calls made outside of the Close.io VoIP system)

status: defaults to completed

direction (optional): outbound or inbound

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
}
GET
/activity/call/{?lead_id, user_id, date_created__gt, date_created__lt}

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": "+123",
            "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"
        }
    ]
}
GET
/activity/status_change/lead/{?lead_id, user_id, date_created__gt, date_created__lt}

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"
        }
    ]
}
GET
/activity/status_change/opportunity/{?lead_id, user_id, date_created__gt, date_created__lt}

List or filter all OpportunityStatusChange activities.

curl -XGET "https://app.close.io/api/v1/activity/status_change/opportunity/{?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": "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,
            "updated_by": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
            "updated_by_name": "Anthony Nemitz",
            "user_id": "user_weWpqmrZZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU",
            "user_name": "Anthony Nemitz",
            "id": "acti_CAI2lO44gRLMIvgsKfPZghRyuv1h8S3l7c4cDznXukd"
        }
    ]
}
DELETE
/activity/email/{id}/

Delete an Email activity.

curl -XDELETE "https://app.close.io/api/v1/activity/email/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}
DELETE
/activity/call/{id}/

Delete a Call activity.

curl -XDELETE "https://app.close.io/api/v1/activity/call/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}
DELETE
/activity/note/{id}/

Delete a Note activity.

curl -XDELETE "https://app.close.io/api/v1/activity/note/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}
DELETE
/activity/status_change/lead/{id}/

Delete an LeadStatusChange activity.

curl -XDELETE "https://app.close.io/api/v1/activity/status_change/lead/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}
DELETE
/activity/status_change/opportunity/{id}/

Delete an OpportunityStatusChange activity.

curl -XDELETE "https://app.close.io/api/v1/activity/status_change/opportunity/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}

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.

GET
/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}

List or filter opportunities.

  • All opportunity list responses contain the following aggregate values about all the matching objects (regardless of pagination / limits):
    • total_results: the total number of objects,
    • count_by_value_period: a dictionary containing the number of opportunities by value period, e.g. { 'one_time': 2, 'annual': 1, 'monthly': 1 },
    • total_value_one_time: the sum of the values of all one time opportunities,
    • total_value_monthly: the sum of the values of all monthly opportunities,
    • total_value_annual: the sum of the values of all annual opportunities,
    • total_value_annualized: the sum of the values of all opportunities where monthly opportunity values are multiplied by 12,
    • expected_value_one_time: the sum of the values of all one time opportunities multiplied by their confidence,
    • expected_value_monthly: the sum of the values of all monthly opportunities multiplied by their confidence,
    • expected_value_annual: the sum of the values of all annual opportunities multiplied by their confidence,
    • expected_value_annualized: the sum of the values of all opportunities multiplied by their confidence where monthly opportunity values are multiplied by 12,
  • query is an optional search query filter. Only opportunity properties may be used in the filter. For example, note:important will only show opportunities which contain the text important in their note. Or, status_change(old_status:active new_status:won date:yesterday) will only show opportunities that transitioned from status active to status won on the previous day.
  • _order_by allows: 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_period allows: one_time, monthly, annual
  • Multiple values for user_id, status_id, status_label, status_type and value_period can be specified using the in operator, e.g. status_type__in=active,won.
  • _group_by allows: user_id, date_won__week, date_won__month, date_won__quarter date_won__year to group results by the given criteria.

    When grouping results, the data array contains a list of groups instead of objects. A group consists of the following fields:

    • key containing a unique group key,
    • objects containing the list of objects for the given group,
    • total_results containing the number of total objects for the given group,
    • all aggregate values for the given group,
    • if grouping by year: year, containing the year for the given group,
    • if grouping by month: year and month, containing the year and month (1-12) for the given group,
    • if grouping by quarter: year and quarter, containing the year and quarter (1-4) for the given group,
    • if grouping by week: weekyear and week, containing the ISO week year and ISO week number for the given group,
    • if grouping by user: user_id and user_name, containing the user ID and full name of the user for the given group.

    Note that pagination still applies to objects and not groups. The last or first group may be cut off during pagination, therefore total_results may not match the length of objects. When paginating, the key value may be used to combine groups across multiple pages. Sorting using _order_by may be applied and sorts the items within each of the groups. Group order can be reversed by prepending a minus. For example, _group_by=-date_won__week will show the most recent weeks first. When grouping by user_id, results are ordered by the user's full name.

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}"
Response Headers
Content-Type: application/json
Response Body
{
    "has_more": false,
    "data": [
        {
            "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.321000+00:00",
            "value_period": "one_time",
            "created_by": null,
            "note": "Gob's ready to buy a $3,000 suit.",
            "value": 300000,
            "lead_name": "Bluth Company (Sample Lead)",
            "organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
            "date_created": "2013-02-01T00:54:51.321000+00:00",
            "user_name": "P F",
            "id": "oppo_KXyJj2PT74U1wOPvhBDO37jCC89mmrnoW0DylcDDWrL",
            "lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp"
        },
        {
            "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,
            "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"
        }
    ]
}
GET
/opportunity/{id}/

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,
    "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",
    "value_period": "one_time"
}
POST
/opportunity/

Create an opportunity.

status and status_id (optional)

  • Optionally post either status or status_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 status containing 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"
}
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": null,
    "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",
    "value_period": "one_time"
}
PUT
/opportunity/{id}/

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,
    "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",
    "value_period": "one_time"
}
DELETE
/opportunity/{id}/

Delete an opportunity.

curl -XDELETE "https://app.close.io/api/v1/opportunity/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}

Tasks

Tasks are todo items assigned to a sales rep that need to be done to a given Lead, with an optional due date/time. Examples include calls that are scheduled for a future date.

GET
/task/{?lead_id, assigned_to, due_date, due_date__gt, due_date__lt, due_date__gte, due_date__lte, is_complete, _order_by}

List or filter tasks.

allowed orderings: due_date, -date_created

curl -XGET "https://app.close.io/api/v1/task/{?lead_id, assigned_to, due_date, due_date__gt, due_date__lt, due_date__gte, due_date__lte, is_complete, _order_by}"
Response Headers
Content-Type: application/json
Response Body
{
    "has_more": false,
    "data": [
        {
            "due_date": "2013-02-06",
            "updated_by": null,
            "date_updated": "2013-02-01T00:54:51.216000+00:00",
            "text": "Connect with Account Manager",
            "created_by": null,
            "is_complete": false,
            "organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
            "assigned_to_name": "P F",
            "assigned_to": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
            "date_created": "2013-02-01T00:54:51.216000+00:00",
            "lead_name": "Close.io",
            "id": "task_OyXdxOKMVYIDTPeh5zQOIfN6ONQEqCxRwWdZQdUtAxY",
            "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h"
        }
    ]
}
GET
/task/{id}/

Fetch a task's details.

curl -XGET "https://app.close.io/api/v1/task/{id}/"
Response Headers
Content-Type: application/json
Response Body
{
    "due_date": "2013-02-06",
    "updated_by": null,
    "date_updated": "2013-02-01T00:54:51.216000+00:00",
    "text": "Connect with Account Manager",
    "created_by": null,
    "id": "task_OyXdxOKMVYIDTPeh5zQOIfN6ONQEqCxRwWdZQdUtAxY",
    "organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
    "assigned_to_name": "P F",
    "assigned_to": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
    "date_created": "2013-02-01T00:54:51.216000+00:00",
    "lead_name": "Close.io",
    "is_complete": false,
    "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h"
}
POST
/task/

Create a task.

curl -XPOST "https://app.close.io/api/v1/task/"
Request Headers
Content-Type: application/json
Request Body
{
    "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h",
    "assigned_to": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
    "text": "Connect with Account Manager",
    "due_date": "2013-02-06",
    "is_complete": false
}
Response Headers
Content-Type: application/json
Response Body

                                            
                                        
PUT
/task/{id}/

Update a task.

curl -XPUT "https://app.close.io/api/v1/task/{id}/"
Request Headers
Content-Type: application/json
Response Headers
Content-Type: application/json
Response Body

                                            
                                        
DELETE
/task/{id}/

Delete a task.

curl -XDELETE "https://app.close.io/api/v1/task/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}

Users

Users represent Close.io user accounts, usually your co-workers / sales reps inside your company/organization.

GET
/me/

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,
    "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"
        }
    ],
    "sip_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"
    }
}
GET
/user/{id}/

Fetch a user.

curl -XGET "https://app.close.io/api/v1/user/{id}/"
Response Headers
Content-Type: application/json
Response Body

                                            
                                        
GET
/user/availability/{?organization_id}

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/Activites/etc are never able to be shared across multiple organizations.

(The organizations/companies of your sales prospects in Close.io are called "Leads".)

GET
/organization/{id}/

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
}
PUT
/organization/{id}/

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.

GET
/custom_fields/lead/

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"
        }
    ]
}
GET
/custom_fields/lead/{id}/

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"
}
POST
/custom_fields/lead/

Create a new custom field. Its name can later be used in a lead's custom object and the values put in that object will be validated based on the type specified here.

type determines which values are accepted when posting custom to the Lead API endpoint:

  • text accepts any value, e.g. { 'custom': { 'Text Field Name': 'Some Value' } }
  • number accepts numeric values - both integers and floats, e.g. { 'custom': { 'Number Field Name': 2, 'Another Field': 5.5 } }
  • date accepts date values (without the time component), e.g. { 'custom': { 'Date Field Name': '2014-06-12' } }
  • datetime accepts date values (including the time component), e.g. { 'custom': { 'Date Field Name': '2014-06-27T22:00:00-08:00' } }
  • choices accepts all the values specified in the choices field, e.g. { 'custom': { 'Choices Field Name': 'some valid choice' } }

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"
}
PUT
/custom_fields/lead/{custom_field_id}/

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
/custom_fields/lead/{custom_field_id}/

Delete a custom field. The field will immediately disappear from any Lead API responses.

curl -XDELETE "https://app.close.io/api/v1/custom_fields/lead/{custom_field_id}/"
Response Headers
Content-Type: application/json
Response Body
{}

Lead Statuses

Lead statuses are a customizable list of stages a Lead can be in.

GET
/status/lead/

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"
        }
    ]
}
POST
/status/lead/

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"
}
PUT
/status/lead/{status_id}/

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
/status/lead/{status_id}/

Delete a lead status option. You should make sure no leads are assigned this status, first.

curl -XDELETE "https://app.close.io/api/v1/status/lead/{status_id}/"
Response Headers
Content-Type: application/json
Response Body
{}

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.

GET
/status/opportunity/

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"
        }
    ]
}
POST
/status/opportunity/

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"
}
PUT
/status/opportunity/{status_id}/

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
/status/opportunity/{status_id}/

Delete an opportunity status. You should make sure no opportunities are assigned this status, first.

curl -XDELETE "https://app.close.io/api/v1/status/opportunity/{status_id}/"
Response Headers
Content-Type: application/json
Response Body
{}

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
/report/activity/{ORGANIZATION_ID}/{?user_id,date_start,date_end}

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}"
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,
    "show_calling": true
}
GET
/report/sent_emails/{ORGANIZATION_ID}/{?user_id,date_start,date_end}

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
/report/statuses/lead/{ORGANIZATION_ID}/?{date_start,date_end}

Get a lead status change report. The date range is optional. A report may be requested for a specific time period or overall. The following fields are returned (when requesting an overall report, some inapplicable fields will not be returend):

  • status_overview: A list of all lead statuses with the following fields:
    • status_id, status_label, status_is_deleted: The ID and label of the status, and whether it was deleted.
    • started: Number of leads in this status at the start of the period.
    • ended: Number of leads in this status at the end of the period.
    • change: The net change of the number of leads during the period (ended minus started).
    • change_percent: The net change of leads in in percent.
    • gained: Number of leads that were not in this status at the beginning of the period, but were in this status at the end of the period, i.e. leads that transitioned into this status at some point during the period and stayed in this status at the end of the period.
    • lost: Number of leads that were in this status at the beginning of the period, but were not in this status at the end of the period, i.e. leads that transitioned out of this status at some point during the period and stayed in some other status at the end of the period.
    • entered: Number of leads that entered this status at some point during the period.
    • left: Number of leads that left this status at some point during the period.
    • _queries: A dictionary containing search queries which list the leads for the different states (started, ended, gained, lost, entered, left)
    • _leads_page_urls: A dictionary similar to _queries containing paths to the lead search UI page for the different states.
  • status_transitions: A list of all status transitions (aggreated 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 in status_transitions.
curl -XGET "https://app.close.io/api/v1/report/statuses/lead/{ORGANIZATION_ID}/?{date_start,date_end}"
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
/report/statuses/opportunity/{ORGANIZATION_ID}/?{user_id,date_start,date_end}

Get an opportunity status change report. The arguments and returned fields are similar to the lead status report (see above), with the following differences:

  • Any returned numbers refer to the number of opportunities instead of leads.
  • The opportunity status report may optionally be filtered by the opportunity user.
  • The returned search queries in the _queries field are wrapped in a nested opportunity query (opportunity(...)) and can be used as a query for the leads API endpoint. To pass the query to the opportunities API endpoint, only the query within the nested clause (in the parentheses) may be supplied.
  • In addition to returning paths to the lead search UI page, paths to the opportunity UI page are returned in the _opportunities_page_urls and _opportunities_page_url fields.
curl -XGET "https://app.close.io/api/v1/report/statuses/opportunity/{ORGANIZATION_ID}/?{user_id,date_start,date_end}"
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
/report/custom/{ORGANIZATION_ID}/{?query,x,y,interval,transform_y,group_by,start,end}

BETA API: This API endpoint is in beta stage and may not work properly, change significantly or be removed without any prior warning. Feedback is welcome.

Get a custom report for a lead, activity or opportunity. This endpoint returns data that allows graphing of arbitrary metrics.

  • query is an optional search query filter. When reporting on leads, any regular lead search query may be used. When reporting on activities or opportunities, only properties of the chosen object type may be used. For example, direction:incoming may be used if x starts with email.. Defaults to *, which includes all objects.
  • y is made up of the object type and field which is reported on the Y axis. For example the value lead.count (used by default) may be used to graph the number of leads, or a numeric field may be used. Examples: call.duration (for call length), opportunity.value (for value of opportunities).
  • x is the field which is reported on the X axis, for example "lead.custom.MRR" or "opportunity.date_created". If no value is specified, only the object count is returned for each series.
  • interval: Graph interval, i.e. the precision of the X axis. For time based graphs (x is a date field), one of auto, hour, day, week, month, quarter, year (defaults to auto, which is chosen based on start and end). For graphs with a numeric X axis, an integer number can be specified to indicate the histogram interval (auto by default).
  • group_by: Optional field name by which the report will be grouped. When grouping, a separate series will be returned for each group. By default no grouping is applied.
  • transform_y: Transformation function that gets applied to the y parameter. One of sum (default), avg, min, or max. Does not apply for .count y values if x is of the same object type.
  • start: Date or integer of the start of the X axis range. For dates, defaults to the date of creation of your organization.
  • end: Date or integer of the end of the X axis range. For dates, defaults to now.

To get a full list of fields that can be used, do a GET to /report/custom/fields/. Only the number data type can be used for the y parameter.

curl -XGET "https://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=first_communication_date&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.

GET
/email_template/

List email templates.

curl -XGET "https://app.close.io/api/v1/email_template/"
Response Headers
Content-Type: application/json
Response Body
{
    "has_more": false,
    "data": [
        {
            "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": "Cold 1",
            "subject": "I bet using other sales tool sucks",
            "body": "You should try Close.io.",
            "attachments": [],
            "is_shared": true
        }
    ]
}
GET
/email_template/{id}/

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",
    "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": "Cold 1",
    "subject": "I bet using other sales tool sucks",
    "body": "You should try Close.io.",
    "attachments": [],
    "is_shared": true
}
GET
/email_template/{id}/render/{?lead_id, contact_id, query, entry, mode}

Render an email template for the given lead/contact using the current user context. Accepts two forms of usage:

  • Single lead/contact:
    • lead_id and contact_id is supplied (both required)
  • Preview results from a search query
    • query (required) contains a search query
    • entry (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 by entry will be rendered (excluding leads that have no email addresses).
      • contact, then entry refers to the index of the contact (excluding contacts that have no emails). Will return an empty dict if there are no more entries.
curl -XGET "https://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"
}
POST
/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
}
PUT
/email_template/{id}/

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
}
DELETE
/email_template/{id}/

Delete an email template.

curl -XDELETE "https://app.close.io/api/v1/email_template/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}

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.

GET
/saved_search/

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
/saved_search/{id}/

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"
}
POST
/saved_search/

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"
}
PUT
/saved_search/{id}/

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
/saved_search/{id}/

Delete a Smart View

curl -XDELETE "https://app.close.io/api/v1/saved_search/{id}/"
Response Headers
Content-Type: application/json
Response Body
{}

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.

GET
/bulk_action/email/

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": [
        {
            "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",
            "template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn",
            "query": "*",
            "contact_preference": "lead",
            "status": "processing",
            "n_leads": 824,
            "n_leads_processed": 523
        }
}
POST
/bulk_action/email/

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"
}
Response Headers
Content-Type: application/json
Response Body
{
    "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",
    "template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn",
    "query": "*",
    "contact_preference": "lead",
    "status": "created",
    "n_leads": null,
    "n_leads_processed": 0
}
PUT
/bulk_action/email/{id}/

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
{
    "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",
    "template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn",
    "query": "*",
    "contact_preference": "lead",
    "status": "resuming",
    "n_leads": 824,
    "n_leads_processed": 523
}
POST
/bulk_action/delete/

Bulk delete all leads returned by a given search query.

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
{
}
POST
/bulk_action/edit/

Bulk edit all leads returned by a given search query.

Pass additional parameters depending on which type is passed:

  • set_lead_status will set the Lead Status on all leads. It expects:
    • lead_status_id - ID of the Lead Status to use
  • clear_custom_field will clear/remove/unset a specific custom field from all leads. It expects:
    • custom_field_name - Exact name of the custom field to remove
  • set_custom_field will set/update/add a specific custom field on all leads. It expects:
    • custom_field_name - Exact name of the custom field to set/add/update
    • custom_field_value - New value
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
{
}

Notifications

Notifications represent certain important events such as receiving a missed call, voicemail message, or email.

GET
/notification/{?membership_id, is_new}

List notifications

  • is_new: if true, only "new" (unhandled) notifications are returned.
curl -XGET "https://app.close.io/api/v1/notification/{?membership_id, is_new}"
Response Headers
Content-Type: application/json
Response Body
{
    "has_more": false,
    "data": [
        {
            "_type": "VoicemailNotification",
            "id": "noti_OJQKXvmFcHSAINW3t5n6K7PvvolkAASbXlFMdAwA2aC",
            "membership_id": "memb_babcVMzaksldjfzd9GjQai2VOmlvjXahOdEjpWD",
            "is_new": true,
            "voicemail_duration": 14,
            "voicemail_url": "https://s3.amazonaws.com/plivocloud/aaa-bbb-ccc.mp3",
            "phone": "+15553334444",
            "lead_id": null,
            "lead_name": null,
            "contact_id": null,
            "contact_name": null,
            "object_id": "acti_abcdRZWFk61HdSgCvPkMq4iKLJjm1guV7sdFeoGGw",
            "date_created": "2014-02-12T01:30:10.544000+00:00",
            "date_updated": "2014-02-12T01:30:10.544000+00:00"
        },
        {
            "_type": "IncomingEmailNotification",
            "id": "noti_imnxc3vesKIVMvXiFGwiRv81p0ycfMT5Fekn8TGn68b",
            "membership_id": "memb_babcVMzaksldjfzd9GjQai2VOmlvjXahOdEjpWD",
            "is_new": true,
            "subject": "Banana Stand Proposal",
            "emails": [
                "acti_derENVWYIycZRZTExQWBwvXtDYKWkRnVoxGGk868Cks"
            ],
            "lead_id": "lead_abcdefgFQ8i7EauS03IHFiLWwkXYcIEZS4uKK2Za376",
            "lead_name": "Bluth Company",
            "contact_id": "cont_masndfasdlZ5goFqAppaxsLkTXM2LlIU4IykgBUWn40",
            "contact_name": "Don Johnson",
            "object_id": "acti_ksadjfIc5p2LH3ehQbIzc7yHmM1UJO8vnyDl0eO7lra",
            "date_created": "2014-02-12T01:23:30.407000+00:00",
            "date_updated": "2014-02-12T01:23:30.407000+00:00"
        },
        {
            "_type": "MissedCallNotification",
            "id": "noti_Kvq0uxH9vYLNiOUzMtWW3FZhkaxA0gjFboh2rDxSRU5",
            "membership_id": "memb_babcVMzaksldjfzd9GjQai2VOmlvjXahOdEjpWD",
            "phone": "+15553033773",
            "is_new": true,
            "lead_id": null,
            "lead_name": null,
            "contact_id": null,
            "contact_name": null,
            "object_id": "acti_LCXeNu2W1jZ4HLi2cJaiEHKTOIqOuOEIltLPtpF6TVD",
            "date_created": "2014-02-12T01:23:30.211000+00:00",
            "date_updated": "2014-02-12T01:23:30.211000+00:00"
        }
    ]
}
GET
/notification/{id}/

Get a single Notification

curl -XGET "https://app.close.io/api/v1/notification/{id}/"
Response Headers
Content-Type: application/json
Response Body
{
    "_type": "VoicemailNotification",
    "id": "noti_OJQKXvmFcHSAINW3t5n6K7PvvolkAASbXlFMdAwA2aC",
    "membership_id": "memb_babcVMzaksldjfzd9GjQai2VOmlvjXahOdEjpWD",
    "is_new": true,
    "voicemail_duration": 14,
    "voicemail_url": "https://s3.amazonaws.com/plivocloud/aaa-bbb-ccc.mp3",
    "phone": "+15553334444",
    "lead_id": null,
    "lead_name": null,
    "contact_id": null,
    "contact_name": null,
    "object_id": "acti_abcdRZWFk61HdSgCvPkMq4iKLJjm1guV7sdFeoGGw",
    "date_created": "2014-02-12T01:30:10.544000+00:00",
    "date_updated": "2014-02-12T01:30:10.544000+00:00"
}
PUT
/notification/{id}/

Update a Notification. Usually used to mark a notification as "handled".

curl -XPUT "https://app.close.io/api/v1/notification/{id}/"
Request Headers
Content-Type: application/json
Request Body
{
    "is_new": false
}
Response Headers
Content-Type: application/json
Response Body
{
    "_type": "VoicemailNotification",
    "id": "noti_OJQKXvmFcHSAINW3t5n6K7PvvolkAASbXlFMdAwA2aC",
    "membership_id": "memb_babcVMzaksldjfzd9GjQai2VOmlvjXahOdEjpWD",
    "is_new": false,
    "voicemail_duration": 14,
    "voicemail_url": "https://s3.amazonaws.com/plivocloud/aaa-bbb-ccc.mp3",
    "phone": "+15553334444",
    "lead_id": null,
    "lead_name": null,
    "contact_id": null,
    "contact_name": null,
    "object_id": "acti_abcdRZWFk61HdSgCvPkMq4iKLJjm1guV7sdFeoGGw",
    "date_created": "2014-02-12T01:30:10.544000+00:00",
    "date_updated": "2014-02-12T01:30:10.544000+00:00"
}

Exports

This endpoint can be used to export data out of Close.io.

POST
/export/lead/

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.

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",
}
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",
}
POST
/export/opportunity/

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.

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'
}
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"
}
GET
/export/{id}/

Get a single Export (e.g. to check its status or get a download_url)

  • status can have one of these values: created, 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"
}
GET
/export/

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"
        },
        {
            "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"
        },
        {
            "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"
        },
        {
            "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"
        }
    ],
    "has_more": false
}