Skip to content

Getting Started

The sheepAPI is the platform that supports sheepCRM, sheepTeams and sheepApp and the many partners that connect to Sheep data. The API is divided into two parts: the core system API and the self-service API. For apps wanting to provide an interface for a single contact, the self-service API will be of most use. The core API gives access to all data.

You need to have already registered for a Sheep database and have an active user account.

We’ll use the wonderful httpie HTTP client in this document. See their site for installation instructions for your platform.

Sheep APIs follow the RESTful design model wherever possible. HTTP verbs should be expected to work on all resources unless otherwise documented. We recommend testing API calls using httpie before implementing in code.

The examples will frequently refer to $FLOCK in the URL. You should replace this with the database that you want to work with. On a Mac use:

Terminal window
export FLOCK=example

Then most URL examples can be copied directly.

Verify that the API is available and that your environment is working properly.

http https://api.sheepcrm.com/api/v1/ping/
HTTP/1.1 200 OK
{
"message": "pong"
}

Once you have successfully pinged the API, try an authenticated call. To do this you will need to set two environment variables or replace the tokens with your actual values in the example.

export FLOCK=example
export API_KEY=my-secret-api-key
http https://api.sheepcrm.com/api/v1/$FLOCK/ Authorization:"Bearer $API_KEY"

Or with the values inline:

http https://api.sheepcrm.com/api/v1/example/ Authorization:"Bearer my-secret-api-key"

You are expecting an HTTP 200 response with a list of resources. A 403 FORBIDDEN response indicates a problem with your API key or your permissions.