curl --request POST \
--url https://{host}/v2/workspaces/slug:ai-governance-v2/webhooks/v1/announcements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"targets": {}
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({targets: {}})
};
fetch('https://{host}/v2/workspaces/slug:ai-governance-v2/webhooks/v1/announcements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:ai-governance-v2/webhooks/v1/announcements"
payload = { "targets": {} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"orgSlug": "<string>",
"title": "<string>",
"summary": "<string>",
"targets": {},
"status": "draft",
"expires_at": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Create an announcement
Creates an announcement with validated audience targets. When the
new announcement has status: active, a notifications.new event
is emitted to broadcast the message. Requires
announcements:write permission. Rate-limited to 50 calls per minute.
curl --request POST \
--url https://{host}/v2/workspaces/slug:ai-governance-v2/webhooks/v1/announcements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"targets": {}
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({targets: {}})
};
fetch('https://{host}/v2/workspaces/slug:ai-governance-v2/webhooks/v1/announcements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:ai-governance-v2/webhooks/v1/announcements"
payload = { "targets": {} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"orgSlug": "<string>",
"title": "<string>",
"summary": "<string>",
"targets": {},
"status": "draft",
"expires_at": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Authorizations
User-bound credential carrying an identity: either a session JWT
or a user access token (at:*) generated from the user settings UI.
Send as Authorization: Bearer <token>.
Org API keys (iak_*) are not accepted here - they carry
no user identity. Use the x-prismeai-api-key header instead
(see OrgApiKeyAuth).
Body
Audience targeting object - required, validated server-side.
5002000500002562048draft, active, archived 3264Response
Announcement created.
Audience targeting object - validated and normalized server-side
by internal/validate-announcement-targets. Common shape exposes
roles, permissions, products, userIds.
draft, active, archived Was this page helpful?