Salesly API

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:

Example 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

  1. Log in to Salesly CRM
  2. Go to Settings → Integrations
  3. 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:

HeaderValueRequired
x-api-keyYour API keyYes
Acceptapplication/jsonRecommended
Content-Typeapplication/jsonRequired for POST/PUT/PATCH

Authentication Errors

Missing or invalid API keys return 401 Unauthorized:

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:

Custom request ID
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.