Skip to main content
POST
/
contacts
Create Contact
curl --request POST \
  --url https://api.clemta.com/contacts \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "<string>",
  "full_name": "<string>",
  "email": "<string>",
  "company_id": "<string>",
  "status": "<string>",
  "description": "<string>",
  "cc_emails": [
    {}
  ],
  "bcc_emails": [
    {}
  ],
  "billing": {
    "billing.email": "<string>",
    "billing.phone": "<string>",
    "billing.phone_code": "<string>",
    "billing.iso_code": "<string>",
    "billing.country": "<string>",
    "billing.address_1": "<string>",
    "billing.address_2": "<string>",
    "billing.postal_code": "<string>",
    "billing.district": "<string>",
    "billing.state": "<string>",
    "billing.province": "<string>",
    "billing.tax_id": "<string>"
  }
}
'
{
  "success": true,
  "message": "<string>",
  "data": {
    "id": "<string>",
    "created_at": 123,
    "updated_at": 123,
    "type": "<string>",
    "status": "<string>",
    "full_name": "<string>",
    "email": "<string>",
    "description": "<string>",
    "cc_emails": [
      {}
    ],
    "bcc_emails": [
      {}
    ],
    "billing": {}
  }
}

Authentication

This endpoint requires authentication using an API key. Include your API key in the request header:
X-API-Key: your_api_key_here
See Authentication for more details.

Request Body

type
string
required
Contact type. Must be either customer or vendor.
full_name
string
required
Full name of the contact.
email
string
required
Email address of the contact.
company_id
string
required
The ID of the company this contact belongs to.
status
string
Contact status (optional).
description
string
Description or notes about the contact.
cc_emails
array
Array of CC email addresses for the contact.
bcc_emails
array
Array of BCC email addresses for the contact.
billing
object
Billing information for the contact.

Response

success
boolean
Indicates if the request was successful.
message
string
Response message.
data
object
The created contact object.

HTTP Response Codes

CodeDescription
200Contact created successfully
400Invalid request data
401Unauthorized - Invalid or missing API key
404Company not found
500Internal server error

Error Response

When an error occurs, the API returns an error response:
{
  "success": false,
  "message": "Invalid request data",
  "data": null,
  "error": {
    "code": "INVALID_REQUEST",
    "details": "Field 'email' is required"
  }
}

Code Examples

curl -X POST https://api.clemta.com/contacts \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "customer",
    "full_name": "John Doe",
    "email": "[email protected]",
    "company_id": "64b8f1a2e4b0c8d9f0123456",
    "description": "Primary contact for the company",
    "cc_emails": ["[email protected]"],
    "billing": {
      "email": "[email protected]",
      "phone": "1234567890",
      "phone_code": "+1",
      "iso_code": "US",
      "country": "United States",
      "address_1": "123 Main Street",
      "postal_code": "12345",
      "state": "CA"
    }
  }'

Example Response

{
  "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]"],
    "bcc_emails": [],
    "billing": {
      "email": "[email protected]",
      "phone": "1234567890",
      "phone_code": "+1",
      "iso_code": "US",
      "country": "United States",
      "address_1": "123 Main Street",
      "postal_code": "12345",
      "state": "CA"
    }
  }
}

Build docs developers (and LLMs) love