Skip to content

Chat & runs ​

Send messages, stream replies, chat threads and approvals. 16 endpoints

GET /agent-runs​

/api/v1/agent-runs · Needs a session

Parameters

FieldTypeRequiredNotes
botId (query)string

Example

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

POST /agent-runs​

/api/v1/agent-runs · Needs a session

Request body

FieldTypeRequiredNotes
conversationIdstring
botIdstring
messagestringyeslength 1–20000
mode"nalar" | "patih" | "cendikia"
attachmentIdsstring[]max 5 items
mentionsobject[]max 10 items
mentions[].type"connector" | "plugin" | "mini_program"yes
mentions[].refstringyeslength 1–120
mentions[].namestringyeslength 1–120

Example

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} · Needs a session

Parameters

FieldTypeRequiredNotes
runId (path)stringyes

Example

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 · Needs a session

Parameters

FieldTypeRequiredNotes
runId (path)stringyes

Example

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 · Needs a session

Parameters

FieldTypeRequiredNotes
runId (path)stringyes

Example

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 · Needs a session

Parameters

FieldTypeRequiredNotes
runId (path)stringyes

Example

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

GET /chats​

/api/v1/chats · Needs a session

Example

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

GET /chats/thread​

/api/v1/chats/thread · Needs a session

Parameters

FieldTypeRequiredNotes
botId (query)string

Example

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 · Needs a session

Parameters

FieldTypeRequiredNotes
botId (query)string

Example

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

GET /conversations​

/api/v1/conversations · Needs a session

Parameters

FieldTypeRequiredNotes
botId (query)string

Example

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

GET /conversations/{conversationId}​

/api/v1/conversations/{conversationId} · Needs a session

Parameters

FieldTypeRequiredNotes
conversationId (path)stringyes

Example

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

PATCH /conversations/{conversationId}​

/api/v1/conversations/{conversationId} · Needs a session

Parameters

FieldTypeRequiredNotes
conversationId (path)stringyes

Request body

FieldTypeRequiredNotes
titlestringyeslength 1–120

Example

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} · Needs a session

Parameters

FieldTypeRequiredNotes
conversationId (path)stringyes

Example

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 · Needs a session

Parameters

FieldTypeRequiredNotes
conversationId (path)stringyes

Example

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 · Needs a session

Example

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 · Needs a session

Parameters

FieldTypeRequiredNotes
approvalId (path)stringyes

Request body

FieldTypeRequiredNotes
decision"approve" | "reject"yes

Example

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 by Gavalytics AI