> ## Documentation Index
> Fetch the complete documentation index at: https://docs.melso.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Melso product MCP: https://melso.ai/api/mcp (OAuth; one company per grant). REST: https://melso.ai. Documentation-search MCP: https://docs.melso.ai/mcp. The docs search server does not act on customer accounts.
>
> Use the live tool schema and respect company membership. Ask the person to authorize the exact fiscal document version in the signed-in app. A professional prepares and files included returns after authorization; AI does not file alone. A prepared file or approval receipt is not evidence of filing. Never claim completion from an accepted Task or Run. Keep credentials out of chat and logs. Agents features are internal or by private invitation.

# Messages and interactions

> Send Task input, page conversations, and respond to questions with the right actor.

<Info>Melso Agents is available only internally or by private invitation. Agents-specific features require existing access. For the autónomo fiscal service, see [Get started](/essentials/quickstart).</Info>

Use `/input` to request execution. `/messages` posts discussion without scheduling a Run. On `task.needs_input`, fetch the interaction identified by the event and answer as its recipient. Answering or declining can enqueue a continuation Run; use the Task ID to track it.

A completed Run’s reply is the newest message with `role: "assistant"` whose `run_id` is that Run’s ID. The [Messages reference](/api-reference/tags/messages) defines these fields on `TaskMessageResponse`, also used by `task.message` stream events. Melso stores the reply with secret-looking values redacted. A reply that arrives double-escaped, with no real line break inside it but `\n` or `\r` escape sequences in its place, is decoded (`\n`, `\r`, `\t` and `\\`); leading and trailing line breaks do not count. Any single-line reply that contains `\n` or `\r` is decoded the same way, including a path such as `C:\new\folder`. Other replies keep their backslashes, so code and paths in a multi-line answer stay intact. The Run’s `result.output` keeps the raw harness text, so read the reply from the messages. `kind: "no_response"` marks a Run that finished without text or attachments, and a message with `failure_reason` reports a Run that stopped.

## Clarification payloads

`payload.questions` contains 1–20 objects with unique `id:string`, `label:string`, `type:string`, optional `required:boolean`, and `options:[{value:string,label:string}]` for selection types. Supported types are `text`, `textarea`, `date`, `boolean`, `number`, `single_select`, `multi_select`. Answers use matching JSON types; multi-select is an array of strings. Omit optional unanswered keys; an empty string is not a skip. Required answers cannot be omitted.

Example respond body: `{"response":{"answers":{"approach":"durable","budget":100}}}`. Use the [Interactions reference](/api-reference/tags/interactions) with the IDs and types from the stored questions.

Connection interactions use `payload.connect:string[]` instead of questions. They require the recipient to complete account authorization; posting arbitrary answers does not bypass the server connection check.

## API reference

Request fields, response types and endpoint permissions are defined in the [Messages reference](/api-reference/tags/messages). See [Pagination](/api-reference/pagination) for list conventions, or start with the [API quickstart](/api-reference/quickstart).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.