---
title: "Submit a new message to the system."
method: POST
path: "/api/v1/messages"
tags: ["Message"]
---

# Submit a new message to the system.

`POST /api/v1/messages`

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.

## Query parameters

- `reply_timeout` integer

## Request body

- PushMessageBody — A message to send to a given receiver
  - `dst` union
    - object — An IP in the subnet of the receiver node
      - `ip` string, ipv6 — The target IP of the message
    - object — The hex encoded public key of the receiver node
      - `pk` string — The hex encoded public key of the target node
  - `topic` string, byte — An optional message topic
  - `payload` string, byte — The message to send, base64 encoded

## Response `200`

We received a reply within the specified timeout

- InboundMessage — A message received by the system
  - `id` string, hex — Id of the message, hex encoded
  - `srcIp` string, ipv6 — Sender overlay IP address
  - `srcPk` string, hex — Sender public key, hex encoded
  - `dstIp` string, ipv6 — Receiver overlay IP address
  - `dstPk` string, hex — Receiver public key, hex encoded. This is the public key of the system
  - `topic` string, byte — An optional message topic
  - `payload` string, byte — The message payload, encoded in standard alphabet base64

## Other responses

- `201` — Message pushed successfully, and not waiting for a reply
- `408` — The system timed out waiting for a reply to the message

---

[API](https://skmtc.net/threefoldtech/apis/mycelium-management.md) · [All operations](https://skmtc.net/threefoldtech/apis/mycelium-management/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/threefoldtech/mycelium-management/versions/65042c1a7b84/schema)
