---
title: "更新公告"
method: PUT
path: "/admin/announcements/{id}"
tags: ["管理员管理"]
---

# 更新公告

`PUT /admin/announcements/{id}`

管理员更新公告信息

## Path parameters

- `id` integer, required

## Request body

- AdminUpdateAnnouncementRequest
  - `content` string
  - `contentHtml` string
  - `endTime` string
  - `id` integer
  - `isSticky` boolean
  - `priority` integer
  - `startTime` string
  - `status` integer
  - `title` string
  - `type` 'homepage' | 'topbar'

## Response `200`

更新成功

- CommonResponse
  - `code` integer
  - `data` unknown
  - `message` string
  - `msg` string

## Other responses

- `400` — 参数错误
- `500` — 更新失败

---

[API](https://skmtc.net/oneclickvirt/apis/oneclickvirt-api.md) · [All operations](https://skmtc.net/oneclickvirt/apis/oneclickvirt-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneclickvirt/oneclickvirt-api/versions/1f98232296de/schema)
