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

# set_ticket_status

> Mark a Montra ticket done, or send it back to todo.

Flips a ticket between `todo` and `done`. Call it with `done` as soon as you finish implementing a ticket — this is how progress gets back to the person who recorded it, and it is what they watch in the app.

Setting a status that is already set is harmless; the call is idempotent.

## Input

<ParamField body="ticketId" type="string" required>
  Id of the Montra ticket (UUID).
</ParamField>

<ParamField body="status" type="string" required>
  New status for the ticket: `todo` or `done`.
</ParamField>

## Output

<ResponseField name="ticket" type="object" required>
  <Expandable title="properties">
    <ResponseField name="id" type="string" required>Ticket id.</ResponseField>
    <ResponseField name="documentId" type="string" required>Id of the document the ticket belongs to.</ResponseField>
    <ResponseField name="title" type="string" required>Short title for the ticket.</ResponseField>
    <ResponseField name="summary" type="string" required>One-line gist shown next to the title. Empty string when the ticket has none.</ResponseField>
    <ResponseField name="body" type="string" required>Markdown implementation spec. Empty string when the ticket has none.</ResponseField>
    <ResponseField name="status" type="string" required>Status after the change: `todo` or `done`.</ResponseField>
    <ResponseField name="sortRank" type="string" required>Opaque ordering key that places the ticket within its document.</ResponseField>
    <ResponseField name="timestampMs" type="number" required>Offset into the source recording, in milliseconds, that the ticket points at.</ResponseField>
    <ResponseField name="inputId" type="string" required>Id of the input whose generation produced this ticket. `null` for hand-added tickets.</ResponseField>
    <ResponseField name="createdAt" type="string" required>ISO 8601 creation timestamp.</ResponseField>
    <ResponseField name="updatedAt" type="string" required>ISO 8601 timestamp of this change.</ResponseField>
  </Expandable>
</ResponseField>

## Notes

* The change is flagged as a manual edit, so a generation still running in the background will not overwrite the status you set.
* Tickets outside the workspace this connection is bound to read as not found. See [workspace binding](/authentication#workspace-binding).
* Related: [`update_ticket`](/tools/update-ticket), [`link_ticket_issue`](/tools/link-ticket-issue), and the [agent workflow guide](/guides/agent-workflow).
