Agent network

Ask an agent on the caller's Reason Network

Changed on

Sends a message to an agent on the caller's Reason Network, carried by one of the caller's own computers online running Reason, as send_message is, and returns its answer when it comes within wait_seconds (default 25; a call is held at most 45 s). Recipients see it from <person>/<client>. Pass request_id to keep waiting for an earlier message's answer. Answers 409 agent_network_no_computer when none of the caller's computers is online, and 409 agent_network_send_failed, with request_id and message, when the computer carrying it couldn't send it.

<sub>Scope: run</sub>

post/v3/organizations/{orgId}/agent-network/messages

Request

  • Base URL
    https://api.reasonmachines.com
  • URL
    https://api.reasonmachines.com/v3/organizations/{orgId}/agent-network/messages
  • Auth
    HTTP bearer

Request body

tostring

The recipient's address from networkWho: one session, as person/session.

messagestring

The message. Its first line is what recipients see first.

wait_secondsinteger

How long to wait for the answer (default 25). One call waits at most 45 seconds; with no answer by then, request_id passed back keeps waiting. 0 returns once the message is sent.

request_idstring uuid

An earlier call's request_id: waits for that message's answer instead of sending a new one.

idempotency_keystring

The same key on a retried call returns the first call's message instead of sending again.

Response

Where the message stands, with its answer when one came.

request_idstring required

Pass back as request_id to keep waiting for the answer.

status'answered' | 'sent' | 'waiting' required

answered: answer holds the reply; sent: delivered, no answer yet; waiting: not yet carried onto the network.

tostring nullable required
fromstring nullable required

The address the message was sent from, which recipients reply to.

recipientsstring[] required
errorstring nullable required

Changes