Banners

Update a banner

PATCH/banners/{id}

Changes the fields you send and returns the banner. title, the display dates and type cannot be null. A lone date is checked against the one stored: display_until before display_from returns 422. role_ids, when sent, replaces the whole set of roles in one step: an unknown role returns 422 exists and nothing changes, and an empty list makes the banner for everyone. Needs permission to change the organisation. dry_run shows the result without saving it. Emits banner.updated with the changed fields, and only when something changed; no email. Sending the earlier values undoes it.

Path parameters

  • idintegerRequired#

    The banner's id. Banners are keyed by integer ids, not UUIDs: a whole number from 1 to 2147483647.

Query parameters

  • dry_runboolean#

    Validate and run the call without committing it, returning what the real call would return with meta.dry_run set.

Request body

application/json, required · BannerUpdate

  • titlestring#

    The headline. Cannot be empty or null.

  • descriptionstring | null#

    The body of the banner, as HTML. Stored as sent.

  • typestring#

    How a reader can respond: dismissible can be closed, confirmable must be confirmed, always_shown cannot be closed.

    One of: dismissible, confirmable, always_shown
  • display_fromstring (date-time)#

    When the banner starts to show. Cannot be null.

  • display_untilstring (date-time)#

    When the banner stops showing. On or after display_from, also the stored one. Cannot be null.

  • background_colourstring | null#

    The background colour as #rrggbb; null goes back to the platform default.

  • text_colourstring | null#

    The text colour as #rrggbb; null goes back to the platform default.

  • expandedboolean#

    Whether the banner opens expanded.

  • role_idsinteger[]#

    Every role of your organisation the banner should be for, replacing the current set. An empty list makes it for every user.

{
  "title": "Scheduled maintenance (rescheduled)",
  "type": "confirmable"
}

Responses

200

The updated banner.

Banner
{
  "data": {
    "id": 1,
    "title": "string",
    "description": "string",
    "type": "dismissible",
    "display_from": "2026-06-12T10:00:00+00:00",
    "display_until": "2026-06-12T10:00:00+00:00",
    "background_colour": "string",
    "text_colour": "string",
    "expanded": true,
    "role_ids": [
      1
    ],
    "created_at": "2026-06-12T10:00:00+00:00",
    "updated_at": "2026-06-12T10:00:00+00:00"
  }
}
401

Authentication failed. error.code is one of invalid_token, expired, revoked.

Error
403

Authorization failed. error.code is one of org_disabled, ip_blocked, missing_scope, scope_disabled, user_disabled.

Error
404

Resource not found (error.code = not_found).

Error
422

The request can't be processed (HTTP 422): validation_failed with one ErrorDetail per problem, or a code documented on the operation.

Error
429

Rate limit exceeded (error.code = rate_limited).

Error

Examples

curl -X PATCH https://your-org-domain/kong/core/api/v2/banners/{id}\
  -H "Authorization: Bearer $HELM_API_KEY"\
  -H "Content-Type: application/json"\
  -d '{
  "title": "Scheduled maintenance (rescheduled)",
  "type": "confirmable"
}'