Authentication
Learn how to authenticate requests to the Salesly Developer API.
All Salesly API requests require authentication via an API key.
API Key
Include your API key in the x-api-key header on every request:
curl -X GET "https://rest.salesly.app/api/v1/developers/health" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept: application/json"Getting Your API Key
- Log in to Salesly CRM
- Go to Settings → Integrations
- Copy your API Key
Each Salesly account has one API key. The key has full access to all Developer API endpoints.
Security Best Practices
- Never expose your API key in client-side code, public repositories, or URLs
- Store keys in environment variables or a secrets manager
- Rotate your key if you suspect it has been compromised (regenerate in Settings → Integrations)
- Use HTTPS only — all API requests must use
https://
Required Headers
Every request should include these headers:
| Header | Value | Required |
|---|---|---|
x-api-key | Your API key | Yes |
Accept | application/json | Recommended |
Content-Type | application/json | Required for POST/PUT/PATCH |
Authentication Errors
Missing or invalid API keys return 401 Unauthorized:
{
"error": {
"type": "unauthorized",
"message": "Invalid API key."
}
}Request Tracing
Every response includes an X-Request-ID header. You can also send your own X-Request-ID (UUID format) to correlate requests with logs:
curl -X GET "https://rest.salesly.app/api/v1/developers/contacts/types" \
-H "x-api-key: YOUR_API_KEY" \
-H "X-Request-ID: 550e8400-e29b-41d4-a716-446655440000"The same ID is echoed back in the response header for debugging.