API 参考 / notifications
POST /api/v1/notifications/read · markNotificationsRead
把当前登录用户的通知标记为已读。传 ids 只标记指定通知;all=true 标记该用户全部未读为已读(ids 忽略)。 只能改自己的通知(actor 来自 session);对他人的通知 id 无效果,不报错。返回操作后该用户的未读总数。
鉴权:项目 API Token(Authorization: Bearer wfp_…)。详见 Agent 接入。
idsallunreadCount(必填)401:Problem 错误响应403:Problem 错误响应422:Problem 错误响应curl -X POST "https://你的项目.workflow.games/api/v1/notifications/read" \
-H "Authorization: Bearer wfp_…" \
-H "content-type: application/json" \
--data '{"ids":["018f3c2e-0000-7000-8000-000000000000"],"all":true}'HTTP/1.1 200
{
"unreadCount": 1
}合同真值:OpenAPI 3.1(0.1.0)。
相关:Agent 接入指南 · 使用指南 · API 参考索引