Skip to content

Authentication

All API requests (except webhooks) require authentication. 500 Leads supports two methods:

When you log in through the dashboard, you receive a JWT access token and a refresh token. These are managed automatically by the frontend.

For programmatic use, you can obtain tokens via:

POST /api/auth/login
{
"email": "[email protected]",
"password": "your-password"
}

Response:

{
"token": "eyJhbGciOiJIUzI1NiIs...",
"refreshToken": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"id": "usr_...",
"email": "[email protected]",
"name": "Your Name"
}
}

Include the token in subsequent requests:

Terminal window
curl https://leads.500rockets.io/api/leads \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
Section titled “2. API Keys (Recommended for integrations)”

API keys are the recommended way to authenticate external integrations, scripts, and third-party tools.

Go to Settings > API Keys in the dashboard and click Generate New Key. You will see the full key once. Copy it immediately and store it securely.

Keys look like: 5l_live_a1b2c3d4e5f6...

Include the key in the X-API-Key header:

Terminal window
curl https://leads.500rockets.io/api/leads \
-H "X-API-Key: 5l_live_a1b2c3d4e5f6..."

Or in the Authorization header:

Terminal window
curl https://leads.500rockets.io/api/leads \
-H "Authorization: ApiKey 5l_live_a1b2c3d4e5f6..."
ScopeDescription
readCan read leads, sources, pipelines, and stats. Cannot create, update, or delete.
fullFull read and write access. Can create leads, update statuses, manage tags, etc.
EndpointDescription
GET /api/api-keysList all keys (admin only)
POST /api/api-keysGenerate a new key
PATCH /api/api-keys/:idUpdate label or active status
DELETE /api/api-keys/:idPermanently delete a key
  • Keys are hashed with SHA-256 before storage. We never store the plaintext key.
  • You can revoke a key at any time by toggling it to inactive or deleting it.
  • Set an expiration date for keys used in temporary integrations.

All API requests are rate-limited to 100 requests per minute per IP address. If you exceed this limit, you will receive a 429 Too Many Requests response.

All error responses follow this format:

{
"error": "Human-readable error message"
}
StatusMeaning
400Bad request (validation error)
401Missing or invalid authentication
403Insufficient permissions (e.g. read-only key trying to write)
404Resource not found
429Rate limit exceeded
500Server error