> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeplo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GET Q&A Pairs

> Manage question-answer pairs for AI training.

## Get Q\&A pairs

`GET /api/training/:siteId/qa`

Manage question-answer pairs for the AI chatbot knowledge base.

### Headers

**Cookie** `string` *required*

Session cookie (login via POST /api/auth/login)

**siteId** `integer` *required*

Site ID.

```bash cURL theme={null}
curl https://zeplo.ai/api/training/1/qa \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw"
```

```json Response theme={null}
{
  "success": true,
  "data": [
    {
      "id": 1,
      "siteId": 1,
      "question": "What are your business hours?",
      "answer": "We are open Monday to Friday, 9 AM to 6 PM IST.",
      "category": "general",
      "createdAt": "2026-01-01T08:00:00Z"
    }
  ]
}
```

***

## Create Q\&A pair

`POST /api/training/:siteId/qa`

**siteId** `integer` *required*

Site ID.

### Body parameters

**question** `string` *required*

The question text.

**answer** `string` *required*

The answer text.

**category** `string`

Category for the Q\&A pair.

```json theme={null}
{
  "question": "How do I track my order?",
  "answer": "You can track your order by visiting our website and entering your order number.",
  "category": "orders"
}
```

```bash cURL theme={null}
curl -X POST https://zeplo.ai/api/training/1/qa \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "How do I track my order?",
    "answer": "You can track your order by visiting our website and entering your order number.",
    "category": "orders"
  }'
```

***

## Update Q\&A pair

`PUT /api/training/qa/:qaId`

**qaId** `integer` *required*

Q\&A pair ID.

### Body parameters

**question** `string`

Updated question text.

**answer** `string`

Updated answer text.

```json theme={null}
{
  "question": "Updated question?",
  "answer": "Updated answer."
}
```

```bash cURL theme={null}
curl -X PUT https://zeplo.ai/api/training/qa/1 \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "Updated question?",
    "answer": "Updated answer."
  }'
```

***

## Delete Q\&A pair

`DELETE /api/training/qa/:qaId`

**qaId** `integer` *required*

Q\&A pair ID.

```bash cURL theme={null}
curl -X DELETE https://zeplo.ai/api/training/qa/1 \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.