Skip to main content
POST
/
orgs
/
{org_id}
/
projects
/
{project_id}
/
notifications
/
rules
Create a project-scoped notification rule
curl --request POST \
  --url https://api.timbal.ai/orgs/{org_id}/projects/{project_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 project-scoped rule (for example when a deployment settles).

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
project_id
string
required

Body

application/json

Rule name, allowlisted project 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