---
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
  - `payload` string, byte — The message to send, base64 encoded

## Response `200`

We received a reply withing the specified timeout

- InboundMessage — A message received by the system
  - `id` string, hex — Id of the message, hex encoded
  - `src_ip` string, ipv6 — Sender overlay IP address
  - `src_pk` string, hex — Sender public key, hex encoded
  - `dst_ip` string, ipv6 — Receiver overlay IP address
  - `dst_pk` string, hex — Receiver public key, hex encoded. This is the public key of the system
  - `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

## Changes

- **2023-11-02** `e0eba3e5e2bc` — 8 info
  - added the new optional `query` request parameter `reply_timeout`
  - added the non-success response with the status `408`
  - added the optional property `dst_ip` to the response with the `200` status
  - added the optional property `dst_pk` to the response with the `200` status
  - …4 more
- **2023-10-27** `15ac72e8d54f` — 1 breaking, 1 info
  - the `dst` request property type changed from `string` to no type, and format from `ipv6` to no format
  - added `subschema #1, subschema #2` to the `dst` request property `oneOf` list
- **2023-10-27** `0ebb5659d3ca` — 1 info
  - endpoint added
- **2023-10-26** `1c37c167d50d` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/threefoldtech/apis/mycelium-management/changes/api/v1/messages/post.md)

---

[API](https://skmtc.dev/threefoldtech/apis/mycelium-management.md) · [All operations](https://skmtc.dev/threefoldtech/apis/mycelium-management/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/threefoldtech/mycelium-management/revisions/e0eba3e5e2bc/schema)
