Reasons

Changes how a Reason works from now on: its name, avatar and plain-text instructions; the model, reasoning effort and repositories new Sessions under it start with when their create names none; whether everyone in the workspace has it (visibility); and whether people outside the team may talk to it (audience). Sessions already running are unchanged. Fields left out keep their value.

The Reason's owner and the people it is shared with as managers (a role set in the Reason app) make these changes; anyone else it is shared with gets 403 reason_manager_required, and an id the caller cannot see returns 404. The main Reason is always called Reason (409 main_reason_name_fixed) and stays personal (409 main_reason_personal or main_reason).

<sub>Scope: run</sub>

patch/v3/organizations/{orgId}/reasons/{reasonId}

Request

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

Request body

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.

namestring

The name to list the Reason under from now on; its conversation Session is retitled to match. The main Reason keeps its name (409).

default_modelstring nullable

The model new Sessions under this Reason start on when their create names none, by an id listAgentModels returns, or null to use the workspace's default again. Sessions already running keep their model. An id this workspace cannot choose is refused with 400 invalid_model.

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

The reasoning effort those Sessions start at, or null for the model's default. Sent only together with default_model.

default_repositoriesstring[]

The connected owner/name repositories new Sessions under this Reason check out when their create names none: up to 6, unique, the first being the Session's own and the rest its context. Send an empty list to clear them.

visibility'workspace' | 'private'

workspace shares the Reason with everyone in the workspace, who can then talk to it and start Sessions under it; private stops that (people it is shared with by name keep it). Sharing a Reason makes it a team Reason: its Sessions run in the cloud and never use anyone's personal secrets.

audience'customer' | 'default'

customer lets people outside your team talk to a team Reason (a shared, named Reason; 409 reason_not_team otherwise, 409 main_reason for the main one): from then on its runs use only what was added to the Reason itself. default makes it a plain team or personal Reason again, as its sharing says. Applied after every other field.

Response

The updated 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 new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional 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