curl --location --request GET 'https://api.opencopilot.so/backend/copilot/' \
--header 'Accept: application/json' \
--header 'Authorization : Bearer YOU_API_KEY'
[
{
"id": "bf1b1796-9639-48df-99f2-8e39ed4c0e9e",
"name": "My first copilot",
"token": "L34L375dEvMxIuNKrTdy",
"website": "https://www.example.com",
"status": "draft",
"prompt_message": "You are a helpful AI co-pilot. job is to support and help the user\nsometimes you might need to call some API endpoints to get the data you need to answer the user's question.\nyou will be given a context and a question, you need to answer the question based on the context.",
"enhanced_privacy": 0,
"smart_sync": 0,
"swagger_url": "mbWwCbhHXqffJLEU98I8.json",
"is_premade_demo_template": 0,
"created_at": "2023-08-20T08:15:21.000000Z",
"updated_at": "2023-08-20T08:15:21.000000Z",
"deleted_at": null
}
]
Managing copilots via API
Get All Copilots
Get a list of all copilots in the database.
GET
/
backend
/
copilot
curl --location --request GET 'https://api.opencopilot.so/backend/copilot/' \
--header 'Accept: application/json' \
--header 'Authorization : Bearer YOU_API_KEY'
[
{
"id": "bf1b1796-9639-48df-99f2-8e39ed4c0e9e",
"name": "My first copilot",
"token": "L34L375dEvMxIuNKrTdy",
"website": "https://www.example.com",
"status": "draft",
"prompt_message": "You are a helpful AI co-pilot. job is to support and help the user\nsometimes you might need to call some API endpoints to get the data you need to answer the user's question.\nyou will be given a context and a question, you need to answer the question based on the context.",
"enhanced_privacy": 0,
"smart_sync": 0,
"swagger_url": "mbWwCbhHXqffJLEU98I8.json",
"is_premade_demo_template": 0,
"created_at": "2023-08-20T08:15:21.000000Z",
"updated_at": "2023-08-20T08:15:21.000000Z",
"deleted_at": null
}
]
Response
Replace with your domain
We are using
example.com here just for demonstration purposes onlystring
The unique identifier for the copilot.
string
The name of the copilot (“My first copilot” in this case).
string
The token associated with the copilot (“L34L375dEvMxIuNKrTdy” in this case).
string
The website URL associated with the copilot (“https://www.example.com” in this case).
string
The status of the copilot (“draft” in this case).
string
A message describing the copilot’s purpose and instructions.
number
A numeric value indicating enhanced privacy (0 in this case).
number
A numeric value indicating smart synchronization (0 in this case).
string
The URL to the Swagger documentation (“mbWwCbhHXqffJLEU98I8.json” in this case).
number
A numeric value indicating whether it’s a premade demo template (0 in this case).
string
The timestamp when the copilot was created (“2023-08-20T08:15:21.000000Z” in this case).
string
The timestamp when the copilot was last updated (“2023-08-20T08:15:21.000000Z” in this case).
null
Indicates whether the copilot has been deleted (null in this case).
curl --location --request GET 'https://api.opencopilot.so/backend/copilot/' \
--header 'Accept: application/json' \
--header 'Authorization : Bearer YOU_API_KEY'
[
{
"id": "bf1b1796-9639-48df-99f2-8e39ed4c0e9e",
"name": "My first copilot",
"token": "L34L375dEvMxIuNKrTdy",
"website": "https://www.example.com",
"status": "draft",
"prompt_message": "You are a helpful AI co-pilot. job is to support and help the user\nsometimes you might need to call some API endpoints to get the data you need to answer the user's question.\nyou will be given a context and a question, you need to answer the question based on the context.",
"enhanced_privacy": 0,
"smart_sync": 0,
"swagger_url": "mbWwCbhHXqffJLEU98I8.json",
"is_premade_demo_template": 0,
"created_at": "2023-08-20T08:15:21.000000Z",
"updated_at": "2023-08-20T08:15:21.000000Z",
"deleted_at": null
}
]

