# Announcement Banner ## GetAnnouncementBanner `organizations.announcement_banner.get(AnnouncementBannerGetParams**kwargs) -> AnnouncementBannerGetResponse` **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 - `organization_id: str` organization_id is the ID of the organization ### Returns - `class AnnouncementBannerGetResponse: …` - `banner: AnnouncementBanner` banner is the announcement banner configuration - `organization_id: str` organization_id is the ID of the organization - `enabled: Optional[bool]` enabled controls whether the banner is displayed - `message: Optional[str]` message is the banner message displayed to users. Supports basic Markdown. ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) announcement_banner = client.organizations.announcement_banner.get( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) print(announcement_banner.banner) ``` #### Response ```json { "banner": { "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "enabled": true, "message": "message" } } ``` ## UpdateAnnouncementBanner `organizations.announcement_banner.update(AnnouncementBannerUpdateParams**kwargs) -> AnnouncementBannerUpdateResponse` **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 - `organization_id: str` organization_id is the ID of the organization - `enabled: Optional[bool]` enabled controls whether the banner is displayed - `message: Optional[str]` message is the banner message. Supports basic Markdown. Maximum 1000 characters. ### Returns - `class AnnouncementBannerUpdateResponse: …` - `banner: AnnouncementBanner` banner is the updated announcement banner configuration - `organization_id: str` organization_id is the ID of the organization - `enabled: Optional[bool]` enabled controls whether the banner is displayed - `message: Optional[str]` message is the banner message displayed to users. Supports basic Markdown. ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) announcement_banner = client.organizations.announcement_banner.update( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", enabled=False, ) print(announcement_banner.banner) ``` #### Response ```json { "banner": { "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "enabled": true, "message": "message" } } ``` ## Domain Types ### Announcement Banner - `class AnnouncementBanner: …` - `organization_id: str` organization_id is the ID of the organization - `enabled: Optional[bool]` enabled controls whether the banner is displayed - `message: Optional[str]` message is the banner message displayed to users. Supports basic Markdown. ### Announcement Banner Get Response - `class AnnouncementBannerGetResponse: …` - `banner: AnnouncementBanner` banner is the announcement banner configuration - `organization_id: str` organization_id is the ID of the organization - `enabled: Optional[bool]` enabled controls whether the banner is displayed - `message: Optional[str]` message is the banner message displayed to users. Supports basic Markdown. ### Announcement Banner Update Response - `class AnnouncementBannerUpdateResponse: …` - `banner: AnnouncementBanner` banner is the updated announcement banner configuration - `organization_id: str` organization_id is the ID of the organization - `enabled: Optional[bool]` enabled controls whether the banner is displayed - `message: Optional[str]` message is the banner message displayed to users. Supports basic Markdown.