1. AI
Cekat Open API
  • Chat
    • Connected Platforms
      • List inboxes
      • List inboxes (legacy) (deprecated)
    • Broadcast
      • Create a template
      • Synchronize templates
      • Delete a template
      • List templates
      • Send a template
      • List recipient lists
      • Upload a recipient list
      • List campaigns
      • Create a campaign
      • Get campaign details
      • List campaign messages (deprecated)
      • Check or reserve template-message balance
    • Conversation
      • List conversations
      • Get a conversation
      • Update a conversation
      • List agent assignments
    • Message
      • List messages
      • Get AI credit usage
      • Check or reserve service-message balance
      • List messages in a conversation
      • Get a message
      • Send a WhatsApp message
  • CRM
    • Contact
      • List contacts
      • Create a contact
      • Search contacts
      • Get contact filter fields
      • Get the contact board
      • Create a contact property
      • Get a contact
      • Update a contact
      • Get contact properties
      • Update contact properties
    • Board
      • List CRM boards
      • Get a CRM board
      • Get a CRM column
      • Get a CRM column by name
      • List CRM board items
      • List CRM board items (page-based) (deprecated)
      • Create a CRM board item
      • Delete CRM board items
      • Search CRM board items
      • Get a CRM board item
      • Update a CRM board item
  • AI
    • List Q&A documents
      GET
    • Create Q&A documents
      POST
    • Delete Q&A documents
      DELETE
    • Generate an AI response (beta)
      POST
    • Get the OrderOnline integration
      GET
    • Delete the OrderOnline integration
      DELETE
  • Orders
    • List orders
      GET
    • Create an order
      POST
    • Get an order
      GET
    • Update an order
      PUT
  • Settings
    • List agents
      GET
    • List agents (v2)
      GET
  • Tickets
    • List ticket boards
      GET
    • List ticket templates
      GET
    • List tickets
      POST
    • Create a ticket
      POST
    • Update a ticket
      PUT
    • Add a product to a ticket
      POST
    • Update a ticket product
      PUT
  1. AI

Generate an AI response (beta)

POST
/api/ai_response/beta
Runs one of your AI agents on a chat history you provide and returns its reply, without sending anything to a contact. Use it to test an AI agent or to generate replies for your own channel.
The history must end with a message from the user. Each reply reports the AI credits it used. This endpoint is in beta and may change.

Request

Authorization
Add parameter in header
api_key
Example:
api_key: ********************
Header Params

Body Params application/json

Examples

Responses

🟢200
application/json
Bodyapplication/json

🟠401
Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/api/ai_response/beta' \
--header 'api_key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
  "ai_agent_id": "4d3c2b1a-0f9e-4d8c-b7a6-5f4e3d2c1b0a",
  "messages": [
    {
      "role": "user",
      "message": "Halo, toko buka jam berapa?"
    }
  ]
}'
Response Response Example
200 - 200 The AI agent's reply.
{
  "success": true,
  "messages": [
    {
      "role": "assistant",
      "content": "Halo! Toko kami buka setiap hari pukul 09.00 sampai 21.00 WIB.",
      "credits_used": 1
    }
  ],
  "chat_data": {}
}
Modified at 2026-10-13 05:32:46
Previous
Delete Q&A documents
Next
Get the OrderOnline integration
Built with