DELETE
/
contacts
/
{contact_id}
Delete Contact
curl --request DELETE \
  --url https://api.clemta.com/contacts/{contact_id} \
  --header 'X-API-Key: <api-key>'
{
  "success": true,
  "message": "Contact deleted successfully",
  "data": {}
}

Delete Contact

This endpoint allows you to delete a contact from the system.

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 deleted successfully",
  "data": {
    "id": "64b8f1a2e4b0c8d9f0123456",
    "deleted_at": 1686787400
  }
}

Response Parameters

ParameterTypeDescription
successbooleanIndicates if the operation was successful
messagestringAdditional information about the operation
dataobjectResponse data for successful requests
data.idstringUnique identifier for the deleted contact
data.deleted_atintegerDeletion timestamp

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"
  }
}

Notes

  • Once a contact is deleted, it cannot be recovered
  • Any associated data (invoices, expenses, etc.) may be affected
  • The deletion is permanent and cannot be undone

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 deleted successfully

The response is of type object.