# CreateAnnouncementDto

A model the API reference uses in a request or a response. The operation pages link every field typed as this model here.

Data transfer object for creating a new announcement.

## Fields
- `title` (string) required: The announcement title. (nullable, min length 3, max length 256)
- `body` (string) required: The announcement body content (supports Markdown). Conditional: When ShowOnSignInPage is true. (nullable, min length 10, max length 8192)
- `scope` ([AnnouncementScope](https://docs.winkpg.io/docs/api/models/AnnouncementScope.md)): The organizational scope of the announcement. Conditional: When ShowOnSignInPage is true.
  Values:
  - `Host`: Host-level (system-wide) announcement visible to all users across all tenants. Only host admins can create. TenantId will be null.
  - `Tenant`: Tenant-scoped announcement visible to all users within a specific tenant. Tenant admins can create for their own tenant.
  - `Reseller`: Reseller-scoped announcement visible to users at or below the specified reseller in the hierarchy (including sub-resellers and merchants under them). Uses ResellerPathPrefix with StartsWith matching.
  - `Merchant`: Merchant-scoped announcement visible to users associated with a specific merchant.
- `priority` ([AnnouncementPriority](https://docs.winkpg.io/docs/api/models/AnnouncementPriority.md)): The priority level of the announcement.
  Values:
  - `Normal`: Normal priority. Standard styling in the notification dropdown.
  - `Important`: Important priority. Highlighted styling (e.g., orange badge).
  - `Critical`: Critical priority. Emphasized styling (e.g., red badge). When combined with PopupOnLogin display option, shows as a blocking modal.
- `displayOptions` ([AnnouncementDisplayOptions](https://docs.winkpg.io/docs/api/models/AnnouncementDisplayOptions.md)): How the announcement should be displayed to users.
  Values:
  - `DropdownOnly`: Announcement appears only in the notification dropdown in the header toolbar.
  - `PopupOnLogin`: Announcement appears as a popup modal on user login/page load. The popup is shown once and tracked via UserAnnouncementState.PopupShownAt.
  - `Both`: Announcement appears in both the dropdown and as a popup on login.
- `resellerId` (string(uuid)): The reseller ID for reseller-scoped announcements. Required when Scope is Reseller. Required: When Scope == Reseller. (nullable)
- `merchantId` (string(uuid)): The merchant ID for merchant-scoped announcements. Required when Scope is Merchant. Required: When Scope == Merchant. (nullable)
- `startDateUtc` (string(date-time)): When the announcement becomes active. Null means immediately active. Conditional: When StartDateUtc is not null. (nullable)
- `endDateUtc` (string(date-time)): When the announcement expires. Null means no expiration. Conditional: When EndDateUtc is not null. Conditional: When StartDateUtc is not null and EndDateUtc is not null. Must be > . (nullable)
- `isEnabled` (boolean): Whether the announcement is enabled. Defaults to true.
- `externalLinkUrl` (string): Optional external link URL (e.g., "Learn more" link). Must be a valid HTTPS URL. Conditional: When ExternalLinkUrl is not empty. Conditional: When ExternalLinkUrl is not null. Max length: 2048. (nullable)
- `externalLinkText` (string): Optional external link display text. Conditional: When ExternalLinkText is not null. Max length: 256. Conditional: When ExternalLinkUrl is not empty. (nullable)
- `targetAudience` ([AnnouncementTargetAudienceCreateOrUpdateDto](https://docs.winkpg.io/docs/api/models/AnnouncementTargetAudienceCreateOrUpdateDto.md)) required: The target audience configuration for narrowing within scope. Conditional: When ShowOnSignInPage is true.
  Fields:
  - `type` ([AudienceType](https://docs.winkpg.io/docs/api/models/AudienceType.md)): The type of audience targeting.
    Values:
    - `All`: All users within the announcement's scope receive the announcement.
    - `Roles`: Only users with specific roles within the scope receive the announcement. The RoleNames property specifies which roles.
    - `Users`: Only specific users within the scope receive the announcement. The UserIds property specifies which users.
  - `roleNames` (array<string>): Role names when targeting by roles. Required: When Type == Roles. Max length: 256. Conditional: When Type == All. (nullable)
  - `userIds` (array<string(uuid)>): User IDs when targeting specific users. Required: When Type == Users. Conditional: When Type == All. (nullable)
- `showOnSignInPage` (boolean): Whether the announcement is shown as a banner on the sign-in page, where every visitor sees it before signing in. Defaults to false; a full update that omits it turns the banner off. Turning it on, writing sign-in page links, or updating an announcement already on the sign-in page needs the `Announcements.Scopes.PublishToSignInPage` permission. With it on, the scope must be Host or Tenant, the audience type must be All, and the body must be at most 280 characters. The banner's button is the external link.
- `signInPageLinks` (array<[AnnouncementSignInLinkDto](https://docs.winkpg.io/docs/api/models/AnnouncementSignInLinkDto.md)>): Up to 3 secondary links the sign-in page banner shows beneath its text. Each needs a label and an HTTPS URL. Kept while the banner is off. Omitted or null means no links. (nullable)
  Fields of each item:
  - `label` (string) required: The chip text. Required, at most 64 characters. (nullable, max length 64)
  - `url` (string) required: The link target. Required, and must be an absolute HTTPS URL. Conditional: When Url is not empty. (nullable, max length 2048)

## See also

- [All documentation](https://docs.winkpg.io/llms.txt): the machine-readable index of every public page on this site.
