AI Chats
Your conversations with the AI.
AI Chats has nine public methods. They manage chats that already exist: the name, the pin, the favorite mark, the archive and the delete, and the removal of one message. Each one acts for the account whose API key you use.
Starting a chat, sending a message, reading a chat's messages and choosing a plan are done in the dashboard. They have no public method today.
Send a request to a method with your key:
A good answer has code 1. A refused one has a negative code and says why in data.
Every method takes the chat's id as conversation_id, which is the last part of the chat's address in the dashboard. Each also takes an optional workspace_id, to act in a workspace other than your own.
Name and mark a chat
rename_ai_chattakesconversation_idandtitle. The title is trimmed and cut to 120 characters, and an empty one is refused. A chat that was shared with you is renamed only by its owner, and a chat you did not start is refused.pin_ai_chatandunpin_ai_chatpin a chat and take the pin away.favorite_ai_chatandunfavorite_ai_chatset and clear the favorite mark, the heart on the chat's card.
Archive and delete
archive_ai_chatmoves a chat out of the Active list and into Archived. Only the person who started the chat, or the owner of the space, can archive it.unarchive_ai_chatbrings an archived chat back.delete_ai_chatdeletes a chat for good. It takes only an archived chat: archive first, then delete. Deleting a chat that was shared with you ends the share instead.delete_conversation_itemremoves one message from a chat. It takesconversation_item_id, and only a message you wrote yourself.
A chat deleted with delete_ai_chat is gone with all its messages. Archive is the step to use when you only want a chat out of the way.