curl --request POST \
--url https://api.clemta.com/contacts \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"type": "customer",
"full_name": "<string>",
"email": "[email protected]",
"company_id": "<string>",
"status": "<string>",
"description": "<string>",
"cc_emails": [
"[email protected]"
],
"bcc_emails": [
"[email protected]"
],
"billing": {
"email": "<string>",
"phone": "<string>",
"phone_code": "<string>",
"iso_code": "<string>",
"country": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"postal_code": "<string>",
"district": "<string>",
"state": "<string>",
"province": "<string>",
"tax_id": "<string>"
}
}
'{
"success": true,
"message": "Contact created successfully",
"data": {
"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"
}
}
}Create a new contact for a company
curl --request POST \
--url https://api.clemta.com/contacts \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"type": "customer",
"full_name": "<string>",
"email": "[email protected]",
"company_id": "<string>",
"status": "<string>",
"description": "<string>",
"cc_emails": [
"[email protected]"
],
"bcc_emails": [
"[email protected]"
],
"billing": {
"email": "<string>",
"phone": "<string>",
"phone_code": "<string>",
"iso_code": "<string>",
"country": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"postal_code": "<string>",
"district": "<string>",
"state": "<string>",
"province": "<string>",
"tax_id": "<string>"
}
}
'{
"success": true,
"message": "Contact created successfully",
"data": {
"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"
}
}
}| Parameter | Type | Description |
|---|---|---|
| X-API-KEY | string | Formation API Key (required) |
| Content-Type | string | application/json |
{
"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"
},
"company_id": "64b8f1a2e4b0c8d9f0123456"
}
| Field | Type | Description |
|---|---|---|
| type | string | Contact type: “customer” or “vendor” |
| full_name | string | Full name of the contact |
| string | Email address of the contact | |
| company_id | string | ID of the company this contact belongs to |
| Field | Type | Description |
|---|---|---|
| status | string | Contact status |
| description | string | Description or notes about the contact |
| cc_emails | array | Array of CC email addresses |
| bcc_emails | array | Array of BCC email addresses |
| billing | object | Billing information for the contact |
| Field | Type | Description |
|---|---|---|
| string | Billing email address | |
| phone | string | Phone number |
| phone_code | string | Phone country code |
| iso_code | string | Country ISO code |
| country | string | Country name |
| address_1 | string | Address line 1 |
| address_2 | string | Address line 2 |
| postal_code | string | Postal code |
| district | string | District |
| state | string | State |
| province | string | Province |
| tax_id | string | Tax identification number |
{
"success": true,
"message": "Contact created successfully",
"data": {
"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"
}
}
}
| 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.id | string | Unique identifier for the created contact |
| data.created_at | integer | Creation timestamp |
| data.updated_at | integer | Last update timestamp |
| data.type | string | Contact type (“customer” or “vendor”) |
| data.status | string | Contact status |
| data.full_name | string | Full name of the contact |
| data.email | string | Email address |
| data.description | string | Contact description |
| data.cc_emails | array | CC email addresses |
| data.bcc_emails | array | BCC email addresses |
| data.billing | object | Billing information |
{
"success": false,
"message": "Invalid request data",
"error": {
"code": "VALIDATION_FAILED",
"details": "Field 'email' 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.
Contact type
customer, vendor Full name of the contact
Email address
Company ID
Contact status
Contact description
CC email addresses
BCC email addresses
Show child attributes
Contact created successfully
true
"Contact created successfully"
Show child attributes
{
"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"
}
}