List Q&A documents

Halaman ini belum tersedia dalam Bahasa Indonesia. Menampilkan bahasa default (English).

List Q&A documents

GEThttps://api.cekat.ai/api/documents

Lists the question-and-answer pairs in your AI agents’ knowledge, newest first.

Authorization

api_keystringheaderrequired

Your Cekat API key, from Settings → Developers & API in the Cekat dashboard.

Authorizationstringheader

Alternative to api_key: send the same key as Bearer YOUR_API_KEY.

Query parameters

ai_agent_idstring<uuid>

Only Q&A for this AI agent.

pageinteger
default: 1min: 1
limitinteger
default: 100min: 1

Response

200
400
401
429

A page of Q&A documents.

successboolean
dataQnaDocument[]
Show child attributes
idstring<uuid>
questionstring
answerstring
ai_agent_idstring<uuid>
created_atstring<date-time>
updated_atstring<date-time> | null
metadataobject
Show child attributes

The request is invalid.

successboolean
messagestring
statusCodeinteger
errorobject
Show child attributes
messagestring
correlationIdstring

Request ID. Include it when contacting Cekat support.

The API key is missing or invalid.

successboolean
messagestring
statusCodeinteger
errorobject
Show child attributes
messagestring
correlationIdstring

Request ID. Include it when contacting Cekat support.

Rate limit exceeded. Wait and retry.

messagestring
GET/api/documents
cURL
JavaScript
Python
PHP
curl --request GET \
  --url 'https://api.cekat.ai/api/documents' \
  --header 'api_key: YOUR_API_KEY'
const response = await fetch('https://api.cekat.ai/api/documents', {
  method: 'GET',
  headers: { 'api_key': 'YOUR_API_KEY' },
});

const data = await response.json();
console.log(data);
import requests

url = "https://api.cekat.ai/api/documents"
headers = {"api_key": "YOUR_API_KEY"}

response = requests.get(url, headers=headers)
print(response.json())
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://api.cekat.ai/api/documents',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['api_key: YOUR_API_KEY'],
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response
200
400
401
429
{
  "success": true,
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "question": "<string>",
      "answer": "<string>",
      "ai_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "created_at": "2026-01-15T09:30:00Z",
      "updated_at": "2026-01-15T09:30:00Z"
    }
  ],
  "metadata": {
    "pagination": {
      "page": 1,
      "limit": 1,
      "total": 1,
      "total_pages": 1
    }
  }
}
{
  "success": true,
  "message": "<string>",
  "statusCode": 1,
  "error": {
    "message": "<string>"
  },
  "correlationId": "<string>"
}
{
  "success": true,
  "message": "<string>",
  "statusCode": 1,
  "error": {
    "message": "<string>"
  },
  "correlationId": "<string>"
}
{
  "message": "<string>"
}