---
title: "Create a message."
method: POST
path: "/message"
tags: ["message"]
---

# Create a message.

`POST /message`

__NOTE__: When authenticating with a client token or basic auth, the request body
must include "appid" referencing an application owned by the authenticated user.
When authenticating with an application token, the application is derived from the
token and any "appid" in the body is ignored.

## Request body

- CreateMessage — The CreateMessage holds information about a message that will be sent.
  - `appid` integer — The application id that send this message. Always set when returned via the API.
  - `extras` object — The extra data sent along the message. The extra fields are stored in a key-value scheme. Only accepted in CreateMessage requests with application/json content-type. The keys should be in the following format: &lt;top-namespace&gt;::[&lt;sub-namespace&gt;::]&lt;action&gt; These namespaces are reserved and might be used in the official clients: gotify android ios web server client. Do not use them for other purposes.
  - `message` string, required — The message. Markdown (excluding html) is allowed.
  - `priority` integer — The priority of the message. If unset, then the default priority of the application will be used.
  - `title` string — The title of the message.

## Response `200`

Ok

- Message — The MessageExternal holds information about a message which was sent by an Application.
  - `appid` integer, required — The application id that send this message.
  - `date` string, date-time, required — The date the message was created.
  - `extras` object — The extra data sent along the message. The extra fields are stored in a key-value scheme. Only accepted in CreateMessage requests with application/json content-type. The keys should be in the following format: &lt;top-namespace&gt;::[&lt;sub-namespace&gt;::]&lt;action&gt; These namespaces are reserved and might be used in the official clients: gotify android ios web server client. Do not use them for other purposes.
  - `id` integer, required — The message id.
  - `message` string, required — The message. Markdown (excluding html) is allowed.
  - `priority` integer — The priority of the message. If unset, then the default priority of the application will be used.
  - `title` string — The title of the message.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden

---

[API](https://skmtc.net/gotify/apis/gotify-rest-api.md) · [All operations](https://skmtc.net/gotify/apis/gotify-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gotify/gotify-rest-api/revisions/7b32fcdb1345/schema)
