This API is deprecated.

We have launched a new version of Batchbook and it has its own API which can be found here.

Please do not develop new integrations agains this API! We are leaving it this documentation in place soley as a reference for developers supporting existing integrations with “Batchbook Classic.”

BatchBook API

Introduction

The BatchBook API is an XML REST interface for accessing your account. We have a Ruby library to make this process easy but provide examples here with curl. API access is limited to one request per second.

Authentication

The BatchBook API uses a token-based system of authentication. Your BatchBook API Token can be found (and reset) in the sidebar of the Sync tab in BatchBook. Authenticate all your API calls with HTTP Basic Authentication, using your API token as the username, and any dummy password (such as ‘x’ in the example below).

The code to do this will depending on the tools you're using, but for example, you could use curl to authenticate and request a list of the people in your account, like so:

Request

    
      curl -u #{api_key}:x -X GET https://#{your_account}.batchbook.com/service/people.xml
    
  

Curl Examples

While many libraries can query a restful api, sometimes it is easier to try one call at a time. For this I use curl. The following are four simple curl commands to manipulate a Company via the API.

Create

    
       curl -u #{api_key}: -X POST https://#{your_account}.batchbook.com/service/companies.xml \
       -d "<company><name>foo company</name><notes>Awesome foo</notes></company>" \
       -H "Content-Type: application/xml" -v
    
  

Read

    
       curl -u #{api_key}: -X GET https://#{your_account}.batchbook.com/service/companies/11899
    
  

Update

    
       curl -u #{api_key}: -X PUT https://#{your_account}.batchbook.com/service/companies/11899.xml \
       -d "<company><name>bar company</name><notes>Much better than the foo place</notes> \
       </company>" -H "Content-Type: application/xml" -v
    
  

Destroy

    
      curl -u #{api_key}: -X DELETE https://#{your_account}.batchbook.com/service/companies/11899.xml
    
  

Services

Libraries & Sample Code

We currently have a Ruby library and a PHP library which implement most of the API methods.

Developers Forum

Visit our Developers Forum with any questions or feedback you have. We'd also love to hear about what you're building with the BatchBook API.

BatchMakers

See what people are building with the BatchBook API.