Get Contacts
Contacts API
List Contacts
Retrieve a list of contacts with filtering and pagination
GET
Get Contacts
List Contacts
This endpoint allows you to retrieve a list of contacts for a company with optional filtering and pagination.Headers
| Parameter | Type | Description |
|---|---|---|
| X-API-KEY | string | Formation API Key (required) |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| company_id | string | Yes | Company ID to filter contacts |
| skip | string | No | Number of records to skip (pagination) |
| limit | string | No | Number of records to return (pagination) |
| search | string | No | Search term to filter contacts |
| sort | string | No | Field to sort by |
| order | string | No | Sort order: “asc” or “desc” |
| created_at | string | No | Created at filter |
| created_at_value | string | No | Created at value |
| end_date | string | No | End date filter |
Parameter Examples
- Basic request:
GET /contacts?company_id=64b8f1a2e4b0c8d9f0123456 - With pagination:
GET /contacts?company_id=64b8f1a2e4b0c8d9f0123456&skip=0&limit=10 - With search:
GET /contacts?company_id=64b8f1a2e4b0c8d9f0123456&search=john - With sorting:
GET /contacts?company_id=64b8f1a2e4b0c8d9f0123456&sort=created_at&order=desc
Response
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| success | boolean | Indicates if the operation was successful |
| message | string | Additional information about the operation |
| data | object | Response data for successful requests |
| data.contacts | array | Array of contact objects |
| data.total | integer | Total number of contacts |
| data.skip | integer | Number of records skipped |
| data.limit | integer | Number of records returned |
Contact Object Fields
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the contact |
| created_at | integer | Creation timestamp |
| updated_at | integer | Last update timestamp |
| type | string | Contact type (“customer” or “vendor”) |
| status | string | Contact status |
| full_name | string | Full name of the contact |
| string | Email address | |
| description | string | Contact description |
| cc_emails | array | CC email addresses |
| bcc_emails | array | BCC email addresses |
| billing | object | Billing information |
Error Responses
Invalid Request (400)
Unauthorized (401)
Company Not Found (404)
Internal Server Error (500)
Authorizations
Formation API key for authentication.
Query Parameters
Company ID
Number of records to skip
Number of records to return
Search term
Sort field
Sort order (asc/desc)
Available options:
asc, desc Created at filter
Created at value
End date filter