Skip to main content
Opik Documentation

Search documentation

Type to search this documentation.

Update alert

PUT/v1/private/alerts/{id}Update alert

Update alert

Parameters

idstring · uuidpathrequired

Request body

application/json
objectAlert_Write
alert_typestring

one of "general", "slack", "pagerduty"

enabledboolean
idstring · uuid
metadataobject
namestring

maxLength 255 · minLength 0

project_idstring · uuid

Optional project scope for this alert. When set, the alert is scoped to the specified project. Do NOT also provide a 'scope:project' trigger config — the system will create it automatically from this field. Sending both project_id and a scope:project trigger config will result in an error.

triggersarray of object
Show child attributes
Show array items
event_typestringrequired

one of "trace:errors", "trace:feedback_score", "trace_thread:feedback_score", "prompt:created", "prompt:committed", "trace:guardrails_triggered", "prompt:deleted", "experiment:finished", "trace:cost", "trace:latency"

idstring · uuid
trigger_configsarray of object
Show child attributes
Show array items
config_valueobject
group_indexinteger · int32

Groups configs within a trigger: same group_index means AND between configs, different group_index means OR between groups. Null means a legacy/singleton group of one config. Always null for scope:project configs.

idstring · uuid
typestringrequired

one of "scope:project", "threshold:feedback_score", "threshold:cost", "threshold:latency", "threshold:errors", "filter:guardrail_type"

webhookobjectrequired
Show child attributes
headersobject
idstring · uuid
namestring
secret_tokenstring

maxLength 250 · minLength 0

urlstringrequired

minLength 1

Example request
{
  "alert_type": "general",
  "enabled": true,
  "id": "00000000-0000-0000-0000-000000000000",
  "metadata": {
    "additionalProp1": "string"
  },
  "name": "string",
  "project_id": "00000000-0000-0000-0000-000000000000",
  "triggers": [
    {
      "event_type": "experiment:finished",
      "id": "00000000-0000-0000-0000-000000000000",
      "trigger_configs": [
        {
          "config_value": {
            "additionalProp1": "string"
          },
          "group_index": 0,
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "filter:guardrail_type"
        }
      ]
    }
  ],
  "webhook": {
    "headers": {
      "additionalProp1": "string"
    },
    "id": "00000000-0000-0000-0000-000000000000",
    "name": "string",
    "secret_token": "string",
    "url": "string"
  }
}

Responses

204No Content
400Bad Requestapplication/json
objectErrorMessage
codeinteger · int32
detailsstring
messagestring
Example response
{
  "code": 0,
  "details": "string",
  "message": "string"
}
409Conflictapplication/json
objectErrorMessage
codeinteger · int32
detailsstring
messagestring
Example response
{
  "code": 0,
  "details": "string",
  "message": "string"
}
422Unprocessable Contentapplication/json
objectErrorMessage
codeinteger · int32
detailsstring
messagestring
Example response
{
  "code": 0,
  "details": "string",
  "message": "string"
}
Documentation menu