GET
/
contacts
/
{contact_id}
Get Contact by ID
curl --request GET \
  --url https://api.clemta.com/contacts/{contact_id} \
  --header 'X-API-Key: <api-key>'
{
  "success": true,
  "message": "Contact retrieved 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"
    }
  }
}

Get Contact by ID

This endpoint allows you to retrieve a specific contact by its ID.

Headers

ParameterTypeDescription
X-API-KEYstringFormation API Key (required)

Path Parameters

ParameterTypeDescription
contact_idstringContact ID (required)

Parameter Examples

  • Contact ID: 64b8f1a2e4b0c8d9f0123456

Response

{
  "success": true,
  "message": "Contact retrieved 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"
    }
  }
}

Response Parameters

ParameterTypeDescription
successbooleanIndicates if the operation was successful
messagestringAdditional information about the operation
dataobjectResponse data for successful requests
data.idstringUnique identifier for the contact
data.created_atintegerCreation timestamp
data.updated_atintegerLast update timestamp
data.typestringContact type (“customer” or “vendor”)
data.statusstringContact status
data.full_namestringFull name of the contact
data.emailstringEmail address
data.descriptionstringContact description
data.cc_emailsarrayCC email addresses
data.bcc_emailsarrayBCC email addresses
data.billingobjectBilling information

Billing Object Fields

FieldTypeDescription
emailstringBilling email address
phonestringPhone number
phone_codestringPhone country code
iso_codestringCountry ISO code
countrystringCountry name
address_1stringAddress line 1
address_2stringAddress line 2
postal_codestringPostal code
districtstringDistrict
statestringState
provincestringProvince
tax_idstringTax identification number

Error Responses

Invalid Request (400)

{
  "success": false,
  "message": "Invalid request data",
  "error": {
    "code": "INVALID_REQUEST",
    "details": "Invalid contact ID format"
  }
}

Unauthorized (401)

{
  "success": false,
  "message": "API key is required",
  "error": {
    "code": "API_KEY_REQUIRED"
  }
}

Contact Not Found (404)

{
  "success": false,
  "message": "Contact not found",
  "error": {
    "code": "CONTACT_NOT_FOUND"
  }
}

Internal Server Error (500)

{
  "success": false,
  "message": "Internal server error",
  "error": {
    "code": "INTERNAL_ERROR"
  }
}

Authorizations

X-API-Key
string
header
required

Formation API key for authentication.

Path Parameters

contact_id
string
required

Contact ID

Response

200
application/json

Contact retrieved successfully

The response is of type object.