Skip to content

Interaction runs

10 calls. Every request needs the Authorization header: see the overview.

GET /interactions/processes

EVERY interaction run of the tenant, each with its whole conversation: unbounded and potentially very large. Prefer runs.list({ types: ["Interaction"] }) (paged, summaries).

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Response: InteractionProcess[] (200)

curl -X GET "https://api.maitento.com/interactions/processes" \
-H "Authorization: $MAITENTO_AUTH"
GET /interactions/processes/by-id/{id}

The run with this id. Throws NotFoundError when there is none.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: InteractionProcess (200)

curl -X GET "https://api.maitento.com/interactions/processes/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH"
POST /interactions/processes/by-id/{id}/add-message

Adds a person’s message: answers a run waiting in HumanInteractionRequired, or is queued (queued: true) when the run is mid-turn.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: InteractionAddMessageRequest

FieldTypeRequiredDescription
messageAuthorNamestring | nullThe name to record as the author. Used only when you call with an API key, so an integration can post for the people it serves; with a signed-in session the message is always recorded as you. Left out, an API-key call is recorded as the key’s user.
messageAuthorIduuidThe author’s id, used with messageAuthorName under the same rule.
messagestringyesThe message text.

Response: AddMessageResult (200)

curl -X POST "https://api.maitento.com/interactions/processes/by-id/<id>/add-message" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"message":"..."}'
POST /interactions/processes/by-id/{id}/approve

Approves the tool call a run is waiting on (run.pendingApproval.id): the call is made.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: InteractionApproveToolCallRequest

FieldTypeRequiredDescription
toolCallApprovalIduuidyesThe id of the run’s pendingApproval.

Response: no body (204)

curl -X POST "https://api.maitento.com/interactions/processes/by-id/<id>/approve" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"toolCallApprovalId":"..."}'
POST /interactions/processes/by-id/{id}/reject

Rejects the tool call a run is waiting on; the model is told reason.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: InteractionRejectToolCallRequest

FieldTypeRequiredDescription
toolCallApprovalIduuidyesThe id of the run’s pendingApproval.
reasonstringyesWhy the call was rejected. The agent reads it in place of the call’s result.

Response: no body (204)

curl -X POST "https://api.maitento.com/interactions/processes/by-id/<id>/reject" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"toolCallApprovalId":"...","reason":"..."}'
POST /interactions/processes/by-id/{id}/system-message

Injects a system message into the running conversation.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: InteractionAddSystemMessageRequest

FieldTypeRequiredDescription
contentstringyesThe text of the system message.

Response: no body (204)

curl -X POST "https://api.maitento.com/interactions/processes/by-id/<id>/system-message" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"content":"..."}'
GET /interactions/processes/by-id/{id}/tool-results/{sequence}

The full result of one tool call (when the context item’s result was moved off the run).

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes
sequenceintegeryes

Response: InteractionProcessToolResult (200)

curl -X GET "https://api.maitento.com/interactions/processes/by-id/<id>/tool-results/<sequence>" \
-H "Authorization: $MAITENTO_AUTH"
POST /interactions/processes/by-id/{id}/vote/no

Votes no on the solution proposal, with the reason the agents see.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: InteractionVoteNoRequest

FieldTypeRequiredDescription
messageAuthorNamestring | nullThe name to record as the voter. Used only when you call with an API key, so an integration can vote for the people it serves; with a signed-in session the vote is always recorded as you. Left out, an API-key call is recorded as the key’s user.
messageAuthorIduuidThe voter’s id, used with messageAuthorName under the same rule.
reasonstringyesWhy the person disagrees. The agents read it.

Response: no body (204)

curl -X POST "https://api.maitento.com/interactions/processes/by-id/<id>/vote/no" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"reason":"..."}'
POST /interactions/processes/by-id/{id}/vote/yes

Votes yes on the solution proposal.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: InteractionVoteYesRequest

FieldTypeRequiredDescription
messageAuthorNamestring | nullThe name to record as the voter. Used only when you call with an API key, so an integration can vote for the people it serves; with a signed-in session the vote is always recorded as you. Left out, an API-key call is recorded as the key’s user.
messageAuthorIduuidThe voter’s id, used with messageAuthorName under the same rule.

Response: no body (204)

curl -X POST "https://api.maitento.com/interactions/processes/by-id/<id>/vote/yes" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"messageAuthorName":"...","messageAuthorId":"..."}'
GET /namespaces/{namespaceName}/interactions/processes

The runs of the namespace that have not finished.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes

Response: InteractionProcessWithDetails[] (200)

curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/interactions/processes" \
-H "Authorization: $MAITENTO_AUTH"