Q& A

Manage Q&A pairs, the exact answers an agent gives to matching questions.

GET
/api/v1/agents/{id}/qa-pairs

List an agent's curated Q&A pairs, newest first, paged with limit/offset and filterable by kind. Requires the read:qa permission.

Authorization

BearerAuth read:qa
AuthorizationBearer <token>

In: header

Scope: read:qa

Path Parameters

id*string

Query Parameters

limit?integer
offset?integer
kind?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/agents/string/qa-pairs"
{
  "items": [
    {
      "id": 7,
      "agentId": "a1b2c3d4e5",
      "kind": "qa",
      "question": "Do you ship internationally?",
      "answer": "Yes, we ship to over 40 countries. Delivery takes 5-10 days.",
      "enabled": true,
      "attachmentCount": 0,
      "createdAt": "2026-08-01T10:00:00.000Z",
      "updatedAt": null
    }
  ],
  "total": 0,
  "limit": 0,
  "offset": 0
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
POST
/api/v1/agents/{id}/qa-pairs

Add a curated question and answer the agent should serve verbatim. The pair is indexed in the background and starts matching shortly after. Requires the write:qa permission.

Authorization

BearerAuth write:qa
AuthorizationBearer <token>

In: header

Scope: write:qa

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/agents/string/qa-pairs" \  -H "Content-Type: application/json" \  -d '{    "question": "Do you ship internationally?",    "answer": "Yes, we ship to over 40 countries. Delivery takes 5-10 days."  }'
{
  "id": 7,
  "agentId": "a1b2c3d4e5",
  "kind": "qa",
  "question": "Do you ship internationally?",
  "answer": "Yes, we ship to over 40 countries. Delivery takes 5-10 days.",
  "enabled": true,
  "attachmentCount": 0,
  "createdAt": "2026-08-01T10:00:00.000Z",
  "updatedAt": null
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
PATCH
/api/v1/agents/{id}/qa-pairs/{pairId}

Change the question, answer, or enabled state of a Q&A pair. Changes are re-indexed in the background. Requires the write:qa permission.

Authorization

BearerAuth write:qa
AuthorizationBearer <token>

In: header

Scope: write:qa

Path Parameters

id*string
pairId*integer

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v1/agents/string/qa-pairs/1" \  -H "Content-Type: application/json" \  -d '{    "enabled": false  }'
{
  "id": 7,
  "agentId": "a1b2c3d4e5",
  "kind": "qa",
  "question": "Do you ship internationally?",
  "answer": "Yes, we ship to over 40 countries. Delivery takes 5-10 days.",
  "enabled": true,
  "attachmentCount": 0,
  "createdAt": "2026-08-01T10:00:00.000Z",
  "updatedAt": null
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
DELETE
/api/v1/agents/{id}/qa-pairs/{pairId}

Delete a Q&A pair and stop it from matching. This cannot be undone. Requires the write:qa permission.

Authorization

BearerAuth write:qa
AuthorizationBearer <token>

In: header

Scope: write:qa

Path Parameters

id*string
pairId*integer

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/api/v1/agents/string/qa-pairs/1"
{
  "deleted": true
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}