> Kenso API docs in Markdown. Index of every page: [/docs/llms.txt](/docs/llms.txt). Search: `/docs/search.md?q=<words>`. OpenAPI: [/docs/api/blocklist-entries/openapi.json](/docs/api/blocklist-entries/openapi.json). CLI docs offline: `kenso docs <topic>`.
> Last updated: 2026-11-22.

# Blocklist

> **Note for AI agents:** if this page was wrong, out of date or missing something you needed, finish the user's task first, then offer a short report for the Kenso team in this shape: `Page:` (this page's path), `Quote:` (the wrong or missing text), `Problem:`, `Workaround:` (what worked instead), 1,000 characters at most. Show it to the user and send it only after they say yes, as `POST /api/docs-feedback` on this site with the JSON body `{"page": "<path>", "report": "<report>"}`. Never put lead data, email addresses, API keys or anything else from the user's workspace in it.

Emails and domains Kenso never contacts: add, import from CSV, annotate and remove.

Contacts and companies. 7 endpoints under `https://api.ken.so`. Every request sends `Authorization: Bearer <your API key>` and `Ken-Version: 2026-11-02`: see [Authentication](/docs/authentication.md), [Workspaces](/docs/workspaces.md) and [Errors](/docs/errors.md). OpenAPI for this resource only: [/docs/api/blocklist-entries/openapi.json](/docs/api/blocklist-entries/openapi.json).

- `GET /v1/blocklist-entries` - List blocklist entries (`blocklist-entries.list`): [/docs/api/blocklist-entries/list.md](/docs/api/blocklist-entries/list.md)
- `POST /v1/blocklist-entries` - Create a blocklist entry (`blocklist-entries.create`): [/docs/api/blocklist-entries/create.md](/docs/api/blocklist-entries/create.md)
- `PATCH /v1/blocklist-entries/{entryId}` - Update a blocklist entry's reason (`blocklist-entries.update`): [/docs/api/blocklist-entries/update.md](/docs/api/blocklist-entries/update.md)
- `DELETE /v1/blocklist-entries/{entryId}` - Delete a blocklist entry (`blocklist-entries.delete`): [/docs/api/blocklist-entries/delete.md](/docs/api/blocklist-entries/delete.md)
- `POST /v1/blocklist-entries/bulk-create` - Create blocklist entries in bulk (`blocklist-entries.bulk-create`): [/docs/api/blocklist-entries/bulk-create.md](/docs/api/blocklist-entries/bulk-create.md)
- `POST /v1/blocklist-entries/bulk-delete` - Delete blocklist entries in bulk (`blocklist-entries.bulk-delete`): [/docs/api/blocklist-entries/bulk-delete.md](/docs/api/blocklist-entries/bulk-delete.md)
- `POST /v1/blocklist-entries/imports` - Import blocklist entries from a CSV file (`blocklist-entries.import`): [/docs/api/blocklist-entries/import.md](/docs/api/blocklist-entries/import.md)

## List blocklist entries

`GET /v1/blocklist-entries` - operationId `blocklist-entries.list`

| Permission | Rate limit |
| --- | --- |
| Any workspace member except a Network member | 12,000 requests a minute per API key |

Lists the workspace's blocklist entries, oldest first. Use the filters to check whether an email or domain is
blocked, or to review entries by source.

`sort=-createdAt` lists newest first. Keep the same `sort` while you page. `includeTotal=true` adds
`pagination.totalCount`, the number of entries that match the filters. `includeCounts=true` adds
`counts`, the workspace's entries per type and source, whatever filters you send.

Errors:

- `400 validation_failed`: `type`, `sort` or `source` holds an unknown value, or
`limit` or `cursor` is invalid.

Open to any workspace member.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/blocklist-entries/GET/v1/blocklist-entries)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `type` | query | string | no | Only entries of this type: `email` or `domain`. |
| `value` | query | string | no | Only the entry for this exact email or domain, ignoring case. |
| `q` | query | string | no | Only entries whose value or reason contains this text, ignoring case. |
| `source` | query | string | no | Only entries from these sources, comma-separated: any of `manual`, `own_domain`, `customer` and `rule`. |
| `hasReason` | query | boolean | no | Set to `true` to list only entries with a reason, or `false` for only entries without one. |
| `sort` | query | string | no | The order: `createdAt` lists oldest first, the default, and `-createdAt` lists newest first. |
| `includeTotal` | query | boolean | no | Set to `true` to add `pagination.totalCount`, the number of entries that match the filters. |
| `includeCounts` | query | boolean | no | Set to `true` to add `counts`, the workspace's entries by type and source, whatever the filters. |
| `cursor` | query | string | no | The `nextCursor` of the previous page. Omit it for the first page. |
| `limit` | query | integer (int32) | no | Entries per page, from 1 to 200. 50 by default. |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |

### Response 200

`data` is a list of `BlocklistEntry`. Each item has these fields. The response also carries `pagination`, `counts`.

| Field | Type | Description |
| --- | --- | --- |
| `id` | integer (int64) | The entry's id. |
| `type` | string | What the entry blocks: `email` for one address, `domain` for every address at a domain. |
| `value` | string | The blocked email or domain, in lowercase, such as `jane@acme.com` or `acme.com`. |
| `createdAt` | string (date-time) | When the entry was added, in UTC. Null in a bulk create result. |
| `source` | string | Where the entry came from: `manual`, `own_domain`, `customer` or `rule`. A `manual` entry was added by a member, through the API or a CSV file, or by Kenso after an opt-out or a bounce. An `own_domain` entry is one of the workspace's own domains, and it goes away when you remove the domain in Settings > Company. A `customer` entry is the domain of an account marked a customer, and it goes away when the account stops being a customer. A `rule` entry comes from a blocklist rule, and it goes away once no enabled rule matches it. Adding a `customer` or `rule` value yourself makes it `manual`. |
| `reason` | string | Why the value is blocked, at most 200 characters. Omitted when the entry has none. Kenso sets a reason on the entries it adds, such as `Opted out or bounced` or `Customer account`. Own-domain entries have none. |
| `claimed` | boolean | True in a create or bulk create result when a customer account or a blocklist rule already listed the value and the call made that entry `manual`, under the same id. Omitted otherwise. |

### Request

```bash
curl -X GET "https://api.ken.so/v1/blocklist-entries?limit=50" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID"
```

### Example response

```json
{
  "success": true,
  "data": [
    {
      "id": 7712,
      "type": "domain",
      "value": "competitor.example.com",
      "createdAt": "2026-09-23T15:02:11Z",
      "source": "manual",
      "reason": "Current customer"
    }
  ],
  "pagination": {
    "nextCursor": "eyJpZCI6ODE1fQ",
    "hasMore": true,
    "total": 1,
    "totalCount": 1,
    "isTotalCapped": true
  },
  "counts": {
    "all": 1,
    "emails": 1,
    "domains": 1,
    "fromCrm": 1,
    "noReason": 1
  }
}
```

## Create a blocklist entry

`POST /v1/blocklist-entries` - operationId `blocklist-entries.create`

| Permission | Rate limit |
| --- | --- |
| The `workspace_settings` permission | 4,800 requests a minute per API key |

Adds one email or domain to the blocklist. From then on, Kenso does not contact that email, or anyone at that
domain.

`type` (`email` or `domain`) and `value` are required. For a domain, a URL works: Kenso keeps
the host without `www.`. `reason` is optional, at most 200 characters.

A domain that a customer account or a blocklist rule already lists, or an email that only a blocklist rule lists,
becomes a `manual` entry under the same id with your reason, and the answer has `claimed: true`. If the
workspace's connected CRM syncs opt-outs, Kenso also marks a newly blocked email as opted out on the matching CRM
contacts. Shared mail provider domains such as gmail.com, hotmail.co.uk and web.de cannot be blocked whole: block
those addresses one by one.

Errors:

- `400 validation_failed`: `type` or `value` is missing or invalid, `reason` is over 200
characters, or the value is already on the blocklist. The existing entry keeps its reason.
- `400 validation_failed` with detail code `shared_mail_provider`: the domain is a shared mail provider.

Requires the `workspace_settings` permission.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/blocklist-entries/POST/v1/blocklist-entries)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |

### Request body

`application/json`, optional.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | string | yes | What to block: `email` for one address, `domain` for every address at a domain. Required. |
| `value` | string | yes | The email address or domain to block. Required. For a domain, a URL works: Kenso keeps the host without `www.`. |
| `reason` | string | no | Why the value is blocked. Optional, at most 200 characters. Blank stores no reason. |

### Response 201

`data` is a `BlocklistEntry`.

| Field | Type | Description |
| --- | --- | --- |
| `id` | integer (int64) | The entry's id. |
| `type` | string | What the entry blocks: `email` for one address, `domain` for every address at a domain. |
| `value` | string | The blocked email or domain, in lowercase, such as `jane@acme.com` or `acme.com`. |
| `createdAt` | string (date-time) | When the entry was added, in UTC. Null in a bulk create result. |
| `source` | string | Where the entry came from: `manual`, `own_domain`, `customer` or `rule`. A `manual` entry was added by a member, through the API or a CSV file, or by Kenso after an opt-out or a bounce. An `own_domain` entry is one of the workspace's own domains, and it goes away when you remove the domain in Settings > Company. A `customer` entry is the domain of an account marked a customer, and it goes away when the account stops being a customer. A `rule` entry comes from a blocklist rule, and it goes away once no enabled rule matches it. Adding a `customer` or `rule` value yourself makes it `manual`. |
| `reason` | string | Why the value is blocked, at most 200 characters. Omitted when the entry has none. Kenso sets a reason on the entries it adds, such as `Opted out or bounced` or `Customer account`. Own-domain entries have none. |
| `claimed` | boolean | True in a create or bulk create result when a customer account or a blocklist rule already listed the value and the call made that entry `manual`, under the same id. Omitted otherwise. |

### Request

```bash
curl -X POST "https://api.ken.so/v1/blocklist-entries" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "domain",
  "value": "competitor.example.com",
  "reason": "Current customer"
}'
```

### Example response

```json
{
  "success": true,
  "data": {
    "id": 7712,
    "type": "domain",
    "value": "competitor.example.com",
    "createdAt": "2026-09-23T15:02:11Z",
    "source": "manual",
    "reason": "Current customer"
  }
}
```

## Update a blocklist entry's reason

`PATCH /v1/blocklist-entries/{entryId}` - operationId `blocklist-entries.update`

| Permission | Rate limit |
| --- | --- |
| The `workspace_settings` permission | 4,800 requests a minute per API key |

Sets or clears the reason on one blocklist entry. The blocked value does not change.

Send `{ "reason": "..." }`. The `reason` field is required, at most 200 characters, and `null` or
blank clears it.

Errors:

- `400 validation_failed`: the body has no `reason` field, or `reason` is over 200 characters.
- `404 not_found`: no entry of this workspace has the id.
- `409 invalid_state`: the entry is a `rule` entry while blocklist rules are on. The rule sets its
reason, so change the rule's reason instead.

Requires the `workspace_settings` permission.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/blocklist-entries/PATCH/v1/blocklist-entries/%7BentryId%7D)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `entryId` | path | integer (int64) | yes | The entry's id. |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |

### Request body

`application/json`, optional.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `reason` | string | yes | Why the value is blocked, at most 200 characters. Required. `null` or blank clears it. |

### Response 200

`data` is a `BlocklistEntry`.

| Field | Type | Description |
| --- | --- | --- |
| `id` | integer (int64) | The entry's id. |
| `type` | string | What the entry blocks: `email` for one address, `domain` for every address at a domain. |
| `value` | string | The blocked email or domain, in lowercase, such as `jane@acme.com` or `acme.com`. |
| `createdAt` | string (date-time) | When the entry was added, in UTC. Null in a bulk create result. |
| `source` | string | Where the entry came from: `manual`, `own_domain`, `customer` or `rule`. A `manual` entry was added by a member, through the API or a CSV file, or by Kenso after an opt-out or a bounce. An `own_domain` entry is one of the workspace's own domains, and it goes away when you remove the domain in Settings > Company. A `customer` entry is the domain of an account marked a customer, and it goes away when the account stops being a customer. A `rule` entry comes from a blocklist rule, and it goes away once no enabled rule matches it. Adding a `customer` or `rule` value yourself makes it `manual`. |
| `reason` | string | Why the value is blocked, at most 200 characters. Omitted when the entry has none. Kenso sets a reason on the entries it adds, such as `Opted out or bounced` or `Customer account`. Own-domain entries have none. |
| `claimed` | boolean | True in a create or bulk create result when a customer account or a blocklist rule already listed the value and the call made that entry `manual`, under the same id. Omitted otherwise. |

### Request

```bash
curl -X PATCH "https://api.ken.so/v1/blocklist-entries/812" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "string"
}'
```

### Example response

```json
{
  "success": true,
  "data": {
    "id": 7712,
    "type": "domain",
    "value": "competitor.example.com",
    "createdAt": "2026-09-23T15:02:11Z",
    "source": "manual",
    "reason": "Current customer"
  }
}
```

## Delete a blocklist entry

`DELETE /v1/blocklist-entries/{entryId}` - operationId `blocklist-entries.delete`

| Permission | Rate limit |
| --- | --- |
| The `workspace_settings` permission | 4,800 requests a minute per API key |

Removes one entry from the blocklist.

If the value is also one of the workspace's own domains or matches an enabled blocklist rule, Kenso adds the
`own_domain` or `rule` entry back right away. A `customer` entry deleted here stays off.

Errors:

- `404 not_found`: no entry of this workspace has the id.
- `409 invalid_state`: the entry is an `own_domain` entry, or a `rule` entry while blocklist rules
are on. To unblock an own domain, remove it in Settings > Company. Only Kenso support can change the primary
domain. To unblock a rule entry, change or turn off the rule.

Requires the `workspace_settings` permission.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/blocklist-entries/DELETE/v1/blocklist-entries/%7BentryId%7D)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `entryId` | path | integer (int64) | yes | The entry's id, as `GET /v1/blocklist-entries` returns it. |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |

### Response 204

### Request

```bash
curl -X DELETE "https://api.ken.so/v1/blocklist-entries/812" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID"
```

### Example response

```http
HTTP/1.1 204 No Content
```

## Create blocklist entries in bulk

`POST /v1/blocklist-entries/bulk-create` - operationId `blocklist-entries.bulk-create`

| Permission | Rate limit |
| --- | --- |
| The `workspace_settings` permission | 480 requests a minute per API key |

Adds up to 1,000 emails, or up to 1,000 domains, to the blocklist in one call. Every value in a call has the same
`type`.

`type` (`email` or `domain`) is required. Send the values in `values`, or in `entries` to
give each value its own reason, not both. The optional `reason`, at most 200 characters, applies to every
value without its own.

Kenso checks each value on its own. `succeeded` lists the entries it added. `failed` lists the values it
did not add, each with a `code`: `already_exists` for a value already on the blocklist or repeated in the
call (the existing entry keeps its reason), `shared_mail_provider` for a domain such as gmail.com,
`invalid` for a malformed value or a reason over 200 characters, and `failed` for any other error. A
domain that a customer account or a blocklist rule already lists, or an email that only a rule lists, becomes a
`manual` entry under the same id and is in `succeeded` with `claimed: true`.

To undo the call, delete only the `succeeded` ids without `claimed: true`. A claimed entry was blocked
before the call, and deleting it would unblock the value.

Errors:

- `400 validation_failed`: `type` is missing or invalid, both `values` and `entries` hold
values, neither holds a value, there are more than 1,000 values, or `reason` is over 200 characters.

Requires the `workspace_settings` permission.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/blocklist-entries/POST/v1/blocklist-entries/bulk-create)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |

### Request body

`application/json`, optional.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | string | yes | The type of every value in the call: `email` or `domain`. Required. |
| `values` | array of string | no | The values to block, at most 1,000. Send this or `entries`, not both. |
| `reason` | string | no | Why the values are blocked. Optional, at most 200 characters. An entry's own `reason` wins over it. |
| `entries` | array of BulkCreateBlocklistEntry | no | The values to block, each with its own reason, at most 1,000. Send this or `values`, not both. |

### Response 200

`data` is a `BlocklistBulkResult`.

| Field | Type | Description |
| --- | --- | --- |
| `succeeded` | array of BlocklistEntry | The entries Kenso added or claimed, one per value. |
| `failed` | array of BlocklistBulkFailure | The values Kenso did not add, with the reason for each. |

### Request

```bash
curl -X POST "https://api.ken.so/v1/blocklist-entries/bulk-create" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "email",
  "values": [
    "string"
  ],
  "reason": "string",
  "entries": [
    {
      "value": "string",
      "reason": "string"
    }
  ]
}'
```

### Example response

```json
{
  "success": true,
  "data": {
    "succeeded": [
      {
        "id": 7712,
        "type": "domain",
        "value": "competitor.example.com",
        "createdAt": "2026-09-23T15:02:11Z",
        "source": "manual",
        "reason": "Current customer"
      }
    ],
    "failed": [
      {
        "value": "string",
        "code": "already_exists",
        "message": "string"
      }
    ]
  }
}
```

## Delete blocklist entries in bulk

`POST /v1/blocklist-entries/bulk-delete` - operationId `blocklist-entries.bulk-delete`

| Permission | Rate limit |
| --- | --- |
| The `workspace_settings` permission | 480 requests a minute per API key |

Removes up to 1,000 blocklist entries by id in one call. Use it to undo a large upload, 1,000 entries per call.

Send `{ "ids": [...] }` with from 1 to 1,000 entry ids. `succeeded` lists, in request order, every id
that is off the blocklist after the call, including an id that was already gone. `failed` lists the entries
Kenso kept, each with an `error` whose code is `invalid_state`: an `own_domain` entry, or a
`rule` entry while blocklist rules are on.

To undo a bulk create, send only its `succeeded` ids without `claimed: true`. A claimed entry was
blocked before that call, by a customer account or a rule, and a `customer` entry deleted here stays off. As
on a single delete, Kenso adds an `own_domain` or `rule` entry back right away when the value still
matches.

Errors:

- `400 validation_failed`: `ids` is empty, holds more than 1,000 ids, or holds 0.

Requires the `workspace_settings` permission.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/blocklist-entries/POST/v1/blocklist-entries/bulk-delete)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |

### Request body

`application/json`, optional.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ids` | array of integer (int64) | no | The ids of the entries to remove, from 1 to 1,000. |

### Response 200

`data` is a `BlocklistBulkDeleteResult`.

| Field | Type | Description |
| --- | --- | --- |
| `succeeded` | array of integer (int64) | Every id that is off the blocklist after the call, removed now or already gone, in request order. |
| `failed` | array of BlocklistBulkDeleteFailure | The entries Kenso kept, with the reason for each. |

### Request

```bash
curl -X POST "https://api.ken.so/v1/blocklist-entries/bulk-delete" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "ids": [
    812
  ]
}'
```

### Example response

```json
{
  "success": true,
  "data": {
    "succeeded": [
      1
    ],
    "failed": [
      {
        "id": 812,
        "error": {
          "code": "string",
          "message": "string"
        }
      }
    ]
  }
}
```

## Import blocklist entries from a CSV file

`POST /v1/blocklist-entries/imports` - operationId `blocklist-entries.import`

| Permission | Rate limit |
| --- | --- |
| The `workspace_settings` permission | 480 requests a minute per API key |

Adds the rows of a CSV file to the blocklist. Kenso processes the whole file before it answers.

Send `multipart/form-data` with the field `file`: a `.csv` file with a CSV content type such as
`text/csv`, with an `email` column, a `domain` column or both, and an optional `reason`
column. A file holds at most 100,000 rows. A reason cell over 200 characters is cut and never fails the file. The optional form field
`reason`, at most 200 characters, applies to every row without its own.

Rows already on the blocklist keep their own reason. A shared mail provider in the `domain` column, such as
gmail.com, is skipped. Imported emails are not sent to the connected CRM as opt-outs. Kenso adds the rows in file
order and stops at the first row with an invalid email or domain: the rows before it stay on the blocklist.

Errors:

- `400 validation_failed`: `file` is missing, empty, not a CSV file or over 100,000 rows,
`reason` is over 200 characters, or a row holds an invalid email or domain. The message names the row.

Requires the `workspace_settings` permission.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/blocklist-entries/POST/v1/blocklist-entries/imports)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |

### Request body

`multipart/form-data`, optional.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `file` | string (binary) | no | The CSV file, with an `email` column, a `domain` column or both, and an optional `reason` column. |
| `reason` | string | no | The reason for every row without its own. Optional, at most 200 characters. |

### Response 200

`data` is a `BlocklistImport`.

| Field | Type | Description |
| --- | --- | --- |
| `status` | string | Always `succeeded`: Kenso processed every row of the file before it answered. |

### Request

```bash
curl -X POST "https://api.ken.so/v1/blocklist-entries/imports" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID" \
  -F "file=@./file" \
  -F 'reason=string'
```

### Example response

```json
{
  "success": true,
  "data": {
    "status": "string"
  }
}
```

## Types

Each named type the tables above use, nested ones included.

### BulkCreateBlocklistEntry

One value to block, with its own reason.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `value` | string | no | The email address or domain to block. |
| `reason` | string | no | Why this value is blocked. Optional, at most 200 characters. |

### BlocklistEntry

One email or domain on the workspace's blocklist.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer (int64) | no | The entry's id. |
| `type` | string | no | What the entry blocks: `email` for one address, `domain` for every address at a domain. |
| `value` | string | no | The blocked email or domain, in lowercase, such as `jane@acme.com` or `acme.com`. |
| `createdAt` | string (date-time) | no | When the entry was added, in UTC. Null in a bulk create result. |
| `source` | string | no | Where the entry came from: `manual`, `own_domain`, `customer` or `rule`. A `manual` entry was added by a member, through the API or a CSV file, or by Kenso after an opt-out or a bounce. An `own_domain` entry is one of the workspace's own domains, and it goes away when you remove the domain in Settings > Company. A `customer` entry is the domain of an account marked a customer, and it goes away when the account stops being a customer. A `rule` entry comes from a blocklist rule, and it goes away once no enabled rule matches it. Adding a `customer` or `rule` value yourself makes it `manual`. |
| `reason` | string | no | Why the value is blocked, at most 200 characters. Omitted when the entry has none. Kenso sets a reason on the entries it adds, such as `Opted out or bounced` or `Customer account`. Own-domain entries have none. |
| `claimed` | boolean | no | True in a create or bulk create result when a customer account or a blocklist rule already listed the value and the call made that entry `manual`, under the same id. Omitted otherwise. |

### BlocklistBulkFailure

A value a bulk create did not add.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `value` | string | no | The value, as sent or as Kenso normalized it. |
| `code` | string | no | Why Kenso did not add it: `already_exists`, `shared_mail_provider`, `invalid` or `failed`. |
| `message` | string | no | A readable explanation of the code. |

### BlocklistBulkDeleteFailure

An entry a bulk delete kept.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer (int64) | no | The entry's id. |
| `error` | BlocklistBulkError | no | Why Kenso kept the entry. |

### BlocklistBulkError

Why a bulk delete kept an entry.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | no | Always `invalid_state`: the entry is an `own_domain` entry, or a `rule` entry while blocklist rules are on. |
| `message` | string | no | A readable explanation, with what to change instead. |

All resources: [/docs.md](/docs.md).
