Operations
Operations

Reject agent prompt improvement

Reject an Optimise-Prompt proposal, dismiss a 'proposed' session without applying it. Use this when you don't want the loop's proposed prompt. It marks the session rejected and stores your optional reason for the audit trail; nothing is written to the agent. Only a 'proposed' session can be rejected; an already-resolved one is refused. The session must belong to the current workspace and agent.

POST
/operations/reject_agent_prompt_improvement

Authorization

bearerAuth
AuthorizationBearer <token>

A personal access token from Settings > API tokens.

In: header

Header Parameters

Idempotency-Key?string

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.

Length1 <= length <= 255

Request 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/reject_agent_prompt_improvement" \  -H "Content-Type: application/json" \  -d '{    "sessionId": "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
}

Reconcile phone numbers POST

Verify each of a workspace's numbers against its LIVE state at the carrier, the routing-critical check. For every number bound to an agent it compares the environment of its actual voice connection at the carrier with what the DB expects (catching a number silently routing to the WRONG environment or agent) and checks the deletion lock. It also flags a number bound to another workspace's agent (cross-workspace binding, calls answered by another tenant) or to a deleted agent, these are never auto-repaired; repair is unassign_phone_number then re-assign inside the owning workspace. Reports only by default; pass apply=true to auto-repair the SAFE drift (set the deletion lock on live numbers + re-stamp inventory labels from the DB, skipped for a number with a tenancy issue OR connection drift, so apply can't stamp the wrong workspace's slug onto a contested number, or stamp the expected env onto a number that routes somewhere else and hide the fault). Connection drift is REPORTED, never auto-repointed in bulk, repair it one number at a time with assign_phone_number, which repoints it onto this environment's voice connection. Numbers with no stored provider_sid are flagged (they can't be matched to a number at the carrier). Workspace-scoped. This is the strict superset write: it covers everything `sync_phone_number_labels` does (the label re-stamp) PLUS the routing + deletion-lock verification, use sync_phone_number_labels instead when you only need to repair inventory labels and don't need the routing check.

Remove member POST

Remove a member from the workspace, or leave it yourself by passing your own userId. Pass the member's userId (from list_members). They lose access immediately. Owners cannot be removed here. Destructive, needs confirm: true.