Authentication
Tenant admins create API credentials in the tenant admin panel under Settings, Customer API Credentials. The generated client_secret is displayed once, remains valid until its expiration date or revoke event, and is used only to request short-lived access tokens.
1. Exchange API credentials for an access token
Call the token endpoint with the client credentials grant. Access tokens expire after 1500 seconds.
curl -X POST https://api.acme.leadmanager.cloud/api/v1/oauth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "client_credentials",
"client_id": "2c8f65c2-8791-42e7-b08a-2d75f83ce6bd",
"client_secret": "lmapi_your_client_secret",
"scope": "leads:read leads:write"
}'
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 1500,
"scope": "leads:read leads:write",
"client_id": "2c8f65c2-8791-42e7-b08a-2d75f83ce6bd",
"issued_at": "2026-06-28T14:00:00.000Z",
"expires_at": "2026-06-28T14:25:00.000Z"
}
2. Send the access token on API calls
Authorization: Bearer <access_token>
Do not send the long-lived client_secret to data endpoints. If the credential is revoked, existing resource requests are denied even before the access token expires.
Optional basic authentication for the token endpoint
The token endpoint also accepts HTTP Basic authentication where the username is client_id and the password is client_secret.
curl -X POST https://api.acme.leadmanager.cloud/api/v1/oauth/token \
-u "2c8f65c2-8791-42e7-b08a-2d75f83ce6bd:lmapi_your_client_secret" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&scope=leads:read"
Endpoints
| Method |
Path |
Scope |
Purpose |
| POST | /oauth/token | client_credentials | Exchange API credentials for an access token. |
| GET | /leads | leads:read | List leads with filters and pagination. |
| GET | /leads/{leadId} | leads:read | Get one lead with activity, callbacks, phone records, and DNC status. |
| POST | /leads | leads:write | Add one lead. |
| POST | /leads/bulk | leads:bulk_write | Add up to 500 leads in one request. |
| GET | /users | users:read | List tenant users. |
| POST | /users | users:write | Create a tenant user and send the welcome email/reset link when email is configured. |
| GET | /callbacks | callbacks:read | List scheduled callbacks. |
| GET | /callbacks/{callbackId} | callbacks:read | Get one callback. |
| POST | /callbacks | callbacks:write | Create a callback for a lead. |
| GET | /reports | reports:read | Get summary, source, lead set, disposition, activity, callback, fronter, and closer performance data. |
| GET | /reports/leads | reports:read | Get report lead rows with pagination. |
| GET | /docs | Any active access token | Return machine-readable API metadata. |
POST /oauth/token
Returns a short-lived access token for data endpoints.
grant_type | Required. Must be client_credentials. |
client_id | Required unless sent through Basic auth. |
client_secret | Required unless sent through Basic auth. |
scope | Optional space-delimited scope subset. |
POST /leads
Creates a lead. Include source to identify where the lead originated.
curl -X POST https://api.acme.leadmanager.cloud/api/v1/leads \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"firstName": "John",
"lastName": "Smith",
"phone": "+1555019283",
"altPhone": "+1555019284",
"email": "john.smith@example.com",
"source": "website_form",
"leadTier": "A",
"notes": "Requested a callback"
}'
{
"success": true,
"lead": {
"leadId": "lead_7d3c2f",
"name": "John Smith",
"phone": "+1555019283",
"email": "john.smith@example.com",
"source": "website_form",
"submittedAt": "2026-06-28T14:08:31.000Z"
}
}
GET /leads
Returns leads for the tenant. Accepted filters include q, tier, disposition, assignee, stat, sort, and direction.
curl "https://api.acme.leadmanager.cloud/api/v1/leads?page=1&limit=50&source=website_form" \
-H "Authorization: Bearer $ACCESS_TOKEN"
POST /leads/bulk
Adds up to 500 leads per request. Use sourceFile to label the source batch.
curl -X POST https://api.acme.leadmanager.cloud/api/v1/leads/bulk \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"sourceFile": "partner-upload-2026-06-28.csv",
"defaultLeadTier": "B",
"applyLeadTier": true,
"leads": [
{
"name": "Mary Johnson",
"phone": "+1555019200",
"email": "mary@example.com",
"source": "partner_feed"
},
{
"firstName": "Alex",
"lastName": "Rivera",
"phone": "+1555019201",
"source": "partner_feed"
}
]
}'
GET /users
Lists tenant users. Accepted filters include page, limit, q, role, and isAdmin.
curl "https://api.acme.leadmanager.cloud/api/v1/users?page=1&limit=50&role=fronter" \
-H "Authorization: Bearer $ACCESS_TOKEN"
POST /users
Creates a tenant user. Use tempPassword with changePasswordOnNextLogin when an integration sets the initial password.
curl -X POST https://api.acme.leadmanager.cloud/api/v1/users \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"displayName": "Taylor Brooks",
"username": "taylor.brooks",
"email": "taylor@example.com",
"role": "fronter",
"isAdmin": false,
"tempPassword": "TempPass-ChangeMe-2026",
"changePasswordOnNextLogin": true
}'
POST /callbacks
Creates a scheduled callback attached to a lead.
curl -X POST https://api.acme.leadmanager.cloud/api/v1/callbacks \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"leadId": "lead_7d3c2f",
"scheduledAt": "2026-06-29T16:30:00Z",
"assignedToEmail": "taylor@example.com",
"note": "Customer requested an afternoon callback"
}'
GET /callbacks
Lists callbacks. Accepted filters include from, until, status, assignedTo, leadId, and q.
curl "https://api.acme.leadmanager.cloud/api/v1/callbacks?from=2026-06-28&until=2026-06-30&status=open" \
-H "Authorization: Bearer $ACCESS_TOKEN"
GET /reports
Returns report summary data for the selected filters, including fronterPerformance and closerPerformance arrays. Accepted filters include dateStart, dateEnd, dateField, q, disposition, outcome, source, sourceFile, assignee, state, and limit.
curl "https://api.acme.leadmanager.cloud/api/v1/reports?dateStart=2026-06-01&dateEnd=2026-06-30&source=website_form" \
-H "Authorization: Bearer $ACCESS_TOKEN"
GET /reports/leads
Returns report lead rows with pagination and the same report filters.
curl "https://api.acme.leadmanager.cloud/api/v1/reports/leads?page=1&limit=100&dateStart=2026-06-01&dateEnd=2026-06-30" \
-H "Authorization: Bearer $ACCESS_TOKEN"