/admin/announcementsCreate a new announcement, supporting draft/scheduled publishing, with the ability to specify target tenants and roles. Reference: CAN-SPAM Act (15 U.S.C. §7701) — Commercial Email Compliance.
Schema: dto.CreateAnnouncementRequest
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
content |
string |
Yes | The system will undergo upgrade maintenance on 2026-05-15 |
||
title |
string |
Yes | System upgrade announcement |
||
expire_at |
string |
No | 2026-05-20T12:00:00Z |
||
publish_at |
string |
No | 2026-05-10T12:00:00Z |
||
target_roles |
array of string |
No |
| Status | Description | Schema |
|---|---|---|
| 201 | Created successfully | dto.AnnouncementDetailResponse |
| 400 | Invalid request parameters | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 401 | Unauthenticated | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 403 | Insufficient permissions | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 404 | Resource not found | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 500 | Internal server error | gitee_com_linmes_authms_base_dto.SimpleResponse |
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
data |
dto.AnnouncementResponse |
No | |||
message |
string |
No | |||
timestamp |
string |
No |
Announcement info response
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
content |
string |
No | The system will undergo upgrade maintenance on 2026-05-15 |
||
created_at |
string |
No | 2026-05-09T12:00:00Z |
||
dismissals |
integer |
No | 5 |
||
expire_at |
string |
No | 2026-05-20T12:00:00Z |
||
id |
string |
No | ann_abc123 |
||
publish_at |
string |
No | 2026-05-10T12:00:00Z |
||
status |
string |
No | published |
||
target_roles |
array of string |
No | |||
tenant_id |
string |
No | tnt_xyz789 |
||
title |
string |
No | System upgrade announcement |
||
updated_at |
string |
No | 2026-05-09T12:00:00Z |
||
views |
integer |
No | 100 |
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
message |
string |
No | |||
timestamp |
string |
No |