Notify members
Send a message to members of the workspace. It lands in their inbox and goes out by email, push, or Slack as each member allows.
https://cloud.generalinput.com/v1/platform/notificationsplatform:use on a platform API key. A CLI session always passes.A notification reaches members of the key's workspace only. It always lands in each recipient's General Input inbox, on the web and in the mobile app. The channels you name go out too, but only where that member allows them; a member can turn any channel off in their notification settings. To email anyone outside the workspace, send from the user's own connected mailbox (Gmail, Outlook, Yahoo, AOL, iCloud, or IMAP) instead.
Notifications are free.
Body
| Field | Type | Required | Notes |
|---|---|---|---|
to | string[] | yes | 1 to 10 entries: me, a member's email, or a membershipId. me is whoever a workflow run is for, else the member the key or app acts as. |
title | string | yes | Up to 80 characters. The inbox row, the push headline, and the email subject. |
body | string | yes | Markdown, up to 20,000 characters. Tables, links, and emphasis render; raw HTML does not. |
channels | string[] | no | Any of email, push, slack, on top of the inbox. push reaches phone and browser. Defaults to inbox only. |
link | object | no | Where the message's button goes: { "kind": "url", "url": "https://…" }. |
Send an Idempotency-Key header to make a retry safe: a repeat with the same key sends nothing new.
Response
{
"agentNotificationId": "anot_8fK2mQ0aZc",
"isTest": false,
"recipients": [
{
"membershipId": "6f0c…",
"name": "Sarah Chen",
"email": "sarah@acme.com",
"sentVia": ["inbox", "email"],
"skipped": [{ "channel": "push", "reason": "not_set_up" }]
}
],
"liveRecipients": [],
"wasAlreadySent": false
}skipped says why a channel you asked for did not go out to someone: turned_off (their setting) or not_set_up (no phone or browser set up for notifications, or Slack not linked).
Errors
| Status | When |
|---|---|
400 | The body is malformed. |
422 | A recipient is not a member of the workspace, or a limit was reached. The message says which, and how. |
Limits
One sender may send each member at most 20 notifications in 24 hours, and a single workflow run at most 5.
Example
curl -s -X POST https://cloud.generalinput.com/v1/platform/notifications \
-H "Authorization: Bearer $GI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to":["sarah@acme.com"],"title":"3 invoices are past due","body":"Acme is **9 days** late on INV-2041.","channels":["email"]}'