<!-- Generated from the canonical 99 Digital API documentation. Do not edit this file. -->

Canonical page: https://docs.99digital.co.il/online-api/contacts/delete-contact-avatar

# Delete Contact Avatar

`DELETE https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/avatar`

Remove a contact's avatar image.

To set a new avatar, use [Update Contact](https://docs.99digital.co.il/online-api/contacts/update-contact).

| Setting | Value |
| --- | --- |
| **Method** | `DELETE` |
| **Path** | `/api/v1/accounts/{account_id}/contacts/{contact_id}/avatar` |
| **Authorization** | User token. Same as [Retrieve Contact](https://docs.99digital.co.il/online-api/contacts/retrieve-contact): legacy roles: any agent; new rules: **Contacts → read**. Agent-bot tokens: not allowed. |

**Example request**

```bash
curl -X DELETE 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/avatar' \
  -H 'api_access_token: <YOUR_API_ACCESS_TOKEN>'
```

**Example response** (`200 OK`): `{"payload": { ...contact object without contact_inboxes... }}` with `"thumbnail": ""`.

## Authentication

`api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication).

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. |
| `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. |

## Responses

### 200 — The contact, without its avatar.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `payload` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). |
| `payload.id` | integer | The contact's numeric ID. |
| `payload.name` | string | The full name of the contact. |
| `payload.email` | string \| null | The email address of the contact, stored in lower case, or `null`. |
| `payload.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. |
| `payload.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. |
| `payload.thumbnail` | string | The avatar URL of the contact, or an empty string. |
| `payload.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. |
| `payload.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. |
| `payload.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. |
| `payload.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. |
| `payload.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. |
| `payload.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). |
| `payload.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. |
| `payload.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. |
| `payload.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. |
| `payload.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). |
| `payload.contact_inboxes[].inbox` | object | Object containing the details of the inbox. |
| `payload.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. |
| `payload.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. |
| `payload.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. |
| `payload.contact_inboxes[].inbox.name` | string | The name of the inbox. |
| `payload.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. |
| `payload.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. |
| `payload.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. |
| `payload.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. |
| `payload.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. |
| `payload.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. |

#### Example

```json
{
  "payload": {
    "additional_attributes": {
      "company_name": "Example Ltd",
      "city": "Tel Aviv"
    },
    "availability_status": "offline",
    "email": "dana.cohen@example.com",
    "id": 801,
    "name": "Dana Cohen",
    "phone_number": "+972501234567",
    "identifier": "crm-801",
    "thumbnail": "",
    "custom_attributes": {
      "customer_tier": "gold"
    },
    "blocked": false,
    "is_whatsapp_contact": false,
    "created_at": 1794470500
  }
}
```

### 401 — The access token is missing or wrong, or its user does not belong to this account.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | The error message. |

#### Example: Invalid token

The api_access_token header is missing or wrong.

```json
{
  "error": "Invalid Access Token"
}
```

#### Example: Another account

A valid token, for a user who is not in this account.

```json
{
  "error": "You are not authorized to access this account"
}
```

### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization).

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | The error message. |

#### Example: No permission

The role lacks the permission.

```json
{
  "error": "You are not authorized to do this action"
}
```

#### Example: Agent bot

An agent-bot token on an endpoint that is not open to bots.

```json
{
  "error": "Access to this endpoint is not authorized for bots"
}
```

### 404 — The resource does not exist in this account.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | The error message. |

#### Example

```json
{
  "error": "Resource could not be found"
}
```
