> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clemta.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Contact

> Delete a contact

# Delete Contact

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

## Headers

| Parameter | Type   | Description                  |
| --------- | ------ | ---------------------------- |
| X-API-KEY | string | Formation API Key (required) |

## Path Parameters

| Parameter   | Type   | Description           |
| ----------- | ------ | --------------------- |
| contact\_id | string | Contact ID (required) |

### Parameter Examples

* **Contact ID**: `64b8f1a2e4b0c8d9f0123456`

## Response

```json theme={null}
{
  "success": true,
  "message": "Contact deleted successfully",
  "data": {
    "id": "64b8f1a2e4b0c8d9f0123456",
    "deleted_at": 1686787400
  }
}
```

### Response Parameters

| 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 deleted contact  |
| data.deleted\_at | integer | Deletion timestamp                         |

## Error Responses

### Invalid Request (400)

```json theme={null}
{
  "success": false,
  "message": "Invalid request data",
  "error": {
    "code": "INVALID_REQUEST",
    "details": "Invalid contact ID format"
  }
}
```

### Unauthorized (401)

```json theme={null}
{
  "success": false,
  "message": "API key is required",
  "error": {
    "code": "API_KEY_REQUIRED"
  }
}
```

### Contact Not Found (404)

```json theme={null}
{
  "success": false,
  "message": "Contact not found",
  "error": {
    "code": "CONTACT_NOT_FOUND"
  }
}
```

### Internal Server Error (500)

```json theme={null}
{
  "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


## OpenAPI

````yaml DELETE /contacts/{contact_id}
openapi: 3.0.3
info:
  title: Clemta Formation API
  description: >-
    API for company formation services. This API allows partners to create,
    retrieve, and manage company formations programmatically.
  version: '2025-06-24'
  contact:
    name: Clemta API Support
    email: tech@clemta.com
  license:
    name: Proprietary
    url: https://clemta.com/terms
servers:
  - url: https://api.clemta.com
    description: Production server
  - url: https://sandbox.clemta.com
    description: Sandbox server
security:
  - ApiKeyAuth: []
paths:
  /contacts/{contact_id}:
    delete:
      tags:
        - Contacts
      summary: Delete Contact
      description: Deletes a contact
      operationId: deleteContact
      parameters:
        - name: contact_id
          in: path
          required: true
          description: Contact ID
          schema:
            type: string
      responses:
        '200':
          description: Contact deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactDeleteResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: Contact not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactNotFoundError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
components:
  schemas:
    ContactDeleteResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Contact deleted successfully
        data:
          type: object
          nullable: true
          description: No data returned for delete operation
    BadRequestError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          example: Invalid request data
        data:
          type: object
          nullable: true
          example: null
        error:
          type: object
          properties:
            code:
              type: string
              example: INVALID_REQUEST
            details:
              type: string
              example: Field 'name' is required
    UnauthorizedError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          example: API key is required
        data:
          type: object
          nullable: true
          example: null
        error:
          type: object
          properties:
            code:
              type: string
              example: API_KEY_REQUIRED
            details:
              type: string
              example: ''
    ContactNotFoundError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          example: Contact not found
        data:
          type: object
          nullable: true
          example: null
        error:
          type: object
          properties:
            code:
              type: string
              example: NOT_FOUND
            details:
              type: string
              example: ''
    InternalServerError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          example: Internal server error
        data:
          type: object
          nullable: true
          example: null
        error:
          type: object
          properties:
            code:
              type: string
              example: INTERNAL_ERROR
            details:
              type: string
              example: An unexpected error occurred.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Formation API key for authentication.

````