The Sprig API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Sprig offers API access to both your Production and Development environments. You can use your Development environment to validate your usage of the Sprig API before interacting with your live data. The API key you use to authenticate the request determines whether the request is against Production data or Development data. Team members with the Admin or Developer roles can see the API Keys.

Find Your API Keys

Sprig Environment IDs are not used to manage access to the Sprig API, but you will have separate keys for each environment. Environment IDs are appended to a string describing the authentication type. To Find your Authorization Keys:

  1. In the Navigation Pane click Integrations.
  2. Click Enrichment under the Sources section.
  3. Click Public API.
  4. Click on the appropriate Environment ID and then copy to copy a key.

Authentication

❗️

Protect your API Key

Your keys grant access to your data stored in Sprig, so be sure to keep them secure!
Treat your API key as if it were your account password.
Do not share your API keys in publicly accessible areas such as GitHub, client-side code, or support chats.

Authentication to the API is performed via the HTTP Authorization Header. Include this header on all requests to the API.

Sprig uses key words followed by the API keys to authenticate requests to the Public API. Depending on the end-point you will have to prepend either API-Key (v2 API) or Bearer (export API).

API-Key 8abaf7cb-fake-fake-fake-c608317728bd
Bearer 8abaf7cb-fake-fake-fake-c608317728bd

Using the command-line tool curl, you would use the following snippet to include the API key with a request.

curl https://api.sprig.com/v1/users/1234567890 \
 -H "Authorization: API-Key 8abaf7cb-fake-fake-fake-c608317728bd"

HTTP clients in all programming languages allow for custom headers to be set. If you need assistance using the Sprig API with a specific language, please email [email protected].

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

πŸ“˜

Info

New code events must be approved in the Sprig app. If you are adding an event for the first time, it will not automatically appear in the Events table. In order for the event to become usable by Sprig once it is triggered, you must approve the event in Events > Manage Requests.

Rate Limiting

Free and Starter customers have an API rate limit of 100 queries per second.

Enterprise customers have an API rate limit of 1000 queries per second.

If you need a higher limit, please reach out to [email protected].

Requests that are too big to process in a reasonable amount of time will fail with a timeout error, please use parameters to limit the scope of your request to prevent time outs.