Skip to content

Chat & run ​

Mengirim pesan, streaming balasan, thread chat, dan approval. 16 endpoint

GET /agent-runs​

/api/v1/agent-runs · Perlu sesi login

Parameter

FieldTipeWajibCatatan
botId (query)string

Contoh

bash
curl -X GET 'https://api.lexcetha.com/api/v1/agent-runs' \
  -H "Authorization: Bearer $LEX_TOKEN"

POST /agent-runs​

/api/v1/agent-runs · Perlu sesi login

Body permintaan

FieldTipeWajibCatatan
conversationIdstring
botIdstring
messagestringyapanjang 1–20000
mode"nalar" | "patih" | "cendikia"
attachmentIdsstring[]maks 5 item
mentionsobject[]maks 10 item
mentions[].type"connector" | "plugin" | "mini_program"ya
mentions[].refstringyapanjang 1–120
mentions[].namestringyapanjang 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}​

/api/v1/agent-runs/{runId} · Perlu sesi login

Parameter

FieldTipeWajibCatatan
runId (path)stringya

Contoh

bash
curl -X GET 'https://api.lexcetha.com/api/v1/agent-runs/:runId' \
  -H "Authorization: Bearer $LEX_TOKEN"

POST /agent-runs/{runId}/cancel​

/api/v1/agent-runs/{runId}/cancel · Perlu sesi login

Parameter

FieldTipeWajibCatatan
runId (path)stringya

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​

/api/v1/agent-runs/{runId}/tool-executions · Perlu sesi login

Parameter

FieldTipeWajibCatatan
runId (path)stringya

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​

/api/v1/agent-runs/{runId}/events · Perlu sesi login

Parameter

FieldTipeWajibCatatan
runId (path)stringya

Contoh

bash
curl -X GET 'https://api.lexcetha.com/api/v1/agent-runs/:runId/events' \
  -H "Authorization: Bearer $LEX_TOKEN"

GET /chats​

/api/v1/chats · Perlu sesi login

Contoh

bash
curl -X GET 'https://api.lexcetha.com/api/v1/chats' \
  -H "Authorization: Bearer $LEX_TOKEN"

GET /chats/thread​

/api/v1/chats/thread · Perlu sesi login

Parameter

FieldTipeWajibCatatan
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​

/api/v1/chats/thread/messages · Perlu sesi login

Parameter

FieldTipeWajibCatatan
botId (query)string

Contoh

bash
curl -X DELETE 'https://api.lexcetha.com/api/v1/chats/thread/messages' \
  -H "Authorization: Bearer $LEX_TOKEN"

GET /conversations​

/api/v1/conversations · Perlu sesi login

Parameter

FieldTipeWajibCatatan
botId (query)string

Contoh

bash
curl -X GET 'https://api.lexcetha.com/api/v1/conversations' \
  -H "Authorization: Bearer $LEX_TOKEN"

GET /conversations/{conversationId}​

/api/v1/conversations/{conversationId} · Perlu sesi login

Parameter

FieldTipeWajibCatatan
conversationId (path)stringya

Contoh

bash
curl -X GET 'https://api.lexcetha.com/api/v1/conversations/:conversationId' \
  -H "Authorization: Bearer $LEX_TOKEN"

PATCH /conversations/{conversationId}​

/api/v1/conversations/{conversationId} · Perlu sesi login

Parameter

FieldTipeWajibCatatan
conversationId (path)stringya

Body permintaan

FieldTipeWajibCatatan
titlestringyapanjang 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}​

/api/v1/conversations/{conversationId} · Perlu sesi login

Parameter

FieldTipeWajibCatatan
conversationId (path)stringya

Contoh

bash
curl -X DELETE 'https://api.lexcetha.com/api/v1/conversations/:conversationId' \
  -H "Authorization: Bearer $LEX_TOKEN"

GET /conversations/{conversationId}/messages​

/api/v1/conversations/{conversationId}/messages · Perlu sesi login

Parameter

FieldTipeWajibCatatan
conversationId (path)stringya

Contoh

bash
curl -X GET 'https://api.lexcetha.com/api/v1/conversations/:conversationId/messages' \
  -H "Authorization: Bearer $LEX_TOKEN"

GET /approvals/pending​

/api/v1/approvals/pending · Perlu sesi login

Contoh

bash
curl -X GET 'https://api.lexcetha.com/api/v1/approvals/pending' \
  -H "Authorization: Bearer $LEX_TOKEN"

POST /approvals/{approvalId}/decision​

/api/v1/approvals/{approvalId}/decision · Perlu sesi login

Parameter

FieldTipeWajibCatatan
approvalId (path)stringya

Body permintaan

FieldTipeWajibCatatan
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"}'

Lex oleh Gavalytics AI