A conversation
Your script can hand a task to Sales's own Assistant, as you would in a chat. conversations.create starts a conversation, conversations.send-message sends a message, and conversations.list-messages reads the answers. conversations.list lists your conversations. The conversation is private to you.
A send answers 202 once the Assistant's turn is on its way. Read the reply with conversations.list-messages, passing the seq of your message as after and wait=60, and again while the turn state says running. conversations.stop ends a running turn.
A send spends the same Assistant allowance as the rest of Sales's Assistant. When the allowance is empty, the call answers 402 allowance-exhausted and stores nothing.
Attaching a file
A message may attach files that went through an Upload link, a one-time address for one file, named in uploadIds:
- Ask the API for an Upload link with
uploads.create, with thetargetconversationand the file name. The answer holds the link'surl, anuploadId, thepartSize, the largest file the link takes asmaxBytes, and when the link expires. - Send the bytes to the link. A file up to
partSizebytes can go up whole, as onePUTto the link. A larger file goes up in parts of at mostpartSizebytes. Send each part as aPUTwith?offset=set to the bytes sent so far. ThenPOSTthetotalBytesto the link plus/finish. - Name the upload in
uploadIdsin the one message that uses it. An upload is used once.
The link carries its own authority, so send no bearer to it, and it counts toward no rate limit.
Other ways in
An Agent that speaks MCP does the same through the MCP server at https://demo.mvdm.io/sales/mcp, with send_to_assistant, read_assistant_messages, and create_upload. The REST calls are in the REST guide.