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

# AI line holds

> **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.

Contacts the AI line check held because their personalization lines failed it: list them and approve one to send its lines as they are.

AI. 2 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/ai-line-holds/openapi.json](/docs/api/ai-line-holds/openapi.json).

- `GET /v1/campaigns/{campaignId}/ai-line-holds` - List a campaign's held contacts (`ai-line-holds.list`): [/docs/api/ai-line-holds/list.md](/docs/api/ai-line-holds/list.md)
- `POST /v1/campaigns/{campaignId}/ai-line-holds/{contactId}/approve` - Approve a held contact (`ai-line-holds.approve`): [/docs/api/ai-line-holds/approve.md](/docs/api/ai-line-holds/approve.md)

## List a campaign's held contacts

`GET /v1/campaigns/{campaignId}/ai-line-holds` - operationId `ai-line-holds.list`

| Permission | Rate limit |
| --- | --- |
| Campaigns view | 12,000 requests a minute per API key |

Returns the contacts the line check held in the campaign, newest hold first, with the reasons and the lines each hold
keeps. A contact stays on the list until you approve it or its lines are written again.

Errors:

- `400 validation_failed`: `limit` is not from 1 to 200, or `cursor` is not valid.
- `404 not_found`: the campaign is not in this workspace.

Requires Campaigns view.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/ai-line-holds/GET/v1/campaigns/%7BcampaignId%7D/ai-line-holds)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `campaignId` | path | integer (int64) | yes | The campaign to read. |
| `limit` | query | integer (int32) | no | Holds per page, from 1 to 200. Default 50. |
| `cursor` | query | string | no | The `nextCursor` of the previous page. Omit it for the first page. |
| `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 `AiLineHold`. Each item has these fields. The response also carries `pagination`.

| Field | Type | Description |
| --- | --- | --- |
| `contactId` | integer (int64) | The held contact. |
| `reasons` | array of string | Why Kenso held the lines, the main reason first: `ungrounded` (a fact the contact's data does not support), `not_specific`, `tone` (a phrase a person would not say) or `too_long`. New values can appear. |
| `heldAt` | string (date-time) | When Kenso held the contact, in UTC. |
| `lines` | array of AiLineHoldLine | The lines the hold keeps for review. Approving makes them the lines the contact sends. |

### Request

```bash
curl -X GET "https://api.ken.so/v1/campaigns/812/ai-line-holds?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": [
    {
      "contactId": 812,
      "reasons": [
        "string"
      ],
      "heldAt": "2026-09-23T15:02:11Z",
      "lines": [
        {
          "id": 812,
          "promptId": 812,
          "variable": "first_line",
          "text": "string",
          "segmentId": 812,
          "stepOrder": 1
        }
      ]
    }
  ],
  "pagination": {
    "nextCursor": "eyJpZCI6ODE1fQ",
    "hasMore": true,
    "total": 1,
    "totalCount": 1,
    "isTotalCapped": true
  }
}
```

## Approve a held contact

`POST /v1/campaigns/{campaignId}/ai-line-holds/{contactId}/approve` - operationId `ai-line-holds.approve`

| Permission | Rate limit |
| --- | --- |
| Campaigns edit | 4,800 requests a minute per API key |

Releases a held contact with the lines its hold keeps. Those lines become the contact's personalized lines and the
contact counts as personalized, so it can send. Approving costs no credits.

Errors:

- `403 forbidden`: the caller is a workspace key. Approving held lines so they can send is a member's decision,
and a workspace key is not a person.
- `404 not_found`: the campaign or the contact is not in this workspace, or the contact is not in this campaign.
- `409 not_held`: the contact has no hold in this campaign. It was never held, was already approved, or its lines
were written again.
- `409 conflict`: the contact already has a live line for a variable the hold keeps, or the hold keeps no lines.
Nothing changes. Regenerate the contact's lines instead.

Requires Campaigns edit.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/ai-line-holds/POST/v1/campaigns/%7BcampaignId%7D/ai-line-holds/%7BcontactId%7D/approve)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `campaignId` | path | integer (int64) | yes | The campaign that held the contact. |
| `contactId` | path | integer (int64) | yes | The held contact. |
| `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 `AiLineHoldApproval`.

| Field | Type | Description |
| --- | --- | --- |
| `contactId` | integer (int64) | The released contact. |
| `restoredLineCount` | integer (int32) | How many held lines became the contact's live lines. |

### Request

```bash
curl -X POST "https://api.ken.so/v1/campaigns/812/ai-line-holds/812/approve" \
  -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": {
    "contactId": 812,
    "restoredLineCount": 1
  }
}
```

## Types

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

### AiLineHoldLine

One line a hold keeps.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer (int64) | no | The AI line id. |
| `promptId` | integer (int64) | no | The prompt that wrote the line. |
| `variable` | string | no | The template variable the line fills, which is the prompt's name, such as `first_line`. |
| `text` | string | no | The line's text. |
| `segmentId` | integer (int64) | no | The segment the line was written for. Omitted when the line is not tied to a segment. |
| `stepOrder` | integer (int32) | no | The sequence step the line was written for. Omitted when the line serves every step. |

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