---
title: "Add message to the system"
method: POST
path: "/messages"
tags: ["Messages"]
---

# Add message to the system

`POST /messages`

Usable values for `messageLevel` are `success`, `info`, `warning`, and `error`. This affects the CSS class of
the displayed message. Values in the `tags` list can be `main`, a project name, or a project group name.
The format of `duration` is the same as Java's `java.time.Duration` class.

## Request body

- MessageCreateRequest
  - `tags` string[], required
  - `messageLevel` 'success' | 'info' | 'warning' | 'error', required
  - `text` string, required
  - `duration` string — Java `java.time.Duration` string.

## Response `201`

Message added.

---

[API](https://skmtc.net/oracle/apis/opengrok-restful-api.md) · [All operations](https://skmtc.net/oracle/apis/opengrok-restful-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oracle/opengrok-restful-api/revisions/4844bf710203/schema)
