Reasons

Creates a named Reason for the caller, private to them until they share it (visibility on updateReason). Creating one allocates no machine and starts no work: send it a message (sendReasonMessage) to start.

<sub>Scope: run</sub>

post/v3/organizations/{orgId}/reasons

Request

  • Base URL
    https://api.reasonmachines.com
  • URL
    https://api.reasonmachines.com/v3/organizations/{orgId}/reasons
  • Auth
    HTTP bearer

Request body

namestring required

The name the Reason is listed under in the app, for example Release notes. Surrounding spaces are dropped and inner runs of spaces become one.

instructionsstring

Plain-text guidance for new Sessions started with this Reason. At most 16000 UTF-16 code units to protect fixed Session context. Preserved exactly, including whitespace. Send an empty string to clear it; omitting it keeps the current value on update. Existing Sessions are unchanged.

Response

The new Reason.

idstring uuid required

Reason id. Pass it as reasonId to the other Reason tools.

namestring required

Display name. The main Reason is always called Reason.

user_idstring uuid required

The owner, the only person who can open, rename or archive it.

mineboolean required

True when the caller owns this Reason.

visibility'workspace' | 'private' required

workspace: every member sees it in their list; private: only its owner does.

mainboolean required

True for the person's main Reason, which is always listed and is never renamed or archived.

instructionsstring required

Plain-text guidance for new Sessions started with this Reason. Blank when unset or when the caller does not own the Reason.

session_idstring nullable required

Its conversation Session once it has been opened, and only on the caller's own Reasons; null otherwise. sendReasonMessage and listReasonMessages reach the conversation of any Reason you can open without it.

default_modelstring nullable required

The model a new Session under this Reason starts on when its create names none, by an id listAgentModels returns; null when it uses the workspace's default.

default_reasoning_effort'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'off' nullable required

The reasoning effort that Session starts at when its create names none; null for the model's default.

default_repositoriesstring[] nullable required

The owner/name repositories a new Session under this Reason checks out when its create names none, the first being the Session's own; empty when it has none. Null when the caller cannot start Sessions under this Reason.

audience'personal' | 'team' | 'customer' required

Who talks to it. personal: only its owner; team: the people it is shared with; customer: a team Reason that people outside the team (customers, in Slack for example) also talk to, whose runs use only what was added to the Reason itself.

created_atstring date-time required
updated_atstring date-time required

Changes

    • breaking

      added the pattern ^[^\u0000]*$ to the request property

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the new optional request property

    • info

      added the required property to the response with the status