# Support instructions API reference

> The team's rules and facts for the AI reply drafter: the tone, the signature, policies and when a person answers. The drafter reads every instruction on every draft.

| Operation | Request |
| --- | --- |
| [List the support instructions](#list-the-support-instructions) | `GET /v1/projects/{project_id}/support_instructions` |
| [Create a support instruction](#create-a-support-instruction) | `POST /v1/projects/{project_id}/support_instructions` |
| [Change a support instruction](#change-a-support-instruction) | `PATCH /v1/projects/{project_id}/support_instructions/{support_instruction_id}` |
| [Delete a support instruction](#delete-a-support-instruction) | `DELETE /v1/projects/{project_id}/support_instructions/{support_instruction_id}` |

## List the support instructions

`GET /v1/projects/{project_id}/support_instructions`

The instructions with their whole text, oldest first. The AI reply drafter reads every instruction on every draft and follows the ones that apply to the ticket. Ask, the site search and the site's MCP server never read them.

Requires project read permission.

**Parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | string | yes |  |
| `limit` | integer | no |  |
| `cursor` | string | no | pagination.next_cursor from the previous page. |

**Example**

<CodeGroup>

```ts TypeScript
import { Revdoku } from 'revdoku';

const client = new Revdoku();
const { data } = await client.api.listSupportInstructions({
  projectId: 'prj_example',
});
console.log(data);
```

```python Python
from revdoku import Revdoku

client = Revdoku()
response = client.api.list_support_instructions("prj_example")
print(response.data)
```

```sh cURL
curl "https://api.revdoku.com/v1/projects/prj_example/support_instructions" \
  -H "Authorization: Bearer $REVDOKU_API_KEY"
```

</CodeGroup>

**Response** `200`

| Field | Type | Description |
| --- | --- | --- |
| `support_instructions` | array of SupportInstruction |  |
| `support_instructions[].id` | string |  |
| `support_instructions[].title` | string |  |
| `support_instructions[].text` | string | Markdown. The rule or the fact. |
| `support_instructions[].version` | integer | Send it as expected_version with a change or a delete. |
| `support_instructions[].created_at` | string (date-time) |  |
| `support_instructions[].updated_at` | string (date-time) |  |
| `support_instructions[].created_by` | FileActor or null | The person who created it. Null when that person was deleted. |
| `support_instructions[].created_by_api_key` | ApiKeyActor or null | The API key or AI connection that created it for that person. Null for the dashboard. |
| `support_instructions[].updated_by` | FileActor or null | The person who changed it last. |
| `support_instructions[].updated_by_api_key` | ApiKeyActor or null | The API key or AI connection that changed it last. Null for the dashboard. |
| `pagination` | Pagination | One page of a list. Request the next page with cursor=next_cursor and the same filters. Cursors are opaque strings: do not build or decode them. |
| `pagination.limit` | integer |  |
| `pagination.has_more` | boolean | True when another page exists. |
| `pagination.next_cursor` | string or null | Cursor for the next page; null on the last page. |

<Accordion title="Example response">

```json
{
  "success": true,
  "data": {
    "support_instructions": [
      {
        "id": "ins_8Kd2pQx7",
        "title": "Refunds",
        "text": "Offer a refund within 30 days of a payment. After 30 days, a person decides.",
        "version": 0,
        "created_at": "2026-11-27T12:05:00.000000Z",
        "updated_at": "2026-11-27T12:05:00.000000Z",
        "created_by": {
          "id": "user_3Hq8LmV2",
          "name": "Dana Smith",
          "email": "dana@example.com"
        },
        "created_by_api_key": null,
        "updated_by": {
          "id": "user_3Hq8LmV2",
          "name": "Dana Smith",
          "email": "dana@example.com"
        },
        "updated_by_api_key": null
      }
    ],
    "pagination": {"limit": 50, "has_more": false, "next_cursor": null}
  }
}
```

</Accordion>

## Create a support instruction

`POST /v1/projects/{project_id}/support_instructions`

A project has at most the plan's number of instructions (1 on Free, 50 on paid plans; details.max_instructions), and their texts have at most the plan's characters together (details.max_chars). Both answer 422 SUPPORT_INSTRUCTION_LIMIT_REACHED. Never put a requester's personal data in one: the drafter reads it for every ticket. Never retry it automatically after an unknown result: list the instructions first.

Requires project write permission.

**Parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | string | yes |  |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `title` | string | yes |  |
| `text` | string | yes | Markdown. Never put a requester's personal data in it: the drafter reads it for every ticket. |

**Example**

<CodeGroup>

```ts TypeScript
import { Revdoku } from 'revdoku';

const client = new Revdoku();
const { data } = await client.api.createSupportInstruction({
  projectId: 'prj_example',
  supportInstructionCreateRequest: { title: 'Support', text: 'Hello from Revdoku.' },
});
console.log(data);
```

```python Python
from revdoku import Revdoku, SupportInstructionCreateRequest

client = Revdoku()
response = client.api.create_support_instruction(
    "prj_example",
    SupportInstructionCreateRequest(
        title="Support",
        text="Hello from Revdoku.",
    ),
)
print(response.data)
```

```sh cURL
curl -X POST "https://api.revdoku.com/v1/projects/prj_example/support_instructions" \
  -H "Authorization: Bearer $REVDOKU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "Support", "text": "Hello from Revdoku."}'
```

</CodeGroup>

**Response** `201`

| Field | Type | Description |
| --- | --- | --- |
| `support_instruction` | SupportInstruction | Fields as in [List the support instructions](#list-the-support-instructions). |

<Accordion title="Example response">

```json
{
  "success": true,
  "data": {
    "support_instruction": {
      "id": "ins_8Kd2pQx7",
      "title": "Refunds",
      "text": "Offer a refund within 30 days of a payment. After 30 days, a person decides.",
      "version": 0,
      "created_at": "2026-11-27T12:05:00.000000Z",
      "updated_at": "2026-11-27T12:05:00.000000Z",
      "created_by": {
        "id": "user_3Hq8LmV2",
        "name": "Dana Smith",
        "email": "dana@example.com"
      },
      "created_by_api_key": null,
      "updated_by": {
        "id": "user_3Hq8LmV2",
        "name": "Dana Smith",
        "email": "dana@example.com"
      },
      "updated_by_api_key": null
    }
  }
}
```

</Accordion>

## Change a support instruction

`PATCH /v1/projects/{project_id}/support_instructions/{support_instruction_id}`

Only the fields that you send change. Send expected_version, the version that you read: when someone changed the instruction since, the answer is 409 SUPPORT_INSTRUCTION_VERSION_CONFLICT and nothing changes.

Requires project write permission.

**Parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | string | yes |  |
| `support_instruction_id` | string | yes |  |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `title` | string | no |  |
| `text` | string | no |  |
| `expected_version` | integer | no | The version that you read. Another one answers 409 SUPPORT_INSTRUCTION_VERSION_CONFLICT, and nothing changes. |

**Example**

<CodeGroup>

```ts TypeScript
import { Revdoku } from 'revdoku';

const client = new Revdoku();
const { data } = await client.api.updateSupportInstruction({
  projectId: 'prj_example',
  supportInstructionId: 'ins_example',
  supportInstructionUpdateRequest: {},
});
console.log(data);
```

```python Python
from revdoku import Revdoku, SupportInstructionUpdateRequest

client = Revdoku()
response = client.api.update_support_instruction(
    "prj_example",
    "ins_example",
    SupportInstructionUpdateRequest(),
)
print(response.data)
```

```sh cURL
curl -X PATCH "https://api.revdoku.com/v1/projects/prj_example/support_instructions/ins_example" \
  -H "Authorization: Bearer $REVDOKU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

</CodeGroup>

**Response** `200`

| Field | Type | Description |
| --- | --- | --- |
| `support_instruction` | SupportInstruction | Fields as in [List the support instructions](#list-the-support-instructions). |

## Delete a support instruction

`DELETE /v1/projects/{project_id}/support_instructions/{support_instruction_id}`

The delete is permanent: the text is gone. A ticket's sources can still name its id. expected_version works as in a change.

Requires project write permission.

**Parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | string | yes |  |
| `support_instruction_id` | string | yes |  |
| `expected_version` | integer | no | The version that you read. Another one answers 409 SUPPORT_INSTRUCTION_VERSION_CONFLICT. |

**Example**

<CodeGroup>

```ts TypeScript
import { Revdoku } from 'revdoku';

const client = new Revdoku();
const { data } = await client.api.deleteSupportInstruction({
  projectId: 'prj_example',
  supportInstructionId: 'ins_example',
});
console.log(data);
```

```python Python
from revdoku import Revdoku

client = Revdoku()
response = client.api.delete_support_instruction("prj_example", "ins_example")
print(response.data)
```

```sh cURL
curl -X DELETE "https://api.revdoku.com/v1/projects/prj_example/support_instructions/ins_example" \
  -H "Authorization: Bearer $REVDOKU_API_KEY"
```

</CodeGroup>

**Response** `200`

| Field | Type | Description |
| --- | --- | --- |
| `deleted` | boolean `true` |  |
| `id` | string | ID of the deleted resource. A webhook delete returns the project ID. |


---

published with [Revdoku](https://revdoku.com)
