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

# Archive Contact — POST /v1/contacts/{contactId}/archive

> POST /v1/contacts/{contactId}/archive sets a contact's status to archived, hiding it from default list results. Archived contacts can be restored.

Use this endpoint to archive a contact. Archiving sets the contact's status to `archived` and hides it from the default results of `GET /v1/contacts`. Archived contacts can be retrieved by filtering with `status=archived` and can be restored to active status at any time using the unarchive endpoint.

## Base URL

```
POST https://api.cleo-pay.com/v1/contacts/{contactId}/archive
```

## Authentication

All requests must include a Bearer token in the `Authorization` header.

```http theme={null}
Authorization: Bearer <token>
```

## Path Parameters

<ParamField path="contactId" type="string" required>
  The unique identifier of the contact to archive.
</ParamField>

## Request Body

This endpoint does not accept a request body.

## Response

Returns the updated `Contact` object with HTTP status `200 OK` and `status: "archived"`.

<ResponseField name="id" type="string">
  Unique identifier for the contact.
</ResponseField>

<ResponseField name="type" type="string">
  The contact type: `payee` or `business`.
</ResponseField>

<ResponseField name="status" type="string">
  The contact's updated status. Will be `archived`.
</ResponseField>

<ResponseField name="displayName" type="string | null">
  The contact's display name.
</ResponseField>

<ResponseField name="emails" type="string[]">
  Email addresses associated with the contact.
</ResponseField>

<ResponseField name="phone" type="string | null">
  Phone number for the contact.
</ResponseField>

<ResponseField name="paymentDirection" type="string">
  Allowed payment direction: `bidirectional`, `can_pay`, `can_be_paid`, or `none`.
</ResponseField>

<ResponseField name="netTerms" type="number | null">
  Net payment terms in days, if configured.
</ResponseField>

<ResponseField name="bankAccount" type="object | null">
  Summary of the contact's linked bank account.

  <Expandable title="bankAccount fields">
    <ResponseField name="last4" type="string">
      Last four digits of the bank account number.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="taxInfo" type="object | null">
  Tax information for the contact.

  <Expandable title="taxInfo fields">
    <ResponseField name="legalName" type="string | null">
      Legal name associated with the tax ID.
    </ResponseField>

    <ResponseField name="taxIdType" type="string | null">
      Type of tax ID: `ein` or `ssn`.
    </ResponseField>

    <ResponseField name="taxIdMask" type="string | null">
      Last four digits of the tax ID.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="paymentReady" type="boolean">
  Whether this contact can currently receive payments.
</ResponseField>

<ResponseField name="createdAt" type="datetime">
  ISO 8601 timestamp of when the contact was created.
</ResponseField>

<ResponseField name="updatedAt" type="datetime | null">
  ISO 8601 timestamp of the most recent update.
</ResponseField>

<ResponseField name="archivedAt" type="datetime | null">
  ISO 8601 timestamp of when the contact was archived. Populated upon successful archival.
</ResponseField>

## Example Request

```bash curl theme={null}
curl --request POST \
  --url "https://api.cleo-pay.com/v1/contacts/cnt_01hq1z2k3m4n5p6q7r8s9t0u/archive" \
  --header "Authorization: Bearer <token>"
```

## Example Response

```json 200 theme={null}
{
  "id": "cnt_01hq1z2k3m4n5p6q7r8s9t0u",
  "type": "payee",
  "status": "archived",
  "displayName": "Acme Supplies LLC",
  "emails": ["billing@acmesupplies.com"],
  "phone": "+15550001234",
  "paymentDirection": "can_be_paid",
  "netTerms": 30,
  "bankAccount": {
    "last4": "7890"
  },
  "taxInfo": {
    "legalName": "Acme Supplies LLC",
    "taxIdType": "ein",
    "taxIdMask": "6789"
  },
  "paymentReady": false,
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-04-10T11:00:00Z",
  "archivedAt": "2024-04-10T11:00:00Z"
}
```

<Note>
  Archiving is not the same as revoking. An **archived** contact has been intentionally hidden from your active contact list and can be restored using `POST /v1/contacts/{contactId}/unarchive`. A **revoked** contact has had its access removed by Cleo Pay and cannot be restored through the API.
</Note>

<Tip>
  Use archiving to keep your active contact list clean without permanently deleting contact records. Archived contacts — and their associated payable history — remain accessible when filtered explicitly.
</Tip>
