Chat & run
Mengirim pesan, streaming balasan, thread chat, dan approval. 16 endpoint
GET /agent-runs
Parameter
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
botId (query) | string |
Contoh
bash
curl -X GET 'https://api.lexcetha.com/api/v1/agent-runs' \
-H "Authorization: Bearer $LEX_TOKEN"POST /agent-runs
Body permintaan
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
conversationId | string | ||
botId | string | ||
message | string | ya | panjang 1–20000 |
mode | "nalar" | "patih" | "cendikia" | ||
attachmentIds | string[] | maks 5 item | |
mentions | object[] | maks 10 item | |
mentions[].type | "connector" | "plugin" | "mini_program" | ya | |
mentions[].ref | string | ya | panjang 1–120 |
mentions[].name | string | ya | panjang 1–120 |
Contoh
bash
curl -X POST 'https://api.lexcetha.com/api/v1/agent-runs' \
-H "Authorization: Bearer $LEX_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"message":"string"}'GET /agent-runs/{runId}
Parameter
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
runId (path) | string | ya |
Contoh
bash
curl -X GET 'https://api.lexcetha.com/api/v1/agent-runs/:runId' \
-H "Authorization: Bearer $LEX_TOKEN"POST /agent-runs/{runId}/cancel
Parameter
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
runId (path) | string | ya |
Contoh
bash
curl -X POST 'https://api.lexcetha.com/api/v1/agent-runs/:runId/cancel' \
-H "Authorization: Bearer $LEX_TOKEN"GET /agent-runs/{runId}/tool-executions
Parameter
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
runId (path) | string | ya |
Contoh
bash
curl -X GET 'https://api.lexcetha.com/api/v1/agent-runs/:runId/tool-executions' \
-H "Authorization: Bearer $LEX_TOKEN"GET /agent-runs/{runId}/events
Parameter
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
runId (path) | string | ya |
Contoh
bash
curl -X GET 'https://api.lexcetha.com/api/v1/agent-runs/:runId/events' \
-H "Authorization: Bearer $LEX_TOKEN"GET /chats
Contoh
bash
curl -X GET 'https://api.lexcetha.com/api/v1/chats' \
-H "Authorization: Bearer $LEX_TOKEN"GET /chats/thread
Parameter
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
botId (query) | string |
Contoh
bash
curl -X GET 'https://api.lexcetha.com/api/v1/chats/thread' \
-H "Authorization: Bearer $LEX_TOKEN"DELETE /chats/thread/messages
Parameter
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
botId (query) | string |
Contoh
bash
curl -X DELETE 'https://api.lexcetha.com/api/v1/chats/thread/messages' \
-H "Authorization: Bearer $LEX_TOKEN"GET /conversations
Parameter
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
botId (query) | string |
Contoh
bash
curl -X GET 'https://api.lexcetha.com/api/v1/conversations' \
-H "Authorization: Bearer $LEX_TOKEN"GET /conversations/{conversationId}
Parameter
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
conversationId (path) | string | ya |
Contoh
bash
curl -X GET 'https://api.lexcetha.com/api/v1/conversations/:conversationId' \
-H "Authorization: Bearer $LEX_TOKEN"PATCH /conversations/{conversationId}
Parameter
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
conversationId (path) | string | ya |
Body permintaan
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
title | string | ya | panjang 1–120 |
Contoh
bash
curl -X PATCH 'https://api.lexcetha.com/api/v1/conversations/:conversationId' \
-H "Authorization: Bearer $LEX_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"title":"string"}'DELETE /conversations/{conversationId}
Parameter
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
conversationId (path) | string | ya |
Contoh
bash
curl -X DELETE 'https://api.lexcetha.com/api/v1/conversations/:conversationId' \
-H "Authorization: Bearer $LEX_TOKEN"GET /conversations/{conversationId}/messages
Parameter
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
conversationId (path) | string | ya |
Contoh
bash
curl -X GET 'https://api.lexcetha.com/api/v1/conversations/:conversationId/messages' \
-H "Authorization: Bearer $LEX_TOKEN"GET /approvals/pending
Contoh
bash
curl -X GET 'https://api.lexcetha.com/api/v1/approvals/pending' \
-H "Authorization: Bearer $LEX_TOKEN"POST /approvals/{approvalId}/decision
Parameter
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
approvalId (path) | string | ya |
Body permintaan
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
decision | "approve" | "reject" | ya |
Contoh
bash
curl -X POST 'https://api.lexcetha.com/api/v1/approvals/:approvalId/decision' \
-H "Authorization: Bearer $LEX_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"decision":"approve"}'