curl --request GET \
--url https://api.clemta.com/contacts \
--header 'X-API-Key: <api-key>'{
"success": true,
"message": "Contacts retrieved successfully",
"data": {
"contacts": [
{
"id": "64b8f1a2e4b0c8d9f0123456",
"created_at": 1640995200,
"updated_at": 1640995200,
"type": "customer",
"status": "active",
"full_name": "John Doe",
"email": "[email protected]",
"description": "Primary contact for the company",
"cc_emails": [
"[email protected]",
"[email protected]"
],
"bcc_emails": [
"[email protected]",
"[email protected]"
],
"billing": {
"email": "[email protected]",
"phone": "1234567890",
"phone_code": "+1",
"iso_code": "US",
"country": "United States",
"address_1": "123 Main Street",
"address_2": "Suite 100",
"postal_code": "12345",
"district": "Downtown",
"state": "CA",
"province": "California",
"tax_id": "12-3456789"
}
}
],
"total": 123
}
}Retrieve a list of contacts with filtering and pagination
curl --request GET \
--url https://api.clemta.com/contacts \
--header 'X-API-Key: <api-key>'{
"success": true,
"message": "Contacts retrieved successfully",
"data": {
"contacts": [
{
"id": "64b8f1a2e4b0c8d9f0123456",
"created_at": 1640995200,
"updated_at": 1640995200,
"type": "customer",
"status": "active",
"full_name": "John Doe",
"email": "[email protected]",
"description": "Primary contact for the company",
"cc_emails": [
"[email protected]",
"[email protected]"
],
"bcc_emails": [
"[email protected]",
"[email protected]"
],
"billing": {
"email": "[email protected]",
"phone": "1234567890",
"phone_code": "+1",
"iso_code": "US",
"country": "United States",
"address_1": "123 Main Street",
"address_2": "Suite 100",
"postal_code": "12345",
"district": "Downtown",
"state": "CA",
"province": "California",
"tax_id": "12-3456789"
}
}
],
"total": 123
}
}| Parameter | Type | Description |
|---|---|---|
| X-API-KEY | string | Formation API Key (required) |
| 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 |
GET /contacts?company_id=64b8f1a2e4b0c8d9f0123456GET /contacts?company_id=64b8f1a2e4b0c8d9f0123456&skip=0&limit=10GET /contacts?company_id=64b8f1a2e4b0c8d9f0123456&search=johnGET /contacts?company_id=64b8f1a2e4b0c8d9f0123456&sort=created_at&order=desc{
"success": true,
"message": "Contacts retrieved successfully",
"data": {
"contacts": [
{
"id": "64b8f1a2e4b0c8d9f0123456",
"created_at": 1686787200,
"updated_at": 1686787200,
"type": "customer",
"status": "active",
"full_name": "John Doe",
"email": "[email protected]",
"description": "Primary customer contact",
"cc_emails": ["[email protected]"],
"bcc_emails": ["[email protected]"],
"billing": {
"email": "[email protected]",
"phone": "+1234567890",
"phone_code": "+1",
"iso_code": "US",
"country": "United States",
"address_1": "123 Main St",
"address_2": "Suite 100",
"postal_code": "12345",
"district": "Downtown",
"state": "CA",
"province": "California",
"tax_id": "12-3456789"
}
}
],
"total": 1,
"skip": 0,
"limit": 10
}
}
| 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 |
| 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 |
{
"success": false,
"message": "Invalid request data",
"error": {
"code": "INVALID_REQUEST",
"details": "Company ID is required"
}
}
{
"success": false,
"message": "API key is required",
"error": {
"code": "API_KEY_REQUIRED"
}
}
{
"success": false,
"message": "Company not found",
"error": {
"code": "COMPANY_NOT_FOUND"
}
}
{
"success": false,
"message": "Internal server error",
"error": {
"code": "INTERNAL_ERROR"
}
}
Formation API key for authentication.
Company ID
Number of records to skip
Number of records to return
Search term
Sort field
Sort order (asc/desc)
asc, desc Created at filter
Created at value
End date filter