---
title: "Create a broadcast message"
method: POST
path: "/api/v4/broadcast_messages"
tags: ["broadcast_messages"]
---

# Create a broadcast message

`POST /api/v4/broadcast_messages`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/broadcast_messages`
- Auth: none declared

Creates a broadcast message.

## Request body

- PostApiV4BroadcastMessages: Create a broadcast message
  - `message` string, required: Message to display
  - `starts_at` string, date-time: Starting time
  - `ends_at` string, date-time: Ending time
  - `color` string: Background color (Deprecated. Use "theme" instead.)
  - `font` string: Foreground color (Deprecated. Use "theme" instead.)
  - `target_access_levels` integer[]: Target user roles
  - `target_path` string: Target path
  - `broadcast_type` 'banner' | 'notification': Broadcast type. Defaults to banner
  - `dismissable` boolean: Is dismissable
  - `theme` 'indigo' | 'light-indigo' | 'blue' | 'light-blue' | 'green' | 'light-green' | 'red' | 'light-red' | 'dark' | 'light': The theme for the message

## Response `201`

Create a broadcast message

- APIEntitiesSystemBroadcastMessage: API_Entities_System_BroadcastMessage model
  - `id` integer, required
  - `message` string, required
  - `starts_at` string, date-time, required
  - `ends_at` string, date-time, required
  - `color` string, required
  - `font` string, required
  - `target_access_levels` unknown[], required
    - unknown
  - `target_path` string, required
  - `broadcast_type` string, required
  - `theme` string, required
  - `dismissable` boolean, required
  - `active` boolean, required

---

[API](https://skmtc.dev/gitlab/apis/gitlab-api.md) - [All operations](https://skmtc.dev/gitlab/apis/gitlab-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gitlab/apis/gitlab-api/revisions/b234947ef3f2?raw)
