# Announcement Banner ## GetAnnouncementBanner `client.Organizations.AnnouncementBanner.Get(ctx, body) (*OrganizationAnnouncementBannerGetResponse, error)` **post** `/gitpod.v1.OrganizationService/GetAnnouncementBanner` Retrieves the announcement banner configuration for an organization. Use this method to fetch the current announcement banner settings. All organization members can read the banner configuration. ### Examples - Get announcement banner: ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ``` ### Parameters - `body OrganizationAnnouncementBannerGetParams` - `OrganizationID param.Field[string]` organization_id is the ID of the organization ### Returns - `type OrganizationAnnouncementBannerGetResponse struct{…}` - `Banner AnnouncementBanner` banner is the announcement banner configuration - `OrganizationID string` organization_id is the ID of the organization - `Enabled bool` enabled controls whether the banner is displayed - `Message string` message is the banner message displayed to users. Supports basic Markdown. ### Example ```go package main import ( "context" "fmt" "github.com/gitpod-io/gitpod-sdk-go" "github.com/gitpod-io/gitpod-sdk-go/option" ) func main() { client := gitpod.NewClient( option.WithBearerToken("My Bearer Token"), ) announcementBanner, err := client.Organizations.AnnouncementBanner.Get(context.TODO(), gitpod.OrganizationAnnouncementBannerGetParams{ OrganizationID: gitpod.F("b0e12f6c-4c67-429d-a4a6-d9838b5da047"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", announcementBanner.Banner) } ``` #### Response ```json { "banner": { "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "enabled": true, "message": "message" } } ``` ## UpdateAnnouncementBanner `client.Organizations.AnnouncementBanner.Update(ctx, body) (*OrganizationAnnouncementBannerUpdateResponse, error)` **post** `/gitpod.v1.OrganizationService/UpdateAnnouncementBanner` Updates the announcement banner configuration for an organization. Use this method to configure the announcement banner displayed to all users. Only organization admins can update the banner. Requires Enterprise tier. ### Examples - Enable announcement banner: ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" message: "Scheduled maintenance on Saturday 10pm-2am UTC" enabled: true ``` - Disable announcement banner: ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" enabled: false ``` ### Parameters - `body OrganizationAnnouncementBannerUpdateParams` - `OrganizationID param.Field[string]` organization_id is the ID of the organization - `Enabled param.Field[bool]` enabled controls whether the banner is displayed - `Message param.Field[string]` message is the banner message. Supports basic Markdown. Maximum 1000 characters. ### Returns - `type OrganizationAnnouncementBannerUpdateResponse struct{…}` - `Banner AnnouncementBanner` banner is the updated announcement banner configuration - `OrganizationID string` organization_id is the ID of the organization - `Enabled bool` enabled controls whether the banner is displayed - `Message string` message is the banner message displayed to users. Supports basic Markdown. ### Example ```go package main import ( "context" "fmt" "github.com/gitpod-io/gitpod-sdk-go" "github.com/gitpod-io/gitpod-sdk-go/option" ) func main() { client := gitpod.NewClient( option.WithBearerToken("My Bearer Token"), ) announcementBanner, err := client.Organizations.AnnouncementBanner.Update(context.TODO(), gitpod.OrganizationAnnouncementBannerUpdateParams{ OrganizationID: gitpod.F("b0e12f6c-4c67-429d-a4a6-d9838b5da047"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", announcementBanner.Banner) } ``` #### Response ```json { "banner": { "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "enabled": true, "message": "message" } } ``` ## Domain Types ### Announcement Banner - `type AnnouncementBanner struct{…}` - `OrganizationID string` organization_id is the ID of the organization - `Enabled bool` enabled controls whether the banner is displayed - `Message string` message is the banner message displayed to users. Supports basic Markdown.