POST管理接口

新增公告

创建对外公告。

URL

/api/v1/admin/projects/{projectKey}/announcements

鉴权方式

需要管理员 JWT 或 API Key,二者等价(Authorization: Bearer <token>)

请求参数

Path 参数

名称类型必填说明
projectKeystring项目主键 project_key(大小写不敏感)

Header 参数

名称类型必填说明
AuthorizationstringBearer <管理员 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

Try It Out

请求 URL 预览

/api/v1/admin/projects/verhub/announcements