Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A lightweight JSON-RPC + CURL wrapper to access Nutshell CRM's API.
branch: master

Merge pull request #4 from nutshellcrm/better-401

Throw exception on JSON-RPC error in endpoint discovery
latest commit 03f0f17206
@flav flav authored

This is some sample code which will help you get started using Nutshell's API in your PHP application. This repository contains:

  • a lightweight JSON-RPC + CURL wrapper to ease making API calls and manage authentication and endpoint discovery
  • several examples which use that class to perform certain tasks in Nutshell

Running the Examples

Once you've cloned the repository, and assuming PHP is in your path:

  1. set your Nutshell username and API key at the top of each PHP file in the examples directory
  2. run php examples/create.php (or edit.php or retrieve.php)

Using the API

The NutshellApi class (in NutshellApi.php) provides a lightweight JSON-RPC + CURL wrapper for the API which you can use for development. The class handles authentication and endpoint discovery. It should be instantiated once with a username and API key and, once instantiated, it should be reused for subsequent API calls.

See the API method list for a list of valid API methods.

Read the comments in NutshellApi.php for additional information about the class, and open the example files to see how the NutshellApi class is used.

The NutshellApi class provides synchronous (blocking) API calls. It is possible to write an API class which provides asynchronous calls using the id field specified in JSON-RPC.

Additional Reading

About Nutshell

Nutshell is building modern CRM software around the needs of medium-sized companies. We’re working hard to deliver the future of business software: enterprise-level features with the ease-of-use found in popular web applications.

At Nutshell, mobile is in our DNA. We believe in designing software to be cross-platform from day one, with robust APIs and native user interfaces. Our iPhone and Android applications are built using this API.

The data you store in Nutshell belongs to you, and we've designed our open API to make it possible for you to work with it however you wish. Please contact us with any questions on using the API.

Something went wrong with that request. Please try again.