Skip to main content
POST
/
orgs
/
{org_id}
/
notifications
/
rules
curl --request POST \
  --url https://api.timbal.ai/orgs/{org_id}/notifications/rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Credits usage alert",
  "event_type": "org.credits.usage",
  "cooldown_seconds": 3600,
  "condition": {
    "threshold_pct": 80
  },
  "channel": {
    "type": "email",
    "config": {
      "to": "finance@example.com"
    }
  }
}
'
{
  "channel_action": "linked",
  "channel_id": 123,
  "id": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.timbal.ai/llms.txt

Use this file to discover all available pages before exploring further.

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

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