Sync phone number labels
Re-derive and write each carrier number's inventory labels (tags + customer_reference) for a workspace from the DB, the source of truth, repairing drift. Numbers bound to an agent get status_live plus customer/ws/agent/env tags; unbound numbers get status_spare. Numbers on any other provider and ones with no provider id are skipped. The assign hook already stamps a number on assignment; run this to fix historical or hand-edited numbers in bulk. Returns a per-number summary. This is the labels-only shortcut: `reconcile_phone_numbers` is the strict superset, it does this label re-stamp AND verifies each number's live voice-connection routing at the carrier and its deletion lock. Use reconcile when you care about routing correctness, this when you only need to repair labels.
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.
Workspace slug.
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/sync_phone_number_labels" \ -H "Content-Type: application/json" \ -d '{ "workspace": "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
}Summarise alert fires POST
Summarise an alert rule's recent firing pattern with AI: cluster its recent fires by day and return a one-line headline + a few recurring themes, the same 'Summarise with AI' action on the alert-fire detail page. This is a credit-spending action (a real model call) and caches the result per rule for 24h, so a repeat call within the window returns the cached summary for free. It needs at least 3 recent fires (fewer is not enough to find a pattern). It does NOT change the rule or the agent, use update_alert to retune the rule. Only run it when the operator asks to summarise an alert's behaviour.
Test agent response guardrails POST
Run a transcript through the agent's response guardrails, the same check calls and chat make on each reply, and see which replies go out, which are blocked, and which break a guardrail and are regenerated. Put each line on its own line: a line that starts with 'Agent:' is a reply the agent wrote, and every other line is the caller. An 'Agent:' line before the caller's first line is what the agent last said and is not checked. Each later agent line reports action (speak, block, regenerate or fallback), reason (rule, inactive, error or timeout), the broken guardrail ids, the note the model would get when a reply is regenerated, every question's probability against its threshold, and how long the check took in ms. As on a call, a reply that goes out or is blocked starts a fresh caller turn for the next caller line, and a regenerated reply leaves the caller's words in it. With context tools set, pass contextResults with a realistic result for each one, or every reply reads inactive. jobContext replaces the saved static text for this test, and settings lays unsaved changes over the saved ones. Nothing is saved, no audio plays, no model runs and no tools run. Tests the current version unless versionId names another. configured false means this environment has no classifier key, so its calls are not checked either.