Skip to main content
POST
/
orgs
/
{org_id}
/
notifications
/
rules
Create an org-wide notification rule
curl --request POST \
  --url https://api.timbal.ai/orgs/{org_id}/notifications/rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "channel": {
    "config": {},
    "id": "<string>",
    "name": "<string>",
    "type": "email"
  },
  "event_type": "org.credits.usage",
  "name": "<string>",
  "condition": {},
  "cooldown_seconds": 123
}
'
{
  "channel_action": "linked",
  "channel_id": 123,
  "id": 123
}
Creates a rule with one email channel. 403 if the caller is not an org admin.

Authorizations

Authorization
string
header
required

Timbal API key. Obtain your API key from the Timbal platform settings. See Authentication for more information.

Path Parameters

org_id
string
required

Body

application/json

Rule name, allowlisted org event_type, optional condition, cooldown, and a single channel.

Body for POST org-wide or project-scoped notification rules (same shape).

channel
object
required

Channel: inline type + config, or reuse with { "id": <channel id> } (same org).

event_type
enum<string>
required
Available options:
org.credits.usage,
project.deployment.failed,
project.deployment.running
name
string
required
condition
object
cooldown_seconds
integer<int32>

Response

Rule and channel link created

channel_action
enum<string>
required

How the rule was wired to NotificationChannels for this create call.

Available options:
linked,
reused,
created
channel_id
integer<int64>
required
id
integer<int64>
required