What Are Notification Targets?
A notification target attaches a notification channel to a scope (org, project, or workspace). When a run event occurs within that scope, notifications are sent to the channel.
Attaching a Target
POST /notification-configs/{id}/targets
{
"scope_type": "workspace",
"scope_id": "workspace-uuid"
}
| Field | Type | Required | Description |
|---|---|---|---|
scope_type | string | Yes | org, project, or workspace |
scope_id | UUID | Yes | The target resource ID |
Scope Requirements
| Scope Type | Requirement |
|---|---|
org | Must match the caller’s org; requires org admin |
project | Caller must have admin access to the project |
workspace | Caller must have admin access to the workspace |
Listing Targets
GET /notification-configs/{id}/targets
Returns all scope attachments for the notification channel.
Removing a Target
DELETE /notification-configs/{id}/targets/{targetId}
Requires the same permissions as creating a target (admin or creator + scope admin).
Idempotency
Attaching the same target twice returns 409 Conflict. Each scope can only be attached once per notification channel.
Notification Events
Notifications are sent for:
- Run completed (plan or apply)
- Run failed
- Run requires approval
- Run approved or rejected
- Run aborted
Related
- Notification Channels — Creating and testing channels
- User Preferences — Personal notification settings