contacts:writeFEATURE_LIMIT_EXCEEDED error is returned with details about current usage and maximum allowed.| Field | Type | Required | Validation | Description |
|---|---|---|---|---|
firstname | string | Yes | max:255 | First name |
lastname | string | Yes | max:255 | Last name |
phone | string | Yes | max:20, unique per tenant | Phone number with country code |
type | string | Yes | lead, customer, guest | Contact type |
source_id | integer | Yes | must exist in tenant sources | Source ID |
status_id | integer | Yes | must exist in tenant statuses | Status ID |
email | string | No | email, max:191, unique per tenant | Email address |
company | string | No | max:255 | Company name |
description | string | No | — | Additional notes |
city | string | No | max:255 | City |
state | string | No | max:255 | State/province |
zip | string | No | max:20 | ZIP/postal code |
address | string | No | max:500 | Street address |
country_id | integer | No | — | Country ID |
assigned_id | integer | No | — | User ID to assign contact to |
groups | array | No | array of integers | Array of group IDs to assign |
ContactResource format with groups auto-loaded. Includes message: "Contact created successfully".| Status | Code | Description |
|---|---|---|
| 422 | VALIDATION_ERROR | Validation failed (missing required fields, duplicate phone/email, invalid source_id/status_id) |
| 403 | FEATURE_LIMIT_EXCEEDED | Tenant contact limit reached. Response includes feature, current, and maximum in error details |
| 500 | INTERNAL_ERROR | Failed to create contact |
| Field | Message |
|---|---|
firstname | First name is required |
lastname | Last name is required |
phone | Phone number is required / This phone number already exists |
email | This email address already exists |
type | Type must be either lead, customer, or guest |
source_id | The selected source does not exist or does not belong to your account |
status_id | The selected status does not exist or does not belong to your account |
curl --location --request POST '/contacts' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"firstname": "New",
"lastname": "Test",
"type": "lead",
"email": "test12@gmail.com",
"phone": "+919587422363",
"source_id": 115,
"status_id": 287,
"description": "Test one contact",
"country_id": 101,
"assigned_id": 15,
"groups": [
12
],
"zip": "360001",
"city": "Rajkot"
}'{}