Skip to main content
The Sprig API is organized around REST. It uses resource-oriented URLs, JSON request and response bodies, standard HTTP methods, and standard HTTP status codes. 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 runs against Production data or Development data. Members with the Organization Admin, Workspace Admin, or Developer roles can view the API keys; creating, rotating, and revoking keys is handled by Organization Admins and Workspace Admins.

Study API V2

Create and manage shareable and in-product surveys.

Study API authentication

Use environment API keys safely.

Find your API keys

Sprig Environment IDs are not API credentials. Each environment has a separate API key. To find your authorization keys:
  1. In the Navigation Pane, click Integrations.
  2. Click Enrichment under the Sources section.
  3. Click Data Import API.
  4. Click on the appropriate Environment ID and then click the copy icon 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 an authentication scheme followed by the credential. Use API-Key for environment API keys on V2 endpoints. Legacy V1 export endpoints use Bearer.
For example, list Studies with a V2 environment API key:
See Study API authentication for credential-handling guidance. If you need assistance using the Sprig API, email support@sprig.com. All API requests must use HTTPS. Plain HTTP requests and unauthenticated requests fail.
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. For the event to become usable by Sprig once it is triggered, you must approve the event in Events > Manage Requests.

Rate limiting

Rate limits are separate from API and plan availability. Enterprise customers have an API rate limit of 1000 queries per second. If you need a higher limit, or you are on a Starter or Free plan and are interested in API access, please reach out to support@sprig.com. Requests that are too big to process in a reasonable amount of time will fail with a timeout error. Use parameters to limit the scope of your request and prevent timeouts.