Create call alert
Create a new CUSTOM real-time call alert. This ALWAYS creates a free-form alert (reason stays unset), it can never mint one of the 6 built-in reason alerts (new_lead/urgent/missed/message_taken/booking/all_calls); those only come into existence when an operator turns one on in the portal. A custom alert fires on the calls its `firesOn` trigger matches (default all_calls = every finished call), delivered to its own typed recipients, not a logged-in portal member's account, so a shared mailbox, phone number or Slack channel can get a copy of every call without being invited as a platform user. `skipTeamCallers` drops calls from the team's own numbers, for a feed that should only carry real callers. Optional email/SMS templates support {{caller_name}}, {{caller_number}}, {{did}}, {{call_time}}, {{business_name}}, {{summary}}, {{transcript}}, and {{call_link}}, leave blank to use the default "every call" copy. SCOPE: a new alert applies to the agent you addressed. Name other agents in `agentIds`, or pass `allAgents: true` for the whole workspace. The success summary states the scope it landed on, so read it back.
Authorization
bearerAuth A personal access token from Settings > API tokens.
In: header
Header Parameters
A key you choose, such as a UUID, that makes this POST safe to retry. Within 24 hours the same key and request answers with the first successful answer and runs nothing, the same key with a different request answers 422 idempotency_key_reused, and a key whose request is still running answers 409 idempotency_key_in_use. A failed request keeps nothing, so the same key runs it again.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/operations/create_call_alert" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "agent": "string" }'{}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}Create alert POST
Create a workspace alert rule that watches a metric and fires when it moves. Pick the shape: alertType='trend' (a statistically significant move vs the rolling baseline, set sensitivityPreset) or alertType='threshold' (the value crosses a fixed bound, set condition + threshold params). The metricKey must be a numeric/continuous/workflow-adherence metric from the catalogue (call list_metrics first). The rule is workspace-scoped and evaluated by the alert cron; delivery defaults to in-app only. Creating an alert requires workspace-admin rights (delivery can reach Slack/email). Use list_alerts first to avoid duplicating an existing rule.
Create schedule POST
Schedule a recurring eval run for the agent you're editing, "run the eval suite on this cron schedule". Pass a 5-field cron expression + an IANA timezone; the next-run time is computed server-side. By default it runs ALL of the agent's evals; pass evalIds (from list_tests) to scope it to specific ones. numRuns (1-10) controls how many times each eval runs per fire. The schedule does NOT run immediately, it fires on the schedule via the platform's cron tick. Use this when an operator asks to "test this agent nightly" or "run the suite every hour".