Base URL
/api prefix, for example GET /api/account. Combine the base URL and documented path directly:
Authentication
All public API requests require a Puffle API key as a Bearer token in theAuthorization header. API keys are prefixed with pk_live_.
Generating an API key
- Log in to the Puffle dashboard
- Navigate to Settings -> API
- Click Generate API key
- Copy and store the key. It is shown only once.
Revoking an API key
Keys can be revoked from the dashboard or through the session-authenticated/api/user/api-key API key endpoint. Revocation is immediate, and in-flight requests using the revoked key fail with 401.
Session authentication
A small set of API key endpoints, specifically those that create, view, and revoke API keys (/api/user/api-key), use session-based authentication through browser cookies rather than Bearer tokens. These are designed to be called from the Puffle dashboard UI, not from your backend integration.
Security best practices
Never expose keys in client-side code
Never expose keys in client-side code
API keys grant full access to your Puffle account. Always make API calls from your backend, never from browser JavaScript or mobile apps where the key could be extracted.
Use environment variables
Use environment variables
Store your key in an environment variable (
PUFFLE_API_KEY) and reference it in code. Never hard-code keys or commit them to version control.Rotate keys periodically
Rotate keys periodically
Generate a new key and update your services before revoking the old one to avoid downtime.
Monitor for unauthorized access
Monitor for unauthorized access
Rate Limits
Rate limits are endpoint-specific. Some routes enforce their own cooldowns or protective limits, and upstream providers may also return rate-limit errors. The endpoint page is the source of truth for request size and polling guidance. If you receive a429 Too Many Requests response, respect the Retry-After
header when it is present. If there is no Retry-After, back off
exponentially and avoid tight polling loops.
Rate-limit response
Handling rate limits
Use exponential backoff
If
Retry-After is not present, implement exponential backoff starting at 1 second.Errors
Public Bearer-authenticated routes generally return the structured error envelope below for framework-level authentication, method, validation, and typed route errors:error.code as stable when it is present; otherwise handle the
HTTP status and human-readable error message.
HTTP Status Codes
| Status | Meaning | When It Happens |
|---|---|---|
200 | OK | Successful GET, PATCH, PUT, or POST that returns data |
201 | Created | Successful resource creation (POST) |
204 | No Content | Successful deletion or action with no response body |
400 | Bad Request | Invalid body, missing required fields, or constraint violation |
401 | Unauthorized | Missing or invalid Bearer token / session |
403 | Forbidden | Valid auth but insufficient permissions |
404 | Not Found | Resource does not exist or does not belong to your account |
409 | Conflict | Resource already exists (e.g., duplicate signal type name) |
422 | Unprocessable Entity | Well-formed but semantically invalid request |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Unexpected server error |
Error Codes
| Code | Description |
|---|---|
unauthorized | Missing or invalid authentication credentials |
not_found | The requested resource does not exist |
invalid_request | Body or parameters are invalid, or a constraint was violated |
rate_limited | Endpoint or provider rate limit hit |
conflict | Resource already exists |
internal_error | Unexpected server error |
Pagination
Pagination is endpoint-specific. Most Leads, Signals, and Enrichment list endpoints use cursor pagination; Unibox and some Campaign endpoints usepage; Lead Search task results use offset. Use the query parameters shown on
each endpoint page.
Common cursor parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer | Items to return. Maximum and default vary by endpoint. |
cursor | string | ID of the last item from the previous page. |
Response Shape
cursor is null and hasMore is false, you have reached the last page. count is the number of items on the current page.
For endpoints that return page, offset, total, or nextCursor instead,
follow the response fields documented on that endpoint.