curl --location 'https://api.opencopilot.so/backend/chat/init' \
--header 'X-Bot-Token: BOT_TOKEN' \
--header 'X-Session-Id: SESSION_ID' \
{
"type": "text",
"response": [
"text" "The copilot response!"
]
}
Chat API
Initiate chat
This endpoint will initiate a chat with your copilot, it will the copilot name, metdata, and other info.
GET
/
backend
/
chat
/
init
curl --location 'https://api.opencopilot.so/backend/chat/init' \
--header 'X-Bot-Token: BOT_TOKEN' \
--header 'X-Session-Id: SESSION_ID' \
{
"type": "text",
"response": [
"text" "The copilot response!"
]
}
Body
string
Your copilot uniuqe token, can be obtained from the dashboard or from
get copilot endpointstring
The session id, you can generate a new session id for each chat, or use the same session id for the same chat
Response
string
The copilot response type, currently it only support
textobject
copilot information
Show properties
Show properties
string
The copilot response, formatted in Markdown by default
curl --location 'https://api.opencopilot.so/backend/chat/init' \
--header 'X-Bot-Token: BOT_TOKEN' \
--header 'X-Session-Id: SESSION_ID' \
{
"type": "text",
"response": [
"text" "The copilot response!"
]
}

