Python API Client & Examples for
Clone or download
Pull request Compare This branch is 46 commits behind closeio:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
requirements.txt API

A convenient Python wrapper for the API.

See the developer docs at For any questions or issues, please contact support(at)close(dot)io.

Sample Usage

from closeio_api import Client
import urllib

api = Client('YOUR_API_KEY')

# post a lead
lead ='lead', data={'name': 'New Lead'})

# get 5 most recently updated opportunities
opportunities = api.get('opportunity', data={'_order_by': '-date_updated', '_limit': 5})

# fetch multiple leads (using search syntax)
lead_results = api.get('lead', data={
    '_limit': 10,
    '_fields': 'id,display_name,status_label',
    'query': 'custom.my_custom_field:"some_value" status:"Potential" sort:updated'

Check out scripts/ for more detailed examples.

Running a script

$ git clone
$ cd closeio-api
$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ python script/ -k MYAPIKEY 

Other Languages

Thanks to our awesome users, other languages are supported, too: