Message

Submit a new message to the system.

Push a new message to the systems outbound message queue. The system will continuously attempt to send the message until it is either fully transmitted, or the send deadline is expired.

post/api/v1/messages

Query parameters

reply_timeoutinteger

Amount of seconds to wait for a reply to this message to come in. If not set, the system won't wait for a reply and return the ID of the message, which can be used later. If set, the system will wait for at most the given amount of seconds for a reply to come in. If a reply arrives, it is returned to the client. If not, the message ID is returned for later use.

Request body

payloadstring byte

The message to send, base64 encoded

Example request

{
  "dst": {
    "ip": "249:abcd:0123:defa::1"
  },
  "payload": "xuV+"
}

Response

We received a reply withing the specified timeout

idstring hex

Id of the message, hex encoded

src_ipstring ipv6

Sender overlay IP address

src_pkstring hex

Sender public key, hex encoded

dst_ipstring ipv6

Receiver overlay IP address

dst_pkstring hex

Receiver public key, hex encoded. This is the public key of the system

payloadstring byte

The message payload, encoded in standard alphabet base64

Example response

{
  "id": "0123456789abcdef",
  "src_ip": "249:abcd:0123:defa::1",
  "src_pk": "fedbca9876543210fedbca9876543210fedbca9876543210fedbca9876543210",
  "dst_ip": "34f:b680:ba6e:7ced:355f:346f:d97b:eecb",
  "dst_pk": "02468ace13579bdf02468ace13579bdf02468ace13579bdf02468ace13579bdf",
  "payload": "xuV+"
}

Changes