Skip to content

MngApproveAINotification

POST ai/notification/approve

Approves a notification and delivers it immediately, so the manager sees the outcome of their decision instead of guessing whether it went out.

Editing the text is a normal path, not a workaround. Pass content and the client receives the edited version: the assistant proposes wording, the person who approves it owns it.

Access Control

Allowed: manager, admin. A client session is refused — it must not approve a message addressed to itself.

Request

POST request
POST https://{broker_domain}/ai/notification/approve
Authorization: <JWT_TOKEN>
Content-Type: application/json

{
  "id": "ntf_7c1…",
  "content": "Your margin level is below 100%. Please top up the account."
}
{
  "command": "MngApproveAINotification",
  "extID": "1",
  "data": { "id": "ntf_7c1…" }
}
await platform.MngApproveAINotification({ id, content });

Parameters

Parameter Type Description
id string Notification id
content string Optional, up to 4000 characters. Replaces the generated text

Response Data

{
  "id": "ntf_7c1…",
  "state": "sent",
  "delivery": [ { "channel": "notify", "ok": true, "response": null } ]
}

state is sent when at least one channel accepted the message. If no channel is available, the state stays approved and delivery explains why — the decision of the manager is kept, and MngRetryAINotification finishes the job once the channel is back.

Errors

Code Error Description
400 AI_INVALID_DATA The notification is not in awaiting_approval, or it does not exist in this brand
403 AI_ACCESS_DENIED The session is not an employee