Skip to main content
PATCH
/
contacts
/
{contact_id}
Update Contact
curl --request PATCH \
  --url https://api.clemta.com/contacts/{contact_id} \
  --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.

Path Parameters

contact_id
string
required
The unique identifier of the contact to update.

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 updated contact object.

HTTP Response Codes

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

Error Response

When an error occurs, the API returns an error response:
{
  "success": false,
  "message": "Contact not found",
  "data": null,
  "error": {
    "code": "NOT_FOUND",
    "details": ""
  }
}

Code Examples

curl -X PATCH https://api.clemta.com/contacts/64b8f1a2e4b0c8d9f0123456 \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "customer",
    "full_name": "John Doe Updated",
    "email": "[email protected]",
    "company_id": "64b8f1a2e4b0c8d9f0123456",
    "description": "Updated primary contact",
    "cc_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 200",
      "postal_code": "12345",
      "state": "CA"
    }
  }'

Example Response

{
  "success": true,
  "message": "Contact updated successfully",
  "data": {
    "id": "64b8f1a2e4b0c8d9f0123456",
    "created_at": 1640995200,
    "updated_at": 1641168000,
    "type": "customer",
    "status": "active",
    "full_name": "John Doe Updated",
    "email": "[email protected]",
    "description": "Updated primary contact",
    "cc_emails": ["[email protected]", "[email protected]"],
    "bcc_emails": [],
    "billing": {
      "email": "[email protected]",
      "phone": "1234567890",
      "phone_code": "+1",
      "iso_code": "US",
      "country": "United States",
      "address_1": "123 Main Street",
      "address_2": "Suite 200",
      "postal_code": "12345",
      "state": "CA"
    }
  }
}

Build docs developers (and LLMs) love