Update a broadcast message

PUT /broadcast_messages/{id}

This feature was introduced in GitLab 8.12.

Path parameters

  • id integer(int32) Required

    Broadcast message ID

application/json

Body

  • message string

    Message to display

  • starts_at string(date-time)

    Starting time

  • ends_at string(date-time)

    Ending time

  • color string

    Background color

  • font string

    Foreground color

  • target_access_levels array[integer(int32)]

    Target user roles

    Values are 10, 20, 30, 40, or 50.

  • target_path string

    Target path

  • broadcast_type string

    Broadcast Type

    Values are banner or notification.

  • dismissable boolean

    Is dismissable

Responses

  • 200 application/json

    Update a broadcast message

    Hide response attributes Show response attributes object
    • id string
    • message string
    • starts_at string
    • ends_at string
    • color string
    • font string
    • target_access_levels string
    • target_path string
    • broadcast_type string
    • dismissable string
    • active string
PUT /broadcast_messages/{id}
curl \
 --request PUT 'https://www.gitlab.com/api/v4/broadcast_messages/{id}' \
 --header "Private-Token: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"message":"string","starts_at":"2025-05-04T09:42:00Z","ends_at":"2025-05-04T09:42:00Z","color":"string","font":"string","target_access_levels":[10],"target_path":"string","broadcast_type":"banner","dismissable":true}'
Request examples
{
  "message": "string",
  "starts_at": "2025-05-04T09:42:00Z",
  "ends_at": "2025-05-04T09:42:00Z",
  "color": "string",
  "font": "string",
  "target_access_levels": [
    10
  ],
  "target_path": "string",
  "broadcast_type": "banner",
  "dismissable": true
}
Response examples (200)
{
  "id": "string",
  "message": "string",
  "starts_at": "string",
  "ends_at": "string",
  "color": "string",
  "font": "string",
  "target_access_levels": "string",
  "target_path": "string",
  "broadcast_type": "string",
  "dismissable": "string",
  "active": "string"
}