Authentication
All API requests must include a Bearer token in the Authorization header. Create API keys from the Integrations page in your dashboard. Tokens are hashed with SHA-256 — the raw key is only shown once at creation time.
If the token is invalid, revoked, or expired the API returns 401 Unauthorized.
Rate Limiting
API requests are rate-limited to 100 requests per minute per company. If you exceed the limit, the API returns 429 Too Many Requests. Wait and retry after the window resets.
Pagination
All list endpoints support pagination via query parameters. The response includes a meta object with the total count.
| Parameter | Type | Default | Description |
|---|---|---|---|
| page | integer | 1 | Page number (starts at 1) |
| per_page | integer | 25 | Items per page (max 100) |
API Scopes
Each API token is created with specific scopes that control what resources it can access. If a token lacks the required scope, the API returns 403 Forbidden.
Leads
Returns a paginated list of leads for your company. Supports filtering by pipeline stage, AI status, and text search.
leads:readQuery Parameters
| Parameter | Type | Description |
|---|---|---|
| pageoptional | integer | Page number (default 1) |
| per_pageoptional | integer | Results per page, max 100 (default 25) |
| stageoptional | string | Filter by pipeline stage: new_lead, follow_up, quote_in_progress, quoted, closed_won, closed_lost |
| ai_statusoptional | string | Filter by AI status: hot, warm, cold, new |
| searchoptional | string | Search by name, phone, or email (case-insensitive) |
Example Request
Example Response
Creates a new lead for your company. At least name or phone is required. Fires a lead.created webhook event.
Request Body (JSON)
| Field | Type | Description |
|---|---|---|
| nameoptional | string | Full name of the lead |
| first_nameoptional | string | First name |
| last_nameoptional | string | Last name |
| emailoptional | string | Email address |
| phoneoptional | string | Phone number (E.164 format) |
| pipeline_stageoptional | string | Initial pipeline stage (default: new_lead) |
| sourceoptional | string | Lead source (e.g. "website", "zapier") |
| custom_dataoptional | object | Custom key-value data |
| metadataoptional | object | Additional metadata |
Example Request
Example Response (201)
Returns the full details of a single lead by ID. Returns 404 if the lead doesn't exist or belongs to a different company.
Example Request
Example Response
Updates an existing lead. Only include the fields you want to change. Fires a lead.updated webhook event.
Request Body (JSON)
| Field | Type | Description |
|---|---|---|
| nameoptional | string | Full name |
| first_nameoptional | string | First name |
| last_nameoptional | string | Last name |
| emailoptional | string | Email address |
| phoneoptional | string | Phone number |
| pipeline_stageoptional | string | Pipeline stage |
| sourceoptional | string | Lead source |
| ai_enabledoptional | boolean | Enable/disable AI for this lead |
| custom_dataoptional | object | Custom data |
| metadataoptional | object | Metadata |
Example Request
Quotes
Returns a paginated list of quotes. Optionally filter by status.
quotes:readQuery Parameters
| Parameter | Type | Description |
|---|---|---|
| statusoptional | string | Filter by status: draft, sent, viewed, accepted, declined |
| pageoptional | integer | Page number |
| per_pageoptional | integer | Results per page |
Example Response
Returns full details of a quote including line items and metadata.
quotes:readExample Response
SMS
Send an SMS message to a lead via your company's configured Twilio number. The message is stored in the conversation thread. SMS credits are deducted automatically.
sms:sendRequest Body (JSON)
| Field | Type | Description |
|---|---|---|
| lead_idrequired | string | UUID of the lead to message |
| messagerequired | string | SMS body text |
Example Request
Example Response
Error Responses
| Status | Description |
|---|---|
| 400 | Missing lead_id or message, or lead has no phone |
| 402 | Insufficient SMS credits |
| 404 | Lead not found or belongs to different company |
Appointments
Returns a paginated list of appointments, including the associated lead details. Optionally filter by type.
appointments:readQuery Parameters
| Parameter | Type | Description |
|---|---|---|
| typeoptional | string | Filter by appointment type: callback, onsite |
| pageoptional | integer | Page number |
| per_pageoptional | integer | Results per page |
Example Response
Pipeline
Returns the count of leads in each pipeline stage for your company.
pipeline:readExample Response
Webhooks
Configure webhook endpoints in your dashboard under Integrations → Webhooks. When events occur, QuoteLeadsHQ sends a POST request to your URL with the event payload. Each delivery is signed with HMAC-SHA256 using your webhook secret.
Verify the signature by computing HMAC-SHA256(webhook_secret, request_body) and comparing it to the X-Webhook-Signature header. The event type is in the X-Webhook-Event header.
Available Events
Webhook Payload
Signature Verification (Node.js example)
Error Codes
The API uses standard HTTP status codes. All error responses include an error field with a human-readable message.
