Cody
App · 18 actions
Work with Cody assistants, knowledge-base documents, conversations and messages.
Actions
| Action | What it does |
|---|---|
| Create conversation | Start a conversation with a Cody assistant. |
| Create folder | Create a knowledge-base folder. |
| Create text document | Add text to an existing knowledge-base folder. |
| Delete conversation | Remove a conversation. |
| Delete document | Remove a document from the knowledge base. |
| Get conversation | Read a conversation by ID. |
| Get document | Read a knowledge-base document. |
| Get folder | Read a knowledge-base folder. |
| Get message | Read a conversation message. |
| Import webpage | Add a public webpage to a knowledge-base folder. |
| List bots | Find Cody assistants in the connected workspace. |
| List conversations | Find conversations by assistant or name. |
| List documents | Find documents by folder, conversation or search text. |
| List folders | Find knowledge-base folders by name. |
| List messages | Read messages in a conversation. |
| Rename folder | Change the name of a knowledge-base folder. |
| Send message | Send a message and get the assistant’s reply. |
| Update conversation | Set the name, assistant and optional focus documents on a conversation. |
Create conversation
Start a conversation with a Cody assistant.
Inputs
- Name
nametextRequired - Name.
- Bot
bot_idtextRequired - Bot id.
- Document ids
document_idslist - Only documents that exist in the folders the bot has access to are allowed. You can give bot access to all folders if you wish to limit documents from your whole knowledge base.
Outputs
dataobject- The response from Cody.
Example output
{
"data": {
"data": {
"bot_id": "example",
"created_at": 1,
"id": "example",
"name": "example"
}
}
}Create folder
Create a knowledge-base folder.
Inputs
- Name
nametextRequired - Name.
Outputs
dataobject- The response from Cody.
Example output
{
"data": {
"data": {
"created_at": 1,
"id": "example",
"name": "example"
}
}
}Create text document
Add text to an existing knowledge-base folder.
Inputs
- Name
nametextRequired - Name.
- Folder
folder_idtextRequired - Folder id.
- Content
contenttextRequired - Up to 768 KB of text or html only.
Outputs
dataobject- The response from Cody.
Example output
{
"data": {
"data": {
"content_url": "example",
"created_at": 1,
"folder_id": "example",
"id": "example",
"name": "example",
"status": "syncing"
}
}
}Delete conversation
Remove a conversation.
Inputs
- Id
idtextRequired - Id of the conversation
Outputs
dataobject- The response from Cody.
Example output
{
"data": {}
}Delete document
Remove a document from the knowledge base.
Inputs
- Id
idtextRequired - Id.
Outputs
dataobject- The response from Cody.
Example output
{
"data": {}
}Get conversation
Read a conversation by ID.
Inputs
- Id
idtextRequired - Id of the conversation
Outputs
dataobject- The response from Cody.
Example output
{
"data": {
"data": {
"bot_id": "example",
"created_at": 1,
"id": "example",
"name": "example"
}
}
}Get document
Read a knowledge-base document.
Inputs
- Id
idtextRequired - Id.
Outputs
dataobject- The response from Cody.
Example output
{
"data": {
"data": {
"content_url": "example",
"created_at": 1,
"folder_id": "example",
"id": "example",
"name": "example",
"status": "syncing"
}
}
}Get folder
Read a knowledge-base folder.
Inputs
- Id
idtextRequired - Id.
Outputs
dataobject- The response from Cody.
Example output
{
"data": {
"data": {
"created_at": 1,
"id": "example",
"name": "example"
}
}
}Get message
Read a conversation message.
Inputs
- Id
idtextRequired - ID of the message.
Outputs
dataobject- The response from Cody.
Example output
{
"data": {
"data": {
"content": "example",
"conversation_id": "example",
"created_at": 1,
"failed_responding": false,
"flagged": false,
"id": "example",
"machine": false,
"sources": {
"data": []
},
"usage": {
"credits": 1.0,
"tokens": 1
}
}
}
}Import webpage
Add a public webpage to a knowledge-base folder.
Inputs
- Folder
folder_idtextRequired - Folder id.
- Url
urltextRequired - Valid and publicly accessible webpage URL.
Outputs
dataobject- The response from Cody.
Example output
{
"data": {
"data": {
"content_url": "example",
"created_at": 1,
"folder_id": "example",
"id": "example",
"name": "example",
"status": "syncing"
}
}
}List bots
Find Cody assistants in the connected workspace.
Inputs
- Keyword
keywordtext - Keyword to filter the list of bots to only those that at least partially match the bot name.
Outputs
dataobject- The response from Cody.
Example output
{
"data": {
"data": [],
"meta": {
"pagination": {
"count": 1,
"next_page": 1,
"per_page": 1,
"previous_page": 1,
"total": 1,
"total_pages": 1
}
}
}
}List conversations
Find conversations by assistant or name.
Inputs
- Bot
bot_idtext - Id of the bot to filter the list of conversations to only those that are using the selected bot.
- Keyword
keywordtext - Keyword to filter the list of conversations to only those that at least partially match the conversation name.
Outputs
dataobject- The response from Cody.
Example output
{
"data": {
"data": [],
"meta": {
"pagination": {
"count": 1,
"next_page": 1,
"per_page": 1,
"previous_page": 1,
"total": 1,
"total_pages": 1
}
}
}
}List documents
Find documents by folder, conversation or search text.
Inputs
- Folder
folder_idtext - Id of the folder to list documents for.
- Conversation id
conversation_idtext - Id of the conversation to only list documents the conversation is focused on.
- Keyword
keywordtext - Keyword to filter the list to documents that partially match the name.
Outputs
dataobject- The response from Cody.
Example output
{
"data": {
"data": [],
"meta": {
"pagination": {
"count": 1,
"next_page": 1,
"per_page": 1,
"previous_page": 1,
"total": 1,
"total_pages": 1
}
}
}
}List folders
Find knowledge-base folders by name.
Inputs
- Keyword
keywordtext - Keyword to filter the list to folders that partially match the name.
Outputs
dataobject- The response from Cody.
Example output
{
"data": {
"data": [],
"meta": {
"pagination": {
"count": 1,
"next_page": 1,
"per_page": 1,
"previous_page": 1,
"total": 1,
"total_pages": 1
}
}
}
}List messages
Read messages in a conversation.
Inputs
- Conversation id
conversation_idtext - Id of the conversation to filter the list of messages to only that conversation.
Outputs
dataobject- The response from Cody.
Example output
{
"data": {
"data": [],
"meta": {
"pagination": {
"count": 1,
"next_page": 1,
"per_page": 1,
"previous_page": 1,
"total": 1,
"total_pages": 1
}
}
}
}Rename folder
Change the name of a knowledge-base folder.
Inputs
- Id
idtextRequired - Id.
- Name
nametextRequired - Name.
Outputs
dataobject- The response from Cody.
Example output
{
"data": {
"data": {
"created_at": 1,
"id": "example",
"name": "example"
}
}
}Send message
Send a message and get the assistant’s reply.
Inputs
- Content
contenttextRequired - Content.
- Conversation id
conversation_idtextRequired - Conversation id.
Outputs
dataobject- The response from Cody.
Example output
{
"data": {
"data": {
"content": "example",
"conversation_id": "example",
"created_at": 1,
"failed_responding": false,
"flagged": false,
"id": "example",
"machine": false
}
}
}Update conversation
Set the name, assistant and optional focus documents on a conversation.
Inputs
- Id
idtextRequired - Id of the conversation
- Name
nametextRequired - Name.
- Bot
bot_idtextRequired - Bot id.
- Document ids
document_idslist - Only documents that exist in the folders the bot has access to are allowed. You can give bot access to all folders if you wish to limit documents from your whole knowledge base.
Outputs
dataobject- The response from Cody.
Example output
{
"data": {
"data": {
"bot_id": "example",
"created_at": 1,
"id": "example",
"name": "example"
}
}
}