POST管理接口
新增公告
创建对外公告。
URL
/api/v1/admin/projects/{projectKey}/announcements鉴权方式
需要管理员 JWT 或 API Key,二者等价(Authorization: Bearer <token>)
请求参数
Path 参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| projectKey | string | 是 | 项目主键 project_key(大小写不敏感) |
Header 参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| Authorization | string | 是 | Bearer <管理员 JWT 或 API Key> |
请求体
{
"title": "系统维护通知",
"content": "平台将于本周六 02:00-04:00 停机维护。",
"is_pinned": true,
"is_hidden": false,
"platforms": [
"windows",
"web"
],
"author": "运维团队",
"min_comparable_version": "2.0.0",
"translations": [
{
"locale": "en-US",
"title": "Scheduled maintenance",
"content": "The platform will be down this Saturday 02:00-04:00."
}
],
"published_at": 1760000000
}响应示例
201 响应
{
"id": "ann-001",
"title": "系统维护通知",
"content": "平台将于本周六 02:00-04:00 停机维护。",
"is_pinned": true,
"is_hidden": false,
"platforms": [
"windows",
"web"
],
"author": "运维团队",
"min_comparable_version": "2.0.0",
"max_comparable_version": null,
"locale": null,
"published_at": 1760000000,
"created_at": 1760000000,
"updated_at": 1760000000
}POST
