Use the SnapCRM API to add leads from your own apps, scripts, or integrations. This guide is public; to use the API you need an account and an API key.
The API is available to SnapCRM users only. To use it:
Every API request must include your API key. You can send it in either of these ways:
Option A: X-API-Key header (recommended)
X-API-Key: snap_your_api_key_here
Option B: Authorization Bearer
Authorization: Bearer snap_your_api_key_here
Never share your API key or commit it to version control. Store it in environment variables or a secrets manager.
Send requests to your SnapCRM site. For example:
https://your-snapcrm-site.com/api/v1/leads
Replace with your actual domain (e.g. https://snapcrm.app).
Add a new lead with a POST request. The lead is created under your account (and your team, if you have one).
Request
POST /api/v1/leads
Content-Type: application/json
X-API-Key: snap_your_api_key_here
{
"firstName": "Jane",
"lastName": "Smith",
"email": "[email protected]",
"phone": "+1 555-123-4567",
"company": "Acme Inc",
"website": "https://acme.com",
"source": "website",
"address": "123 Main St",
"city": "New York",
"state": "NY",
"zipcode": "10001"
}Required fields
firstName (string)lastName (string)Optional fields
email, phone, company, websitesource (e.g. website, referral, cold_call)address, city, state, zipcodetagId (ID of an existing tag to assign)Success response (201 Created)
{
"id": "clx...",
"firstName": "Jane",
"lastName": "Smith",
"email": "[email protected]",
"status": "new",
"createdBy": { ... },
"tags": [],
...
}cURL example
curl -X POST "https://your-site.com/api/v1/leads" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"firstName":"Jane","lastName":"Smith","email":"[email protected]"}'Each API key is limited to a number of requests per minute (default is 200). Your limit can be increased by an admin.
X-RateLimit-Limit and X-RateLimit-Remaining headers.Retry-After header (in seconds).To avoid hitting the limit, cache results when possible and space out bulk creates (e.g. add a short delay between requests).
Unauthorized
Missing or invalid API key. Create an account, sign in, and generate a key in Settings → API Access.
Bad Request
Invalid JSON or missing required fields (e.g. firstName, lastName).
Conflict
A lead with the same email or name already exists in your account.
Too Many Requests
Rate limit exceeded. Wait and retry; check Retry-After header.
X-API-Key or Authorization: Bearer <key> with every request.