---
title: "Get a message from the inbound message queue"
method: GET
path: "/api/v1/messages"
tags: ["Message"]
---

# Get a message from the inbound message queue

`GET /api/v1/messages`

Get a message from the inbound message queue. By default, the message is removed from the queue and won't be shown again.
If the peek query parameter is set to true, the message will be peeked, and the next call to this endpoint will show the same message.
This method returns immediately by default: a message is returned if one is ready, and if there isn't nothing is returned. If the timeout
query parameter is set, this call won't return for the given amount of seconds, unless a message is received

## Query parameters

- `peek` boolean
- `timeout` integer
- `topic` string, byte

## Response `200`

Message retrieved

- 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

- `204` — No message ready

---

[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)
