{
  "components": {
    "schemas": {
      "Agent": {
        "additionalProperties": true,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "grant": {
            "description": "Public grant_… reference (not a UUID)",
            "pattern": "^grant_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "grants": {
            "description": "GET /v1/agents/{id} only: the agent's grants, newest first, each with its bound Lines",
            "items": {
              "$ref": "#/components/schemas/Grant"
            },
            "type": "array"
          },
          "id": {
            "description": "Public agent_… reference (not a UUID)",
            "pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "org": {
            "description": "Public org_… reference (not a UUID)",
            "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "project": {
            "description": "Public proj_… reference (not a UUID)",
            "pattern": "^proj_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "runtime": {
            "default": "external",
            "description": "A label only; it does not change what ORDan does. external (the default): you run the agent's runtime. The other values are reserved and select nothing today",
            "enum": [
              "external",
              "ordan_managed",
              "vapi"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "suspended"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "Auth": {
        "additionalProperties": true,
        "properties": {
          "message": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "user"
        ],
        "type": "object"
      },
      "Billing": {
        "additionalProperties": true,
        "properties": {
          "cancel_at_period_end": {
            "type": "boolean"
          },
          "current_period_end": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "mode": {
            "enum": [
              "off",
              "mock",
              "stripe"
            ],
            "type": "string"
          },
          "object": {
            "const": "billing"
          },
          "org": {
            "description": "Public org_… reference (not a UUID)",
            "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "plan": {
            "anyOf": [
              {
                "additionalProperties": true,
                "properties": {
                  "max_lines": {
                    "anyOf": [
                      {
                        "minimum": 0,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "monthly_micros": {
                    "anyOf": [
                      {
                        "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                        "pattern": "^[0-9]+$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "price_book_version": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "recharge": {
            "anyOf": [
              {
                "additionalProperties": true,
                "properties": {
                  "amount_micros": {
                    "anyOf": [
                      {
                        "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                        "pattern": "^[0-9]+$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pending": {
                    "anyOf": [
                      {
                        "additionalProperties": true,
                        "properties": {
                          "amount_micros": {
                            "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                            "pattern": "^[0-9]+$",
                            "type": "string"
                          },
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "threshold_micros": {
                    "anyOf": [
                      {
                        "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                        "pattern": "^[0-9]+$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unpaid": {
                    "anyOf": [
                      {
                        "additionalProperties": true,
                        "properties": {
                          "amount_micros": {
                            "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                            "pattern": "^[0-9]+$",
                            "type": "string"
                          },
                          "failed_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "kind": {
                            "enum": [
                              "subscription",
                              "recharge"
                            ],
                            "type": "string"
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "enum": [
              "preview",
              "trial_ended",
              "subscription_required",
              "active",
              "suspended",
              "canceled"
            ],
            "type": "string"
          },
          "suspension": {
            "anyOf": [
              {
                "additionalProperties": true,
                "properties": {
                  "lines_held_after": {
                    "anyOf": [
                      {
                        "format": "date-time",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "suspended_at": {
                    "anyOf": [
                      {
                        "format": "date-time",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "trial": {
            "anyOf": [
              {
                "additionalProperties": true,
                "properties": {
                  "allowance_micros": {
                    "anyOf": [
                      {
                        "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                        "pattern": "^[0-9]+$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ends_at": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "used_micros": {
                    "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                    "pattern": "^[0-9]+$",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallet": {
            "anyOf": [
              {
                "additionalProperties": true,
                "properties": {
                  "available_micros": {
                    "description": "Signed integer USD micros as a decimal string",
                    "pattern": "^-?[0-9]+$",
                    "type": "string"
                  },
                  "balance_micros": {
                    "description": "Signed integer USD micros as a decimal string",
                    "pattern": "^-?[0-9]+$",
                    "type": "string"
                  },
                  "reserved_micros": {
                    "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                    "pattern": "^[0-9]+$",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "object",
          "org",
          "mode",
          "status"
        ],
        "type": "object"
      },
      "BillingCheckout": {
        "additionalProperties": true,
        "properties": {
          "initial_top_up_micros": {
            "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
            "pattern": "^[0-9]+$",
            "type": "string"
          },
          "monthly_micros": {
            "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
            "pattern": "^[0-9]+$",
            "type": "string"
          },
          "object": {
            "const": "billing_checkout"
          },
          "url": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "object",
          "url"
        ],
        "type": "object"
      },
      "BillingPortal": {
        "additionalProperties": true,
        "properties": {
          "object": {
            "const": "billing_portal"
          },
          "url": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "object",
          "url"
        ],
        "type": "object"
      },
      "BillingRetry": {
        "additionalProperties": true,
        "properties": {
          "amount_micros": {
            "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
            "pattern": "^[0-9]+$",
            "type": "string"
          },
          "object": {
            "const": "billing_retry"
          },
          "url": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "object",
          "url"
        ],
        "type": "object"
      },
      "Call": {
        "additionalProperties": true,
        "properties": {
          "agent": {
            "anyOf": [
              {
                "description": "Public agent_… reference (not a UUID)",
                "pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "answered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "billable_seconds": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "billing_status": {
            "enum": [
              "pending",
              "settled"
            ],
            "type": "string"
          },
          "cost_micros": {
            "anyOf": [
              {
                "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                "pattern": "^[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "direction": {
            "enum": [
              "inbound",
              "outbound"
            ],
            "type": "string"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "ended_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "from_e164": {
            "examples": [
              "+12125550101"
            ],
            "pattern": "^\\+[1-9][0-9]{6,14}$",
            "type": "string"
          },
          "id": {
            "description": "Public call_… reference (not a UUID)",
            "pattern": "^call_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "line": {
            "examples": [
              "+12125550101"
            ],
            "pattern": "^\\+[1-9][0-9]{6,14}$",
            "type": "string"
          },
          "line_id": {
            "anyOf": [
              {
                "description": "Public line_… reference (not a UUID)",
                "pattern": "^line_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "max_duration_seconds": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "rating": {
            "anyOf": [
              {
                "additionalProperties": true,
                "properties": {
                  "price_book_version": {
                    "type": "string"
                  },
                  "route_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Paid accounts only: the price book's route class (e.g. us-ordinary, us-high-cost) and version its charge used; null until charged"
          },
          "recording": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecordingSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "records": {
            "additionalProperties": true,
            "properties": {
              "outcome": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "recording": {
                "type": "boolean"
              },
              "transcript": {
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "speech": {
            "additionalProperties": true,
            "description": "ORDan voice on the call: the characters spoken; a preview org also sees its provider cost (a paid account's charge is in cost_micros)",
            "properties": {
              "chars": {
                "minimum": 0,
                "type": "integer"
              },
              "cost_micros": {
                "anyOf": [
                  {
                    "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                    "pattern": "^[0-9]+$",
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "type": "object"
          },
          "status": {
            "enum": [
              "authorized",
              "routing",
              "ringing",
              "connected",
              "completed",
              "failed",
              "busy",
              "no_answer",
              "canceled"
            ],
            "type": "string"
          },
          "to_e164": {
            "examples": [
              "+12125550101"
            ],
            "pattern": "^\\+[1-9][0-9]{6,14}$",
            "type": "string"
          },
          "transcription_failed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set when the carrier refused to start transcribing the call: ORDan voice can speak on it, but the transcript stays empty, and a paid account is not charged for its ORDan voice"
          },
          "transfer": {
            "description": "Public xfer_… reference (not a UUID)",
            "pattern": "^xfer_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "transfers": {
            "items": {
              "$ref": "#/components/schemas/Transfer"
            },
            "type": "array"
          },
          "voice_mode": {
            "enum": [
              "none",
              "ordan"
            ],
            "type": "string"
          },
          "voice_opened_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "voice_settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "properties": {
                  "language": {
                    "type": "string"
                  },
                  "voice": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status"
        ],
        "type": "object"
      },
      "CampaignQuote": {
        "additionalProperties": true,
        "properties": {
          "auto_renewal": {
            "const": false
          },
          "currency": {
            "enum": [
              "USD"
            ],
            "type": "string"
          },
          "monthly_micros": {
            "anyOf": [
              {
                "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                "pattern": "^[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "string"
          },
          "upfront_micros": {
            "anyOf": [
              {
                "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                "pattern": "^[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "CostAdjustment": {
        "additionalProperties": true,
        "properties": {
          "basis_sha256": {
            "type": "string"
          },
          "booking_period": {
            "type": "string"
          },
          "delta_micros": {
            "pattern": "^-?[0-9]+$",
            "type": "string"
          },
          "id": {
            "description": "Public cadj_… reference (not a UUID)",
            "pattern": "^cadj_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "ledger_entry": {
            "description": "Public led_… reference (not a UUID)",
            "pattern": "^led_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "previous_basis_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "CustomerCharge": {
        "additionalProperties": true,
        "properties": {
          "agent": {
            "anyOf": [
              {
                "description": "Public agent_… reference (not a UUID)",
                "pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "amount_micros": {
            "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
            "pattern": "^[0-9]+$",
            "type": "string"
          },
          "funding": {
            "enum": [
              "wallet",
              "card"
            ],
            "type": "string"
          },
          "hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "Public chg_… reference (not a UUID)",
            "pattern": "^chg_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "kind": {
            "enum": [
              "call",
              "sms",
              "number_rental",
              "media",
              "other"
            ],
            "type": "string"
          },
          "line": {
            "anyOf": [
              {
                "description": "Public line_… reference (not a UUID)",
                "pattern": "^line_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "measure": {
            "additionalProperties": true,
            "properties": {},
            "type": "object"
          },
          "object": {
            "const": "customer_charge"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "price_book_version": {
            "type": "string"
          },
          "product": {
            "type": "string"
          },
          "resource": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "route_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "seq": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "DeviceAuthorization": {
        "additionalProperties": true,
        "properties": {
          "device_code": {
            "type": "string",
            "writeOnly": true
          },
          "expires_in": {
            "minimum": 0,
            "type": "integer"
          },
          "interval": {
            "minimum": 0,
            "type": "integer"
          },
          "user_code": {
            "type": "string"
          },
          "verification_uri": {
            "format": "uri",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DeviceToken": {
        "additionalProperties": true,
        "properties": {
          "access_token": {
            "description": "Runtime credential, store securely; never send to a chat transcript",
            "type": "string"
          },
          "expires_in": {
            "minimum": 0,
            "type": "integer"
          },
          "scope": {
            "type": "string"
          },
          "token_type": {
            "const": "Bearer"
          }
        },
        "type": "object"
      },
      "Error": {
        "additionalProperties": true,
        "properties": {
          "error": {
            "additionalProperties": true,
            "properties": {
              "code": {
                "type": "string"
              },
              "details": {
                "additionalProperties": true,
                "properties": {},
                "type": "object"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "Event": {
        "additionalProperties": true,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "Public evt_… reference (not a UUID)",
            "pattern": "^evt_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "payload": {
            "additionalProperties": true,
            "properties": {},
            "type": "object"
          },
          "seq": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Grant": {
        "additionalProperties": true,
        "properties": {
          "agent": {
            "description": "Public agent_… reference (not a UUID)",
            "pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "capabilities": {
            "items": {
              "enum": [
                "voice.outbound",
                "voice.inbound",
                "sms.send",
                "sms.receive",
                "numbers.provision",
                "numbers.release",
                "calls.transfer",
                "calls.hangup",
                "calls.record",
                "calls.dtmf",
                "purchases",
                "policy.check",
                "usage.read",
                "events.read"
              ],
              "type": "string"
            },
            "minItems": 1,
            "type": "array"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "Public grant_… reference (not a UUID)",
            "pattern": "^grant_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "lines": {
            "description": "The Lines bound to the grant now: the only ones its agent may call, text or answer from",
            "items": {
              "description": "Public line_… reference (not a UUID)",
              "pattern": "^line_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            },
            "type": "array"
          },
          "org": {
            "description": "Public org_… reference (not a UUID)",
            "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "policy_version": {
            "description": "Public polv_… reference (not a UUID)",
            "pattern": "^polv_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "spend_limit_cents": {
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "LedgerEntry": {
        "additionalProperties": true,
        "properties": {
          "agent": {
            "anyOf": [
              {
                "description": "Public agent_… reference (not a UUID)",
                "pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "amount_micros": {
            "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
            "pattern": "^[0-9]+$",
            "type": "string"
          },
          "hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "Public led_… reference (not a UUID)",
            "pattern": "^led_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "kind": {
            "enum": [
              "call",
              "sms",
              "number_rental",
              "media",
              "other"
            ],
            "type": "string"
          },
          "line": {
            "anyOf": [
              {
                "description": "Public line_… reference (not a UUID)",
                "pattern": "^line_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "const": "ledger_entry"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "quantity": {
            "minimum": 0,
            "type": "integer"
          },
          "resource": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "seq": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "unit": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Line": {
        "additionalProperties": true,
        "properties": {
          "agent": {
            "anyOf": [
              {
                "description": "Public agent_… reference (not a UUID)",
                "pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "capabilities": {
            "additionalProperties": true,
            "properties": {
              "a2p_outbound": {
                "type": "string"
              },
              "sms": {
                "type": "string"
              },
              "voice": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "id": {
            "description": "Public line_… reference (not a UUID)",
            "pattern": "^line_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "number": {
            "anyOf": [
              {
                "description": "Public num_… reference (not a UUID)",
                "pattern": "^num_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "org": {
            "description": "Public org_… reference (not a UUID)",
            "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "phone_number": {
            "anyOf": [
              {
                "examples": [
                  "+12125550101"
                ],
                "pattern": "^\\+[1-9][0-9]{6,14}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "project": {
            "description": "Public proj_… reference (not a UUID)",
            "pattern": "^proj_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "spend": {
            "additionalProperties": true,
            "properties": {
              "committed_micros": {
                "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                "pattern": "^[0-9]+$",
                "type": "string"
              },
              "limit_micros": {
                "anyOf": [
                  {
                    "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                    "pattern": "^[0-9]+$",
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "period": {
                "type": "string"
              },
              "reserved_micros": {
                "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                "pattern": "^[0-9]+$",
                "type": "string"
              }
            },
            "type": "object"
          },
          "spend_limit_cents": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "enum": [
              "provisioning",
              "active",
              "suspended",
              "releasing",
              "released"
            ],
            "type": "string"
          },
          "voice": {
            "anyOf": [
              {
                "description": "The carrier voice id ORDan voice speaks with; null: the default",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "voice_language": {
            "anyOf": [
              {
                "description": "The language ORDan voice speaks and transcribes, e.g. en-US; null: the default",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "voice_mode": {
            "description": "ordan: ORDan speaks the agent's text on the Line's calls and transcribes the other party (the owner's switch)",
            "enum": [
              "none",
              "ordan"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "status"
        ],
        "type": "object"
      },
      "List": {
        "additionalProperties": true,
        "properties": {
          "data": {
            "items": {},
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "type": "object"
      },
      "Message": {
        "additionalProperties": true,
        "properties": {
          "agent": {
            "anyOf": [
              {
                "description": "Public agent_… reference (not a UUID)",
                "pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "billing_status": {
            "enum": [
              "pending",
              "settled"
            ],
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "cost_micros": {
            "anyOf": [
              {
                "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                "pattern": "^[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "direction": {
            "enum": [
              "inbound",
              "outbound"
            ],
            "type": "string"
          },
          "estimated_segments": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "from_e164": {
            "examples": [
              "+12125550101"
            ],
            "pattern": "^\\+[1-9][0-9]{6,14}$",
            "type": "string"
          },
          "id": {
            "description": "Public msg_… reference (not a UUID)",
            "pattern": "^msg_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "line": {
            "examples": [
              "+12125550101"
            ],
            "pattern": "^\\+[1-9][0-9]{6,14}$",
            "type": "string"
          },
          "line_id": {
            "anyOf": [
              {
                "description": "Public line_… reference (not a UUID)",
                "pattern": "^line_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "rating": {
            "anyOf": [
              {
                "additionalProperties": true,
                "properties": {
                  "price_book_version": {
                    "type": "string"
                  },
                  "route_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Paid accounts only: the price book's route class (e.g. us-ordinary, us-high-cost) and version its charge used; null until charged"
          },
          "segments": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "enum": [
              "queued",
              "sent",
              "delivered",
              "failed",
              "received",
              "delivery_unconfirmed"
            ],
            "type": "string"
          },
          "to_e164": {
            "examples": [
              "+12125550101"
            ],
            "pattern": "^\\+[1-9][0-9]{6,14}$",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "body"
        ],
        "type": "object"
      },
      "MessagingRegistration": {
        "additionalProperties": true,
        "properties": {
          "auto_renewal": {
            "const": false
          },
          "brand_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "campaign_generation": {
            "minimum": 0,
            "type": "integer"
          },
          "campaign_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "costs": {
            "additionalProperties": true,
            "properties": {
              "brand_micros": {
                "anyOf": [
                  {
                    "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                    "pattern": "^[0-9]+$",
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "campaign_initial_term_micros": {
                "anyOf": [
                  {
                    "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                    "pattern": "^[0-9]+$",
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "campaign_monthly_micros": {
                "anyOf": [
                  {
                    "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                    "pattern": "^[0-9]+$",
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "type": "object"
          },
          "org": {
            "description": "Public org_… reference (not a UUID)",
            "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "profile_ready": {
            "type": "boolean"
          },
          "status": {
            "enum": [
              "not_registered",
              "brand_unknown",
              "brand_pending",
              "brand_ready",
              "campaign_unknown",
              "campaign_pending",
              "active",
              "expired",
              "failed"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "Micros": {
        "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
        "pattern": "^[0-9]+$",
        "type": "string"
      },
      "Number": {
        "additionalProperties": true,
        "properties": {
          "attached_line": {
            "anyOf": [
              {
                "description": "Public line_… reference (not a UUID)",
                "pattern": "^line_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "capabilities": {
            "additionalProperties": true,
            "properties": {},
            "type": "object"
          },
          "id": {
            "description": "Public num_… reference (not a UUID)",
            "pattern": "^num_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "monthly_cost_micros": {
            "anyOf": [
              {
                "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                "pattern": "^[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone_number": {
            "examples": [
              "+12125550101"
            ],
            "pattern": "^\\+[1-9][0-9]{6,14}$",
            "type": "string"
          },
          "status": {
            "enum": [
              "pending_activation",
              "active",
              "release_pending",
              "released"
            ],
            "type": "string"
          },
          "upfront_cost_micros": {
            "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
            "pattern": "^[0-9]+$",
            "type": "string"
          }
        },
        "type": "object"
      },
      "NumberReservation": {
        "additionalProperties": true,
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "Public nres_… reference (not a UUID)",
            "pattern": "^nres_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "monthly_cost_micros": {
            "anyOf": [
              {
                "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                "pattern": "^[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone_number": {
            "examples": [
              "+12125550101"
            ],
            "pattern": "^\\+[1-9][0-9]{6,14}$",
            "type": "string"
          },
          "upfront_cost_micros": {
            "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
            "pattern": "^[0-9]+$",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Ok": {
        "additionalProperties": true,
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "Organization": {
        "additionalProperties": true,
        "properties": {
          "allowance": {
            "anyOf": [
              {
                "additionalProperties": true,
                "properties": {
                  "committed_micros": {
                    "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                    "pattern": "^[0-9]+$",
                    "type": "string"
                  },
                  "limit_micros": {
                    "anyOf": [
                      {
                        "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                        "pattern": "^[0-9]+$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "period": {
                    "type": "string"
                  },
                  "reserved_micros": {
                    "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                    "pattern": "^[0-9]+$",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "Public org_… reference (not a UUID)",
            "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "max_lines": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "monthly_allowance_cents": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Policy": {
        "additionalProperties": true,
        "properties": {
          "current_version": {
            "minimum": 1,
            "type": "integer"
          },
          "id": {
            "description": "Public pol_… reference (not a UUID)",
            "pattern": "^pol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "versions": {
            "items": {
              "additionalProperties": true,
              "properties": {
                "id": {
                  "description": "Public polv_… reference (not a UUID)",
                  "pattern": "^polv_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                  "type": "string"
                },
                "rules": {
                  "$ref": "#/components/schemas/PolicyRules"
                },
                "version": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "type": "object"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PolicyDecision": {
        "additionalProperties": true,
        "properties": {
          "decision": {
            "enum": [
              "allow",
              "block",
              "require_approval"
            ],
            "type": "string"
          },
          "estimated_cost_micros": {
            "anyOf": [
              {
                "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                "pattern": "^[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "estimated_provider_cost_micros": {
            "anyOf": [
              {
                "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                "pattern": "^[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "matched_rules": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "reasons": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "sms": {
            "additionalProperties": true,
            "properties": {
              "encoding": {
                "enum": [
                  "GSM-7",
                  "UTF-16"
                ],
                "type": "string"
              },
              "segments": {
                "minimum": 1,
                "type": "integer"
              },
              "units": {
                "minimum": 0,
                "type": "integer"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "PolicyRules": {
        "additionalProperties": true,
        "properties": {
          "capabilities": {
            "additionalProperties": true,
            "properties": {
              "allow": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "block": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "require_approval": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "categories": {
            "additionalProperties": {
              "enum": [
                "allow",
                "require_approval",
                "block"
              ],
              "type": "string"
            },
            "type": "object"
          },
          "destinations": {
            "additionalProperties": true,
            "properties": {
              "allowlist": {
                "items": {
                  "examples": [
                    "+12125550101"
                  ],
                  "pattern": "^\\+[1-9][0-9]{6,14}$",
                  "type": "string"
                },
                "type": "array"
              },
              "default": {
                "enum": [
                  "allow",
                  "require_approval",
                  "block"
                ],
                "type": "string"
              },
              "denylist": {
                "items": {
                  "examples": [
                    "+12125550101"
                  ],
                  "pattern": "^\\+[1-9][0-9]{6,14}$",
                  "type": "string"
                },
                "type": "array"
              },
              "international": {
                "enum": [
                  "allow",
                  "require_approval",
                  "block"
                ],
                "type": "string"
              },
              "new_recipients": {
                "enum": [
                  "allow",
                  "require_approval",
                  "block"
                ],
                "type": "string"
              },
              "premium_rate": {
                "enum": [
                  "allow",
                  "require_approval",
                  "block"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "hours": {
            "anyOf": [
              {
                "additionalProperties": true,
                "properties": {
                  "timezone": {
                    "type": "string"
                  },
                  "windows": {
                    "items": {
                      "additionalProperties": true,
                      "properties": {
                        "days": {
                          "items": {
                            "maximum": 6,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "type": "array"
                        },
                        "end": {
                          "type": "string"
                        },
                        "start": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "purchases": {
            "additionalProperties": true,
            "properties": {
              "merchant_denylist": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "monthly_limit_cents": {
                "anyOf": [
                  {
                    "minimum": 1,
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "new_merchants": {
                "enum": [
                  "allow",
                  "require_approval",
                  "block"
                ],
                "type": "string"
              },
              "over_limit": {
                "enum": [
                  "require_approval",
                  "block"
                ],
                "type": "string"
              },
              "per_purchase_limit_cents": {
                "anyOf": [
                  {
                    "minimum": 1,
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "type": "object"
          },
          "spend": {
            "additionalProperties": true,
            "properties": {
              "monthly_limit_cents": {
                "anyOf": [
                  {
                    "minimum": 1,
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "per_action_limit_cents": {
                "anyOf": [
                  {
                    "minimum": 1,
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "Port": {
        "additionalProperties": true,
        "properties": {
          "attention_reasons": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "carrier_refs": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "confirmed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "documents": {
            "additionalProperties": true,
            "properties": {
              "invoice": {
                "type": "boolean"
              },
              "loa": {
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "end_user_provided": {
            "type": "boolean"
          },
          "id": {
            "description": "Public port_… reference (not a UUID)",
            "pattern": "^port_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "number": {
            "anyOf": [
              {
                "description": "Public num_… reference (not a UUID)",
                "pattern": "^num_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "org": {
            "description": "Public org_… reference (not a UUID)",
            "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "phone_number": {
            "examples": [
              "+12125550101"
            ],
            "pattern": "^\\+[1-9][0-9]{6,14}$",
            "type": "string"
          },
          "status": {
            "enum": [
              "submitted",
              "draft",
              "pending",
              "needs_attention",
              "cancel_pending",
              "activated",
              "rejected",
              "canceled"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "status"
        ],
        "type": "object"
      },
      "PriceList": {
        "additionalProperties": true,
        "properties": {
          "currency": {
            "enum": [
              "USD"
            ],
            "type": "string"
          },
          "effective_at": {
            "type": "string"
          },
          "minimum_top_up_micros": {
            "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
            "pattern": "^[0-9]+$",
            "type": "string"
          },
          "number": {
            "additionalProperties": true,
            "properties": {
              "monthly": {
                "additionalProperties": true,
                "properties": {
                  "micros": {
                    "anyOf": [
                      {
                        "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                        "pattern": "^[0-9]+$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "priced_per_item": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              },
              "upfront": {
                "additionalProperties": true,
                "properties": {
                  "micros": {
                    "anyOf": [
                      {
                        "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                        "pattern": "^[0-9]+$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "priced_per_item": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "object": {
            "const": "price_list"
          },
          "plan": {
            "additionalProperties": true,
            "properties": {
              "max_lines": {
                "anyOf": [
                  {
                    "minimum": 0,
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "monthly_micros": {
                "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                "pattern": "^[0-9]+$",
                "type": "string"
              }
            },
            "type": "object"
          },
          "recording": {
            "additionalProperties": true,
            "properties": {},
            "type": "object"
          },
          "registration": {
            "additionalProperties": {
              "additionalProperties": true,
              "properties": {
                "micros": {
                  "anyOf": [
                    {
                      "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                      "pattern": "^[0-9]+$",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "priced_per_item": {
                  "type": "boolean"
                }
              },
              "type": "object"
            },
            "type": "object"
          },
          "sms": {
            "items": {
              "additionalProperties": true,
              "properties": {},
              "type": "object"
            },
            "type": "array"
          },
          "speech": {
            "anyOf": [
              {
                "additionalProperties": true,
                "properties": {
                  "incrementSeconds": {
                    "minimum": 0,
                    "type": "integer"
                  },
                  "minimumSeconds": {
                    "minimum": 0,
                    "type": "integer"
                  },
                  "perMinuteMicros": {
                    "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                    "pattern": "^[0-9]+$",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "transfer": {
            "additionalProperties": true,
            "properties": {},
            "type": "object"
          },
          "version": {
            "type": "string"
          },
          "voice": {
            "items": {
              "additionalProperties": true,
              "properties": {},
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "object",
          "version"
        ],
        "type": "object"
      },
      "PublicId": {
        "description": "Typed public ID, e.g. call_…; use exactly the reference returned by the API",
        "type": "string"
      },
      "Purchase": {
        "additionalProperties": true,
        "properties": {
          "agent": {
            "description": "Public agent_… reference (not a UUID)",
            "pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "amount_cents": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "authorized_cents": {
            "minimum": 0,
            "type": "integer"
          },
          "currency": {
            "enum": [
              "USD"
            ],
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "Public pur_… reference (not a UUID)",
            "pattern": "^pur_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "merchant": {
            "type": "string"
          },
          "status": {
            "enum": [
              "authorized",
              "completed",
              "canceled",
              "expired"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "Recording": {
        "additionalProperties": true,
        "properties": {
          "call": {
            "anyOf": [
              {
                "description": "Public call_… reference (not a UUID)",
                "pattern": "^call_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "duration_seconds": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "format": {
            "type": "string"
          },
          "id": {
            "description": "Public rec_… reference (not a UUID)",
            "pattern": "^rec_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "media": {
            "anyOf": [
              {
                "additionalProperties": true,
                "properties": {
                  "expires_at": {
                    "anyOf": [
                      {
                        "format": "date-time",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "url": {
                    "format": "uri",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "RecordingSummary": {
        "additionalProperties": true,
        "properties": {
          "available": {
            "type": "boolean"
          },
          "billing_status": {
            "enum": [
              "pending",
              "settled"
            ],
            "type": "string"
          },
          "cost_micros": {
            "anyOf": [
              {
                "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                "pattern": "^[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "duration_seconds": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "Public rec_… reference (not a UUID)",
            "pattern": "^rec_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "saved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "enum": [
              "recording",
              "saved",
              "deleting",
              "deleted",
              "legacy",
              "failed"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "TranscriptSegment": {
        "additionalProperties": true,
        "properties": {
          "at_seconds": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "Public seg_… reference (not a UUID)",
            "pattern": "^seg_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "is_final": {
            "type": "boolean"
          },
          "role": {
            "enum": [
              "human",
              "agent"
            ],
            "type": "string"
          },
          "seq": {
            "minimum": 1,
            "type": "integer"
          },
          "text": {
            "anyOf": [
              {
                "description": "Null once the org's media retention has passed",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "utterance": {
            "description": "Public utt_… reference (not a UUID)",
            "pattern": "^utt_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          }
        },
        "required": [
          "id",
          "seq",
          "role",
          "text",
          "is_final"
        ],
        "type": "object"
      },
      "Transfer": {
        "additionalProperties": true,
        "properties": {
          "answered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "billing_status": {
            "enum": [
              "pending",
              "settled"
            ],
            "type": "string"
          },
          "call": {
            "description": "Public call_… reference (not a UUID)",
            "pattern": "^call_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "cost_micros": {
            "anyOf": [
              {
                "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                "pattern": "^[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ended_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "Public xfer_… reference (not a UUID)",
            "pattern": "^xfer_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "max_duration_seconds": {
            "minimum": 0,
            "type": "integer"
          },
          "status": {
            "enum": [
              "creating",
              "accepted",
              "connected",
              "completed",
              "failed"
            ],
            "type": "string"
          },
          "to": {
            "examples": [
              "+12125550101"
            ],
            "pattern": "^\\+[1-9][0-9]{6,14}$",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Usage": {
        "additionalProperties": true,
        "properties": {
          "allowance": {
            "anyOf": [
              {
                "additionalProperties": true,
                "properties": {
                  "committed_micros": {
                    "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                    "pattern": "^[0-9]+$",
                    "type": "string"
                  },
                  "limit_micros": {
                    "anyOf": [
                      {
                        "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                        "pattern": "^[0-9]+$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "period": {
                    "type": "string"
                  },
                  "reserved_micros": {
                    "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                    "pattern": "^[0-9]+$",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "by_kind": {
            "items": {
              "additionalProperties": true,
              "properties": {
                "count": {
                  "minimum": 0,
                  "type": "integer"
                },
                "kind": {
                  "enum": [
                    "call",
                    "sms",
                    "number_rental",
                    "media",
                    "other"
                  ],
                  "type": "string"
                },
                "total_micros": {
                  "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
                  "pattern": "^[0-9]+$",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "currency": {
            "enum": [
              "USD"
            ],
            "type": "string"
          },
          "funding": {
            "enum": [
              "allowance",
              "wallet"
            ],
            "type": "string"
          },
          "grants": {
            "items": {
              "additionalProperties": true,
              "properties": {},
              "type": "object"
            },
            "type": "array"
          },
          "period": {
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
            "type": "string"
          },
          "provider_adjustment_micros": {
            "pattern": "^-?[0-9]+$",
            "type": "string"
          },
          "total_micros": {
            "description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
            "pattern": "^[0-9]+$",
            "type": "string"
          }
        },
        "type": "object"
      },
      "User": {
        "additionalProperties": true,
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          },
          "id": {
            "description": "Public user_… reference (not a UUID)",
            "pattern": "^user_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "WalletFunding": {
        "additionalProperties": true,
        "properties": {
          "amount_micros": {
            "description": "Signed integer USD micros as a decimal string",
            "pattern": "^-?[0-9]+$",
            "type": "string"
          },
          "hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "Public wfd_… reference (not a UUID)",
            "pattern": "^wfd_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "kind": {
            "enum": [
              "top_up",
              "refund",
              "refund_reversal",
              "dispute",
              "dispute_reversal",
              "adjustment"
            ],
            "type": "string"
          },
          "object": {
            "const": "wallet_funding"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "seq": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "object",
          "id",
          "kind",
          "amount_micros"
        ],
        "type": "object"
      },
      "WebhookEndpoint": {
        "additionalProperties": true,
        "properties": {
          "active": {
            "type": "boolean"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "description": "Public whk_… reference (not a UUID)",
            "pattern": "^whk_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "org": {
            "description": "Public org_… reference (not a UUID)",
            "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string"
          },
          "secret": {
            "description": "Only returned on creation/rotation; store outside agent conversations",
            "type": "string"
          },
          "url": {
            "format": "uri",
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAgent": {
        "bearerFormat": "ordan_sk_agent_…",
        "scheme": "bearer",
        "type": "http"
      },
      "bearerKey": {
        "bearerFormat": "ordan_sk_live_…",
        "scheme": "bearer",
        "type": "http"
      },
      "sessionCookie": {
        "in": "cookie",
        "name": "ordan_session",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "Communications infrastructure for autonomous AI agents: identity, policy and audit between an agent and the phone network.",
    "title": "ORDan API",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/agents": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_agents",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Agent"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List agents (scoped to the principal).",
        "tags": [
          "Agents"
        ]
      },
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_agents",
        "parameters": [
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "capabilities": {
                    "items": {
                      "enum": [
                        "voice.outbound",
                        "voice.inbound",
                        "sms.send",
                        "sms.receive",
                        "numbers.provision",
                        "numbers.release",
                        "calls.transfer",
                        "calls.hangup",
                        "calls.record",
                        "calls.dtmf",
                        "purchases",
                        "policy.check",
                        "usage.read",
                        "events.read"
                      ],
                      "type": "string"
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "description": {
                    "maxLength": 2000,
                    "type": "string"
                  },
                  "name": {
                    "maxLength": 120,
                    "minLength": 1,
                    "type": "string"
                  },
                  "org": {
                    "description": "Public org_… reference (not a UUID)",
                    "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "policy": {
                    "description": "Public pol_… reference (not a UUID)",
                    "pattern": "^pol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "project": {
                    "description": "Public proj_… reference (not a UUID)",
                    "pattern": "^proj_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "runtime": {
                    "default": "external",
                    "description": "A label only; it does not change what ORDan does. external (the default): you run the agent's runtime. The other values are reserved and select nothing today",
                    "enum": [
                      "external",
                      "ordan_managed",
                      "vapi"
                    ],
                    "type": "string"
                  },
                  "spend_limit_cents": {
                    "maximum": 100000000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Create an agent (a project key may also grant defaults).",
        "tags": [
          "Agents"
        ]
      }
    },
    "/v1/agents/{id}": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_agents_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Retrieve an agent with its grants and credentials.",
        "tags": [
          "Agents"
        ]
      },
      "patch": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "patch__v1_agents_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "name": {
                    "maxLength": 120,
                    "minLength": 1,
                    "type": "string"
                  },
                  "status": {
                    "enum": [
                      "active",
                      "suspended"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Rename or suspend an agent.",
        "tags": [
          "Agents"
        ]
      }
    },
    "/v1/agents/{id}/grants": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_agents_id_grants",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Grant"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List an agent's grants, each with its bound Lines (its own agent, or a key with grants:read).",
        "tags": [
          "Grants"
        ]
      },
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_agents_id_grants",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "capabilities": {
                    "items": {
                      "enum": [
                        "voice.outbound",
                        "voice.inbound",
                        "sms.send",
                        "sms.receive",
                        "numbers.provision",
                        "numbers.release",
                        "calls.transfer",
                        "calls.hangup",
                        "calls.record",
                        "calls.dtmf",
                        "purchases",
                        "policy.check",
                        "usage.read",
                        "events.read"
                      ],
                      "type": "string"
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "expires_at": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "policy": {
                    "description": "Public pol_… reference (not a UUID)",
                    "pattern": "^pol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "spend_limit_cents": {
                    "maximum": 100000000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "capabilities"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Grant"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Grant capabilities, pinned to a policy version.",
        "tags": [
          "Grants"
        ]
      }
    },
    "/v1/api-keys/{id}/revoke": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_api_keys_id_revoke",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Revoke an API key.",
        "tags": [
          "API keys"
        ]
      }
    },
    "/v1/api-keys/{id}/rotate": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_api_keys_id_rotate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Rotate an API key's secret.",
        "tags": [
          "API keys"
        ]
      }
    },
    "/v1/approvals": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_approvals",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "List approval requests.",
        "tags": [
          "Approvals"
        ]
      }
    },
    "/v1/approvals/{id}": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_approvals_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Retrieve an approval request.",
        "tags": [
          "Approvals"
        ]
      }
    },
    "/v1/approvals/{id}/approve": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_approvals_id_approve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Approve a request.",
        "tags": [
          "Approvals"
        ]
      }
    },
    "/v1/approvals/{id}/deny": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_approvals_id_deny",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Deny a request.",
        "tags": [
          "Approvals"
        ]
      }
    },
    "/v1/audit": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_audit",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "agent",
            "required": false,
            "schema": {
              "description": "Public agent_… reference (not a UUID)",
              "pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "The audit trail.",
        "tags": [
          "Usage"
        ]
      }
    },
    "/v1/auth/accept-invite": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_auth_accept_invite",
        "parameters": [
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "token": {
                    "type": "string",
                    "writeOnly": true
                  }
                },
                "required": [
                  "token"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Accept an org invite while signed in.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v1/auth/change-password": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_auth_change_password",
        "parameters": [
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "current_password": {
                    "type": "string",
                    "writeOnly": true
                  },
                  "new_password": {
                    "maxLength": 200,
                    "minLength": 10,
                    "type": "string",
                    "writeOnly": true
                  }
                },
                "required": [
                  "current_password",
                  "new_password"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Change the password; signs out other sessions.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v1/auth/forgot-password": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_auth_forgot_password",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "email": {
                    "format": "email",
                    "type": "string"
                  }
                },
                "required": [
                  "email"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [],
        "summary": "Start a password reset (never leaks existence).",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v1/auth/login": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_auth_login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "email": {
                    "format": "email",
                    "type": "string"
                  },
                  "password": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string",
                    "writeOnly": true
                  }
                },
                "required": [
                  "email",
                  "password"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Auth"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [],
        "summary": "Sign in; sets the ordan_session cookie.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v1/auth/logout": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_auth_logout",
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [],
        "summary": "End the current session.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v1/auth/me": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_auth_me",
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "The signed-in user and their organizations.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v1/auth/resend-verification": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_auth_resend_verification",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "email": {
                    "format": "email",
                    "type": "string"
                  }
                },
                "required": [
                  "email"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [],
        "summary": "Resend the verification email.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v1/auth/reset-password": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_auth_reset_password",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "new_password": {
                    "maxLength": 200,
                    "minLength": 10,
                    "type": "string",
                    "writeOnly": true
                  },
                  "token": {
                    "type": "string",
                    "writeOnly": true
                  }
                },
                "required": [
                  "token",
                  "new_password"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [],
        "summary": "Complete a password reset with a one-shot token.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v1/auth/sessions": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_auth_sessions",
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Active sessions (devices).",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v1/auth/sessions/revoke-all": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_auth_sessions_revoke_all",
        "parameters": [
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Revoke all other sessions.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v1/auth/sessions/{id}/revoke": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_auth_sessions_id_revoke",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Revoke one session.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v1/auth/signup": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_auth_signup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "email": {
                    "format": "email",
                    "type": "string"
                  },
                  "name": {
                    "maxLength": 120,
                    "minLength": 1,
                    "type": "string"
                  },
                  "password": {
                    "maxLength": 200,
                    "minLength": 10,
                    "type": "string",
                    "writeOnly": true
                  }
                },
                "required": [
                  "email",
                  "name",
                  "password"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Auth"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [],
        "summary": "Create an account; sends a verification email.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v1/auth/verify-email": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_auth_verify_email",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "token": {
                    "type": "string",
                    "writeOnly": true
                  }
                },
                "required": [
                  "token"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [],
        "summary": "Verify an email address with a token.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v1/available-numbers": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_available_numbers",
        "parameters": [
          {
            "in": "query",
            "name": "country",
            "required": false,
            "schema": {
              "const": "US"
            }
          },
          {
            "in": "query",
            "name": "area_code",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "capabilities",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Search carrier number inventory.",
        "tags": [
          "Lines"
        ]
      }
    },
    "/v1/calls": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_calls",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "agent",
            "required": false,
            "schema": {
              "description": "Public agent_… reference (not a UUID)",
              "pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "line",
            "required": false,
            "schema": {
              "description": "Public line_… reference (not a UUID)",
              "pattern": "^line_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Call"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List calls.",
        "tags": [
          "Calls"
        ]
      },
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_calls",
        "parameters": [
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "agent": {
                    "description": "Public agent_… reference (not a UUID)",
                    "pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "approval": {
                    "description": "Public apr_… reference (not a UUID)",
                    "pattern": "^apr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "category": {
                    "maxLength": 60,
                    "type": "string"
                  },
                  "line": {
                    "description": "Public line_… reference (not a UUID)",
                    "pattern": "^line_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "max_duration_seconds": {
                    "maximum": 3600,
                    "minimum": 30,
                    "type": "integer"
                  },
                  "objective": {
                    "maxLength": 4000,
                    "type": "string"
                  },
                  "planned_seconds": {
                    "maximum": 3600,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "purpose": {
                    "maxLength": 200,
                    "type": "string"
                  },
                  "to": {
                    "examples": [
                      "+12125550101"
                    ],
                    "pattern": "^\\+[1-9][0-9]{6,14}$",
                    "type": "string"
                  },
                  "voice": {
                    "description": "Require ORDan voice: refused (409) when the Line's is off, instead of a call nobody speaks on",
                    "enum": [
                      "ordan"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "to"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Call"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Place an outbound call through the gate.",
        "tags": [
          "Calls"
        ]
      }
    },
    "/v1/calls/{id}": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_calls_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Call"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Retrieve a call with events, records and seal.",
        "tags": [
          "Calls"
        ]
      }
    },
    "/v1/calls/{id}/answer": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_calls_id_answer",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Call"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "bearerAgent": []
          }
        ],
        "summary": "Answer a ringing inbound call.",
        "tags": [
          "Calls"
        ]
      }
    },
    "/v1/calls/{id}/dtmf": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_calls_id_dtmf",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "digits": {
                    "pattern": "^[0-9*#A-DwW]{1,64}$",
                    "type": "string",
                    "writeOnly": true
                  },
                  "duration_ms": {
                    "maximum": 500,
                    "minimum": 100,
                    "type": "integer"
                  },
                  "sensitive": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "digits"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "call": {
                      "description": "Public call_… reference (not a UUID)",
                      "pattern": "^call_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                      "type": "string"
                    },
                    "digits": {
                      "type": "string"
                    },
                    "digits_count": {
                      "minimum": 0,
                      "type": "integer"
                    },
                    "sensitive": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Press keys on a connected call.",
        "tags": [
          "Calls"
        ]
      }
    },
    "/v1/calls/{id}/hangup": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_calls_id_hangup",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Call"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Hang up a call.",
        "tags": [
          "Calls"
        ]
      }
    },
    "/v1/calls/{id}/outcome": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_calls_id_outcome",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "outcome": {
                    "pattern": "^[a-z0-9][a-z0-9_.-]{0,79}$",
                    "type": "string"
                  },
                  "summary": {
                    "maxLength": 4000,
                    "type": "string"
                  }
                },
                "required": [
                  "outcome"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Call"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Report the structured outcome (append-only).",
        "tags": [
          "Calls"
        ]
      }
    },
    "/v1/calls/{id}/recording/start": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_calls_id_recording_start",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Call"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Start recording a connected call.",
        "tags": [
          "Calls"
        ]
      }
    },
    "/v1/calls/{id}/recording/stop": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_calls_id_recording_stop",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Call"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Stop recording.",
        "tags": [
          "Calls"
        ]
      }
    },
    "/v1/calls/{id}/speak": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_calls_id_speak",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "interrupt": {
                    "default": false,
                    "description": "Stop what is being said, and anything queued, and say this instead",
                    "type": "boolean"
                  },
                  "text": {
                    "maxLength": 3000,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "call": {
                      "description": "Public call_… reference (not a UUID)",
                      "pattern": "^call_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                      "type": "string"
                    },
                    "chars": {
                      "minimum": 1,
                      "type": "integer"
                    },
                    "status": {
                      "const": "queued"
                    },
                    "utterance": {
                      "description": "Public utt_… reference (not a UUID)",
                      "pattern": "^utt_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "call",
                    "utterance",
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "ORDan voice: speak the agent's text on a connected call.",
        "tags": [
          "Calls"
        ]
      }
    },
    "/v1/calls/{id}/speak/stop": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_calls_id_speak_stop",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "call": {
                      "description": "Public call_… reference (not a UUID)",
                      "pattern": "^call_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                      "type": "string"
                    },
                    "status": {
                      "const": "stopping"
                    }
                  },
                  "required": [
                    "call",
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "ORDan voice: stop what is being said, and everything queued.",
        "tags": [
          "Calls"
        ]
      }
    },
    "/v1/calls/{id}/transcript": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_calls_id_transcript",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "default": 0,
              "description": "Segments after this seq (0: from the start)",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "wait",
            "required": false,
            "schema": {
              "default": 0,
              "description": "Seconds to wait for a first new segment while the call is live",
              "maximum": 25,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "final_only",
            "required": false,
            "schema": {
              "default": "false",
              "enum": [
                "true",
                "false"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "call": {
                      "description": "Public call_… reference (not a UUID)",
                      "pattern": "^call_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                      "type": "string"
                    },
                    "next": {
                      "minimum": 0,
                      "type": "integer"
                    },
                    "segments": {
                      "items": {
                        "$ref": "#/components/schemas/TranscriptSegment"
                      },
                      "type": "array"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "call",
                    "status",
                    "segments",
                    "next"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "ORDan voice: the call's live transcript after a seq, long-polling up to 25 s.",
        "tags": [
          "Calls"
        ]
      },
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_calls_id_transcript",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "segments": {
                    "items": {
                      "additionalProperties": true,
                      "properties": {
                        "at_seconds": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "role": {
                          "enum": [
                            "agent",
                            "human"
                          ],
                          "type": "string"
                        },
                        "text": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "role",
                        "text"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "segments"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Call"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Report the call transcript (append-only).",
        "tags": [
          "Calls"
        ]
      }
    },
    "/v1/calls/{id}/transfer": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_calls_id_transfer",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "approval": {
                    "description": "Public apr_… reference (not a UUID)",
                    "pattern": "^apr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "category": {
                    "maxLength": 60,
                    "type": "string"
                  },
                  "purpose": {
                    "maxLength": 200,
                    "type": "string"
                  },
                  "to": {
                    "examples": [
                      "+12125550101"
                    ],
                    "pattern": "^\\+[1-9][0-9]{6,14}$",
                    "type": "string"
                  }
                },
                "required": [
                  "to"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Call"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Transfer a connected call.",
        "tags": [
          "Calls"
        ]
      }
    },
    "/v1/credentials/{id}/revoke": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_credentials_id_revoke",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Revoke a credential.",
        "tags": [
          "Credentials"
        ]
      }
    },
    "/v1/events": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_events",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "types",
            "required": false,
            "schema": {
              "description": "Comma-separated event names",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "description": "Public evt_… reference (not a UUID)",
              "pattern": "^evt_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Event"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "The canonical event stream.",
        "tags": [
          "Usage"
        ]
      }
    },
    "/v1/grants/{id}": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_grants_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Grant"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Retrieve a grant, with its bound Lines (its own agent, or a key with grants:read).",
        "tags": [
          "Grants"
        ]
      }
    },
    "/v1/grants/{id}/capabilities/{capability}": {
      "delete": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "delete__v1_grants_id_capabilities_capability",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "capability",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Grant"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Withdraw one capability.",
        "tags": [
          "Grants"
        ]
      }
    },
    "/v1/grants/{id}/credentials": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_grants_id_credentials",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "name": {
                    "maxLength": 120,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Grant"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Issue an agent credential (secret shown once).",
        "tags": [
          "Credentials"
        ]
      }
    },
    "/v1/grants/{id}/lines": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_grants_id_lines",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List a grant's Line bindings.",
        "tags": [
          "Grants"
        ]
      },
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_grants_id_lines",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "line": {
                    "description": "Public line_… reference (not a UUID)",
                    "pattern": "^line_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  }
                },
                "required": [
                  "line"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Bind an active Line to a grant (an owner, or a key with grants:write); audited.",
        "tags": [
          "Grants"
        ]
      }
    },
    "/v1/grants/{id}/lines/{lineId}": {
      "delete": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "delete__v1_grants_id_lines_lineId",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "lineId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Grant"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Unbind a Line from a grant (an owner, or a key with grants:write); ends its live calls.",
        "tags": [
          "Grants"
        ]
      }
    },
    "/v1/grants/{id}/revoke": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_grants_id_revoke",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Grant"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Revoke a grant; ends its calls and approvals.",
        "tags": [
          "Grants"
        ]
      }
    },
    "/v1/grants/{id}/rotate-credential": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_grants_id_rotate_credential",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Grant"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Rotate every active credential for a grant.",
        "tags": [
          "Credentials"
        ]
      }
    },
    "/v1/ledger/verify": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_ledger_verify",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Verify the sealed ledger for an org.",
        "tags": [
          "Usage"
        ]
      }
    },
    "/v1/lines": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_lines",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Line"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List Lines.",
        "tags": [
          "Lines"
        ]
      },
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_lines",
        "parameters": [
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "agent": {
                    "description": "Public agent_… reference (not a UUID)",
                    "pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "approval": {
                    "description": "Public apr_… reference (not a UUID)",
                    "pattern": "^apr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "area_code": {
                    "type": "string"
                  },
                  "country": {
                    "const": "US"
                  },
                  "name": {
                    "maxLength": 120,
                    "minLength": 1,
                    "type": "string"
                  },
                  "number_reservation": {
                    "description": "Public nres_… reference (not a UUID)",
                    "pattern": "^nres_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "org": {
                    "description": "Public org_… reference (not a UUID)",
                    "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "phone_number": {
                    "description": "Public num_… reference (not a UUID)",
                    "pattern": "^num_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "project": {
                    "description": "Public proj_… reference (not a UUID)",
                    "pattern": "^proj_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "spend_limit_cents": {
                    "maximum": 100000000,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Line"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Provision a Line (agent, key, or owner).",
        "tags": [
          "Lines"
        ]
      }
    },
    "/v1/lines/{id}": {
      "delete": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "delete__v1_lines_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Line"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Release a Line's number.",
        "tags": [
          "Lines"
        ]
      },
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_lines_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Line"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Retrieve a Line and its spend.",
        "tags": [
          "Lines"
        ]
      },
      "patch": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "patch__v1_lines_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "name": {
                    "maxLength": 120,
                    "minLength": 1,
                    "type": "string"
                  },
                  "spend_limit_cents": {
                    "anyOf": [
                      {
                        "maximum": 100000000,
                        "minimum": 0,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "voice": {
                    "anyOf": [
                      {
                        "examples": [
                          "default"
                        ],
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "One of ORDan voice's voices, by name; null: the default"
                  },
                  "voice_language": {
                    "anyOf": [
                      {
                        "examples": [
                          "en-US"
                        ],
                        "pattern": "^[a-z]{2,3}(-[A-Z]{2})?$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "voice_mode": {
                    "description": "ORDan voice on this Line's calls; an owner session or a project key only",
                    "enum": [
                      "none",
                      "ordan"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Line"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Rename a Line or set its spend ceiling.",
        "tags": [
          "Lines"
        ]
      }
    },
    "/v1/lines/{id}/reactivate": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_lines_id_reactivate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Line"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Reactivate a suspended Line.",
        "tags": [
          "Lines"
        ]
      }
    },
    "/v1/lines/{id}/revoke": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_lines_id_revoke",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Line"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Suspend a Line; hold its number 30 days.",
        "tags": [
          "Lines"
        ]
      }
    },
    "/v1/messages": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_messages",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "agent",
            "required": false,
            "schema": {
              "description": "Public agent_… reference (not a UUID)",
              "pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "line",
            "required": false,
            "schema": {
              "description": "Public line_… reference (not a UUID)",
              "pattern": "^line_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "with",
            "required": false,
            "schema": {
              "examples": [
                "+12125550101"
              ],
              "pattern": "^\\+[1-9][0-9]{6,14}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "enum": [
                "inbound",
                "outbound"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Message"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List messages; `with` returns a conversation.",
        "tags": [
          "Messages"
        ]
      },
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_messages",
        "parameters": [
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "agent": {
                    "description": "Public agent_… reference (not a UUID)",
                    "pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "approval": {
                    "description": "Public apr_… reference (not a UUID)",
                    "pattern": "^apr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "body": {
                    "maxLength": 1600,
                    "minLength": 1,
                    "type": "string"
                  },
                  "category": {
                    "maxLength": 60,
                    "type": "string"
                  },
                  "line": {
                    "description": "Public line_… reference (not a UUID)",
                    "pattern": "^line_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "purpose": {
                    "maxLength": 200,
                    "type": "string"
                  },
                  "smart_encoding": {
                    "default": false,
                    "type": "boolean"
                  },
                  "to": {
                    "examples": [
                      "+12125550101"
                    ],
                    "pattern": "^\\+[1-9][0-9]{6,14}$",
                    "type": "string"
                  }
                },
                "required": [
                  "to",
                  "body"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Send a text through the gate.",
        "tags": [
          "Messages"
        ]
      }
    },
    "/v1/messages/{id}": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_messages_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Retrieve a message.",
        "tags": [
          "Messages"
        ]
      }
    },
    "/v1/numbers": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_numbers",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Number"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List owned/pending numbers and their Line attachments. An agent (numbers.provision or numbers.release) sees its own: those on its Lines and those it bought.",
        "tags": [
          "Lines"
        ]
      }
    },
    "/v1/numbers/reservations": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_numbers_reservations",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/NumberReservation"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "List active number holds.",
        "tags": [
          "Lines"
        ]
      }
    },
    "/v1/numbers/reserve": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_numbers_reserve",
        "parameters": [
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "area_code": {
                    "pattern": "^[2-9][0-9]{2}$",
                    "type": "string"
                  },
                  "capabilities": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "country": {
                    "const": "US"
                  },
                  "org": {
                    "description": "Public org_… reference (not a UUID)",
                    "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NumberReservation"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Reserve an inventory number until the returned expires_at time.",
        "tags": [
          "Lines"
        ]
      }
    },
    "/v1/numbers/{id}/release": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_numbers_id_release",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Number"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Release an unattached number; carrier unassignment/deletion is asynchronous. An agent needs numbers.release and may release only a number it can list.",
        "tags": [
          "Lines"
        ]
      }
    },
    "/v1/oauth/device/approve": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_oauth_device_approve",
        "parameters": [
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "org": {
                    "description": "Public org_… reference (not a UUID)",
                    "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "policy": {
                    "description": "Public pol_… reference (not a UUID)",
                    "pattern": "^pol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "project": {
                    "description": "Public proj_… reference (not a UUID)",
                    "pattern": "^proj_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "spend_limit_cents": {
                    "minimum": 1,
                    "type": "integer"
                  },
                  "user_code": {
                    "type": "string"
                  }
                },
                "required": [
                  "user_code",
                  "org"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Approve a device request.",
        "tags": [
          "Device flow"
        ]
      }
    },
    "/v1/oauth/device/authorize": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_oauth_device_authorize",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "agent_name": {
                    "maxLength": 120,
                    "minLength": 1,
                    "type": "string"
                  },
                  "org": {
                    "description": "Public org_… reference (not a UUID)",
                    "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "policy": {
                    "description": "Public pol_… reference (not a UUID)",
                    "pattern": "^pol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "project": {
                    "description": "Public proj_… reference (not a UUID)",
                    "pattern": "^proj_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "requested_capabilities": {
                    "items": {
                      "enum": [
                        "voice.outbound",
                        "voice.inbound",
                        "sms.send",
                        "sms.receive",
                        "numbers.provision",
                        "numbers.release",
                        "calls.transfer",
                        "calls.hangup",
                        "calls.record",
                        "calls.dtmf",
                        "purchases",
                        "policy.check",
                        "usage.read",
                        "events.read"
                      ],
                      "type": "string"
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "spend_limit_cents": {
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "agent_name",
                  "requested_capabilities"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceAuthorization"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [],
        "summary": "Start RFC 8628 device authorization.",
        "tags": [
          "Device flow"
        ]
      }
    },
    "/v1/oauth/device/deny": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_oauth_device_deny",
        "parameters": [
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "user_code": {
                    "type": "string"
                  }
                },
                "required": [
                  "user_code"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Deny a device request.",
        "tags": [
          "Device flow"
        ]
      }
    },
    "/v1/oauth/device/{userCode}": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_oauth_device_userCode",
        "parameters": [
          {
            "in": "path",
            "name": "userCode",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Preview a device request for the owner.",
        "tags": [
          "Device flow"
        ]
      }
    },
    "/v1/oauth/token": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_oauth_token",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "device_code": {
                    "minLength": 8,
                    "type": "string",
                    "writeOnly": true
                  },
                  "grant_type": {
                    "const": "urn:ietf:params:oauth:grant-type:device_code"
                  }
                },
                "required": [
                  "grant_type",
                  "device_code"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "enum": [
                        "authorization_pending",
                        "slow_down",
                        "access_denied",
                        "expired_token",
                        "invalid_grant"
                      ],
                      "type": "string"
                    },
                    "interval": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceToken"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [],
        "summary": "Poll for the agent credential.",
        "tags": [
          "Device flow"
        ]
      }
    },
    "/v1/orgs": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_orgs",
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "List the caller's organizations.",
        "tags": [
          "Organizations"
        ]
      },
      "post": {
        "description": "Verified human session. only_if_no_org=true serializes first-organization onboarding per user: returns an existing membership's organization with 200 or creates the organization/default project/policy with 201. Omit the flag to explicitly create an additional organization. Org-scoped Idempotency-Key does not cover this bootstrap endpoint.",
        "operationId": "post__v1_orgs",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "name": {
                    "maxLength": 120,
                    "minLength": 1,
                    "type": "string"
                  },
                  "only_if_no_org": {
                    "default": false,
                    "description": "First-organization onboarding: atomically reuse an existing organization membership (200) or create one (201), scoped to the signed-in user. Safe to retry after a lost response.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Create an organization (default project + policy).",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/v1/orgs/{orgId}": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_orgs_orgId",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Retrieve an organization.",
        "tags": [
          "Organizations"
        ]
      },
      "patch": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "patch__v1_orgs_orgId",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "media_retention_days": {
                    "anyOf": [
                      {
                        "maximum": 3650,
                        "minimum": 1,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "maxLength": 120,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Update name or media retention.",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/v1/orgs/{orgId}/billing": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_orgs_orgId_billing",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Billing"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "The org's billing: preview trial, or plan, wallet, recharge and suspension (any member).",
        "tags": [
          "Billing"
        ]
      },
      "patch": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "patch__v1_orgs_orgId_billing",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "cancel_at_period_end": {
                    "type": "boolean"
                  },
                  "recharge_amount_micros": {
                    "pattern": "^[0-9]{1,15}$",
                    "type": "string"
                  },
                  "recharge_threshold_micros": {
                    "pattern": "^[0-9]{1,15}$",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Billing"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Set the automatic recharge, or cancel at the end of the paid month (OWNER, ADMIN or BILLING).",
        "tags": [
          "Billing"
        ]
      }
    },
    "/v1/orgs/{orgId}/billing/checkout": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_orgs_orgId_billing_checkout",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "initial_top_up_micros": {
                    "description": "The wallet's first top-up; defaults to the book's minimum",
                    "pattern": "^[0-9]{1,15}$",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingCheckout"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Subscribe: the plan's monthly fee and the wallet's first top-up, paid at the processor.",
        "tags": [
          "Billing"
        ]
      }
    },
    "/v1/orgs/{orgId}/billing/portal": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_orgs_orgId_billing_portal",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingPortal"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Where to manage the card and subscription.",
        "tags": [
          "Billing"
        ]
      }
    },
    "/v1/orgs/{orgId}/billing/retry": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_orgs_orgId_billing_retry",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingRetry"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Pay the latest failed invoice, which reactivates a suspended org.",
        "tags": [
          "Billing"
        ]
      }
    },
    "/v1/orgs/{orgId}/billing/wallet": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_orgs_orgId_billing_wallet",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/WalletFunding"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Money into and out of the wallet, newest first.",
        "tags": [
          "Billing"
        ]
      }
    },
    "/v1/orgs/{orgId}/invites": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_orgs_orgId_invites",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "List pending invites.",
        "tags": [
          "Members"
        ]
      },
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_orgs_orgId_invites",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "email": {
                    "format": "email",
                    "type": "string"
                  },
                  "role": {
                    "enum": [
                      "OWNER",
                      "ADMIN",
                      "DEVELOPER",
                      "VIEWER"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "email"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Invite an email to the organization.",
        "tags": [
          "Members"
        ]
      }
    },
    "/v1/orgs/{orgId}/invites/{id}": {
      "delete": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "delete__v1_orgs_orgId_invites_id",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Revoke a pending invite.",
        "tags": [
          "Members"
        ]
      }
    },
    "/v1/orgs/{orgId}/members": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_orgs_orgId_members",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "List members.",
        "tags": [
          "Members"
        ]
      },
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_orgs_orgId_members",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "email": {
                    "format": "email",
                    "type": "string"
                  },
                  "role": {
                    "enum": [
                      "OWNER",
                      "ADMIN",
                      "DEVELOPER",
                      "VIEWER"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "role"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Add an existing user by email.",
        "tags": [
          "Members"
        ]
      }
    },
    "/v1/orgs/{orgId}/members/{userId}": {
      "delete": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "delete__v1_orgs_orgId_members_userId",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Remove a member.",
        "tags": [
          "Members"
        ]
      },
      "patch": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "patch__v1_orgs_orgId_members_userId",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "role": {
                    "enum": [
                      "OWNER",
                      "ADMIN",
                      "DEVELOPER",
                      "VIEWER"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "role"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Change a member's role.",
        "tags": [
          "Members"
        ]
      }
    },
    "/v1/orgs/{orgId}/messaging": {
      "get": {
        "description": "Organization DEVELOPER session or project key with lines:write for writes, membership/lines:read for reads. Agent credentials alone are insufficient. Carrier outcomes may be asynchronous; follow returned references.",
        "operationId": "get__v1_orgs_orgId_messaging",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagingRegistration"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Customer-scoped brand/campaign/profile readiness.",
        "tags": [
          "Messaging registration"
        ]
      }
    },
    "/v1/orgs/{orgId}/messaging/brand": {
      "post": {
        "description": "Organization DEVELOPER session or project key with lines:write for writes, membership/lines:read for reads. Agent credentials alone are insufficient. Carrier outcomes may be asynchronous; follow returned references.",
        "operationId": "post__v1_orgs_orgId_messaging_brand",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "brand": {
                    "additionalProperties": true,
                    "properties": {
                      "businessContactEmail": {
                        "format": "email",
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "companyName": {
                        "type": "string"
                      },
                      "country": {
                        "const": "US"
                      },
                      "displayName": {
                        "maxLength": 100,
                        "type": "string"
                      },
                      "ein": {
                        "type": "string",
                        "writeOnly": true
                      },
                      "email": {
                        "format": "email",
                        "type": "string"
                      },
                      "entityType": {
                        "enum": [
                          "PRIVATE_PROFIT",
                          "PUBLIC_PROFIT",
                          "NON_PROFIT",
                          "GOVERNMENT",
                          "SOLE_PROPRIETOR"
                        ],
                        "type": "string"
                      },
                      "firstName": {
                        "type": "string"
                      },
                      "lastName": {
                        "type": "string"
                      },
                      "mobilePhone": {
                        "examples": [
                          "+12125550101"
                        ],
                        "pattern": "^\\+[1-9][0-9]{6,14}$",
                        "type": "string"
                      },
                      "phone": {
                        "examples": [
                          "+12125550101"
                        ],
                        "pattern": "^\\+[1-9][0-9]{6,14}$",
                        "type": "string"
                      },
                      "postalCode": {
                        "type": "string"
                      },
                      "state": {
                        "type": "string"
                      },
                      "stockExchange": {
                        "type": "string"
                      },
                      "stockSymbol": {
                        "type": "string"
                      },
                      "street": {
                        "type": "string"
                      },
                      "vertical": {
                        "type": "string"
                      },
                      "website": {
                        "format": "uri",
                        "type": "string"
                      }
                    },
                    "required": [
                      "entityType",
                      "displayName",
                      "country",
                      "email",
                      "vertical"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "brand"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagingRegistration"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Reserve fees and register the customer's brand.",
        "tags": [
          "Messaging registration"
        ]
      }
    },
    "/v1/orgs/{orgId}/messaging/campaign": {
      "post": {
        "description": "Organization DEVELOPER session or project key with lines:write for writes, membership/lines:read for reads. Agent credentials alone are insufficient. Carrier outcomes may be asynchronous; follow returned references.",
        "operationId": "post__v1_orgs_orgId_messaging_campaign",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "description": {
                    "maxLength": 4000,
                    "minLength": 20,
                    "type": "string"
                  },
                  "embeddedLink": {
                    "type": "boolean"
                  },
                  "embeddedPhone": {
                    "type": "boolean"
                  },
                  "helpMessage": {
                    "maxLength": 1600,
                    "minLength": 10,
                    "type": "string"
                  },
                  "messageFlow": {
                    "maxLength": 4000,
                    "minLength": 20,
                    "type": "string"
                  },
                  "optoutMessage": {
                    "maxLength": 1600,
                    "minLength": 10,
                    "type": "string"
                  },
                  "privacyPolicyLink": {
                    "format": "uri",
                    "type": "string"
                  },
                  "sample1": {
                    "maxLength": 1600,
                    "minLength": 10,
                    "type": "string"
                  },
                  "sample2": {
                    "maxLength": 1600,
                    "minLength": 10,
                    "type": "string"
                  },
                  "subUsecases": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "termsAndConditions": {
                    "const": true
                  },
                  "termsAndConditionsLink": {
                    "format": "uri",
                    "type": "string"
                  },
                  "usecase": {
                    "pattern": "^[A-Z0-9_]+$",
                    "type": "string"
                  }
                },
                "required": [
                  "usecase",
                  "description",
                  "sample1",
                  "sample2",
                  "messageFlow",
                  "helpMessage",
                  "optoutMessage",
                  "privacyPolicyLink",
                  "termsAndConditionsLink",
                  "termsAndConditions"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagingRegistration"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Reserve initial fees and submit a campaign; auto-renewal is disabled.",
        "tags": [
          "Messaging registration"
        ]
      }
    },
    "/v1/orgs/{orgId}/messaging/otp/request": {
      "post": {
        "description": "Organization DEVELOPER session or project key with lines:write for writes, membership/lines:read for reads. Agent credentials alone are insufficient. Carrier outcomes may be asynchronous; follow returned references.",
        "operationId": "post__v1_orgs_orgId_messaging_otp_request",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "org": {
                      "description": "Public org_… reference (not a UUID)",
                      "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                      "type": "string"
                    },
                    "status": {
                      "const": "otp_requested"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Trigger a quoted brand SMS OTP (human verification).",
        "tags": [
          "Messaging registration"
        ]
      }
    },
    "/v1/orgs/{orgId}/messaging/otp/verify": {
      "post": {
        "description": "Organization DEVELOPER session or project key with lines:write for writes, membership/lines:read for reads. Agent credentials alone are insufficient. Carrier outcomes may be asynchronous; follow returned references.",
        "operationId": "post__v1_orgs_orgId_messaging_otp_verify",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "code": {
                    "pattern": "^[0-9]{4,10}$",
                    "type": "string",
                    "writeOnly": true
                  }
                },
                "required": [
                  "code"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagingRegistration"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Verify a human-supplied OTP without storing it.",
        "tags": [
          "Messaging registration"
        ]
      }
    },
    "/v1/orgs/{orgId}/messaging/quote": {
      "get": {
        "description": "Organization DEVELOPER session or project key with lines:write for writes, membership/lines:read for reads. Agent credentials alone are insufficient. Carrier outcomes may be asynchronous; follow returned references.",
        "operationId": "get__v1_orgs_orgId_messaging_quote",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "usecase",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignQuote"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Quote carrier campaign use-case costs before submission.",
        "tags": [
          "Messaging registration"
        ]
      }
    },
    "/v1/orgs/{orgId}/projects": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_orgs_orgId_projects",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "List projects.",
        "tags": [
          "Projects"
        ]
      },
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_orgs_orgId_projects",
        "parameters": [
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "name": {
                    "maxLength": 120,
                    "minLength": 1,
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Create a project.",
        "tags": [
          "Projects"
        ]
      }
    },
    "/v1/policies": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_policies",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Policy"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "List policies.",
        "tags": [
          "Policies"
        ]
      },
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_policies",
        "parameters": [
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "description": {
                    "maxLength": 2000,
                    "type": "string"
                  },
                  "name": {
                    "maxLength": 120,
                    "minLength": 1,
                    "type": "string"
                  },
                  "org": {
                    "description": "Public org_… reference (not a UUID)",
                    "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "rules": {
                    "$ref": "#/components/schemas/PolicyRules"
                  }
                },
                "required": [
                  "org",
                  "name",
                  "rules"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Policy"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Create a policy.",
        "tags": [
          "Policies"
        ]
      }
    },
    "/v1/policies/check": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_policies_check",
        "parameters": [
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "action": {
                    "enum": [
                      "call.outbound",
                      "sms.send",
                      "call.transfer",
                      "purchase"
                    ],
                    "type": "string"
                  },
                  "amount_cents": {
                    "maximum": 10000000,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "body": {
                    "maxLength": 1600,
                    "type": "string"
                  },
                  "call": {
                    "description": "Public call_… reference (not a UUID)",
                    "pattern": "^call_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "category": {
                    "maxLength": 60,
                    "type": "string"
                  },
                  "line": {
                    "description": "Public line_… reference (not a UUID)",
                    "pattern": "^line_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "merchant": {
                    "type": "string"
                  },
                  "purpose": {
                    "maxLength": 200,
                    "type": "string"
                  },
                  "smart_encoding": {
                    "type": "boolean"
                  },
                  "to": {
                    "examples": [
                      "+12125550101"
                    ],
                    "pattern": "^\\+[1-9][0-9]{6,14}$",
                    "type": "string"
                  }
                },
                "required": [
                  "action"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyDecision"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "bearerAgent": []
          }
        ],
        "summary": "Dry-run the policy gate for an action.",
        "tags": [
          "Policies"
        ]
      }
    },
    "/v1/policies/pinned": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_policies_pinned",
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Policy"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "The policy version a new grant in an org would pin, summarized.",
        "tags": [
          "Policies"
        ]
      }
    },
    "/v1/policies/{id}": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_policies_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Policy"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Retrieve a policy with its versions.",
        "tags": [
          "Policies"
        ]
      }
    },
    "/v1/policies/{id}/versions": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_policies_id_versions",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "additionalProperties": true,
                        "properties": {
                          "id": {
                            "description": "Public polv_… reference (not a UUID)",
                            "pattern": "^polv_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "policy": {
                            "description": "Public pol_… reference (not a UUID)",
                            "pattern": "^pol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                            "type": "string"
                          },
                          "rules": {
                            "$ref": "#/components/schemas/PolicyRules"
                          },
                          "version": {
                            "minimum": 1,
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "List policy versions.",
        "tags": [
          "Policies"
        ]
      },
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_policies_id_versions",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "rules": {
                    "$ref": "#/components/schemas/PolicyRules"
                  }
                },
                "required": [
                  "rules"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "id": {
                      "description": "Public polv_… reference (not a UUID)",
                      "pattern": "^polv_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "policy": {
                      "description": "Public pol_… reference (not a UUID)",
                      "pattern": "^pol_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                      "type": "string"
                    },
                    "rules": {
                      "$ref": "#/components/schemas/PolicyRules"
                    },
                    "version": {
                      "minimum": 1,
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Add an immutable policy version.",
        "tags": [
          "Policies"
        ]
      }
    },
    "/v1/ports": {
      "get": {
        "description": "Organization DEVELOPER session or project key with lines:write for writes, membership/lines:read for reads. Agent credentials alone are insufficient. Carrier outcomes may be asynchronous; follow returned references.",
        "operationId": "get__v1_ports",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Port"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "List port requests.",
        "tags": [
          "Lines"
        ]
      },
      "post": {
        "description": "Organization DEVELOPER session or project key with lines:write for writes, membership/lines:read for reads. Agent credentials alone are insufficient. Carrier outcomes may be asynchronous; follow returned references.",
        "operationId": "post__v1_ports",
        "parameters": [
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "note": {
                    "maxLength": 500,
                    "type": "string"
                  },
                  "number": {
                    "examples": [
                      "+12125550101"
                    ],
                    "pattern": "^\\+[1-9][0-9]{6,14}$",
                    "type": "string"
                  },
                  "org": {
                    "description": "Public org_… reference (not a UUID)",
                    "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  }
                },
                "required": [
                  "org",
                  "number"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Port"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Submit a port-in request.",
        "tags": [
          "Lines"
        ]
      }
    },
    "/v1/ports/{id}": {
      "get": {
        "description": "Organization DEVELOPER session or project key with lines:write for writes, membership/lines:read for reads. Agent credentials alone are insufficient. Carrier outcomes may be asynchronous; follow returned references.",
        "operationId": "get__v1_ports_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Port"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Retrieve a port request.",
        "tags": [
          "Lines"
        ]
      },
      "patch": {
        "description": "Organization DEVELOPER session or project key with lines:write for writes, membership/lines:read for reads. Agent credentials alone are insufficient. Carrier outcomes may be asynchronous; follow returned references.",
        "operationId": "patch__v1_ports_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "end_user": {
                    "additionalProperties": true,
                    "properties": {
                      "admin": {
                        "additionalProperties": true,
                        "properties": {
                          "account_number": {
                            "type": "string",
                            "writeOnly": true
                          },
                          "auth_person_name": {
                            "type": "string"
                          },
                          "billing_phone_number": {
                            "examples": [
                              "+12125550101"
                            ],
                            "pattern": "^\\+[1-9][0-9]{6,14}$",
                            "type": "string"
                          },
                          "entity_name": {
                            "type": "string"
                          },
                          "pin_passcode": {
                            "type": "string",
                            "writeOnly": true
                          }
                        },
                        "required": [
                          "entity_name",
                          "auth_person_name",
                          "billing_phone_number",
                          "account_number"
                        ],
                        "type": "object"
                      },
                      "location": {
                        "additionalProperties": true,
                        "properties": {
                          "administrative_area": {
                            "type": "string"
                          },
                          "country_code": {
                            "const": "US"
                          },
                          "extended_address": {
                            "type": "string"
                          },
                          "locality": {
                            "type": "string"
                          },
                          "postal_code": {
                            "type": "string"
                          },
                          "street_address": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "street_address",
                          "locality",
                          "administrative_area",
                          "postal_code",
                          "country_code"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "admin",
                      "location"
                    ],
                    "type": "object"
                  },
                  "foc_datetime_requested": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "requirements": {
                    "items": {
                      "additionalProperties": true,
                      "properties": {
                        "document_type": {
                          "enum": [
                            "loa",
                            "invoice"
                          ],
                          "type": "string"
                        },
                        "requirement_type_id": {
                          "format": "uuid",
                          "type": "string"
                        }
                      },
                      "required": [
                        "requirement_type_id",
                        "document_type"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Port"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Configure end-user/activation details and fulfill document requirements.",
        "tags": [
          "Lines"
        ]
      }
    },
    "/v1/ports/{id}/cancel": {
      "post": {
        "description": "Organization DEVELOPER session or project key with lines:write for writes, membership/lines:read for reads. Agent credentials alone are insufficient. Carrier outcomes may be asynchronous; follow returned references.",
        "operationId": "post__v1_ports_id_cancel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Port"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Cancel a port request.",
        "tags": [
          "Lines"
        ]
      }
    },
    "/v1/ports/{id}/confirm": {
      "post": {
        "description": "Organization DEVELOPER session or project key with lines:write for writes, membership/lines:read for reads. Agent credentials alone are insufficient. Carrier outcomes may be asynchronous; follow returned references.",
        "operationId": "post__v1_ports_id_confirm",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Port"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Explicitly confirm complete drafts after required details/documents.",
        "tags": [
          "Lines"
        ]
      }
    },
    "/v1/ports/{id}/documents": {
      "post": {
        "description": "Organization DEVELOPER session or project key with lines:write for writes, membership/lines:read for reads. Agent credentials alone are insufficient. Carrier outcomes may be asynchronous; follow returned references.",
        "operationId": "post__v1_ports_id_documents",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "content_base64": {
                    "contentEncoding": "base64",
                    "description": "Canonical base64, decoded max 8 MiB; signature checked",
                    "type": "string",
                    "writeOnly": true
                  },
                  "content_type": {
                    "enum": [
                      "application/pdf",
                      "image/jpeg",
                      "image/png"
                    ],
                    "type": "string"
                  },
                  "filename": {
                    "maxLength": 200,
                    "type": "string"
                  },
                  "issued_at": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "enum": [
                      "loa",
                      "invoice"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "filename",
                  "content_type",
                  "content_base64"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Port"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Upload a signed LOA or recent invoice (base64, up to 8 MiB decoded).",
        "tags": [
          "Lines"
        ]
      }
    },
    "/v1/ports/{id}/requirements": {
      "get": {
        "description": "Organization DEVELOPER session or project key with lines:write for writes, membership/lines:read for reads. Agent credentials alone are insufficient. Carrier outcomes may be asynchronous; follow returned references.",
        "operationId": "get__v1_ports_id_requirements",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "additionalProperties": true,
                        "properties": {
                          "carrier_ref": {
                            "type": "string"
                          },
                          "requirements": {
                            "items": {
                              "additionalProperties": true,
                              "properties": {},
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Retrieve requirements for every split carrier order.",
        "tags": [
          "Lines"
        ]
      }
    },
    "/v1/prices": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_prices",
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceList"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [],
        "summary": "The published customer prices (public).",
        "tags": [
          "Billing"
        ]
      }
    },
    "/v1/projects/{projectId}/api-keys": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_projects_projectId_api_keys",
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "List project API keys.",
        "tags": [
          "API keys"
        ]
      },
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_projects_projectId_api_keys",
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "name": {
                    "maxLength": 120,
                    "minLength": 1,
                    "type": "string"
                  },
                  "scopes": {
                    "items": {
                      "enum": [
                        "agents:read",
                        "agents:write",
                        "grants:read",
                        "grants:write",
                        "credentials:write",
                        "lines:read",
                        "lines:write",
                        "calls:read",
                        "calls:write",
                        "messages:read",
                        "messages:write",
                        "policies:read",
                        "policies:write",
                        "purchases:read",
                        "purchases:write",
                        "usage:read",
                        "events:read",
                        "audit:read",
                        "approvals:read",
                        "webhooks:read",
                        "webhooks:write",
                        "device:authorize"
                      ],
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Create a project API key (secret shown once).",
        "tags": [
          "API keys"
        ]
      }
    },
    "/v1/purchases": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_purchases",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "agent",
            "required": false,
            "schema": {
              "description": "Public agent_… reference (not a UUID)",
              "pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Purchase"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List purchases.",
        "tags": [
          "Purchases"
        ]
      },
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_purchases",
        "parameters": [
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "agent": {
                    "description": "Public agent_… reference (not a UUID)",
                    "pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "amount_cents": {
                    "maximum": 10000000,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "approval": {
                    "description": "Public apr_… reference (not a UUID)",
                    "pattern": "^apr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "category": {
                    "maxLength": 60,
                    "type": "string"
                  },
                  "description": {
                    "maxLength": 500,
                    "minLength": 1,
                    "type": "string"
                  },
                  "merchant": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "purpose": {
                    "maxLength": 200,
                    "type": "string"
                  }
                },
                "required": [
                  "merchant",
                  "amount_cents",
                  "description"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Purchase"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Authorize an agent purchase (policy-gated).",
        "tags": [
          "Purchases"
        ]
      }
    },
    "/v1/purchases/{id}": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_purchases_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Purchase"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Retrieve a purchase.",
        "tags": [
          "Purchases"
        ]
      }
    },
    "/v1/purchases/{id}/cancel": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_purchases_id_cancel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Purchase"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Give back an unused authorization.",
        "tags": [
          "Purchases"
        ]
      }
    },
    "/v1/purchases/{id}/complete": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_purchases_id_complete",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "amount_cents": {
                    "maximum": 10000000,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "receipt": {
                    "maxLength": 200,
                    "type": "string"
                  }
                },
                "required": [
                  "amount_cents"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Purchase"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Record what was actually charged (≤ authorized).",
        "tags": [
          "Purchases"
        ]
      }
    },
    "/v1/recordings/{id}": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_recordings_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Recording"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "A short-lived media link to a recording (owner).",
        "tags": [
          "Calls"
        ]
      }
    },
    "/v1/usage": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_usage",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Usage summary for the period.",
        "tags": [
          "Usage"
        ]
      }
    },
    "/v1/usage/adjustments": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_usage_adjustments",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/CostAdjustment"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Append-only provider corrections with original booking periods and evidence bases.",
        "tags": [
          "Usage"
        ]
      }
    },
    "/v1/usage/ledger": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_usage_ledger",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/LedgerEntry"
                          },
                          {
                            "$ref": "#/components/schemas/CustomerCharge"
                          }
                        ]
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "The append-only usage ledger: provider cost on the preview, a paying org's sealed charges once it pays.",
        "tags": [
          "Usage"
        ]
      }
    },
    "/v1/webhook-deliveries/{id}/replay": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_webhook_deliveries_id_replay",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Re-send a past delivery.",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhook-endpoints": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_webhook_endpoints",
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": false,
            "schema": {
              "description": "Public org_… reference (not a UUID)",
              "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/WebhookEndpoint"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "List webhook endpoints.",
        "tags": [
          "Webhooks"
        ]
      },
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_webhook_endpoints",
        "parameters": [
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "events": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "org": {
                    "description": "Public org_… reference (not a UUID)",
                    "pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
                    "type": "string"
                  },
                  "url": {
                    "format": "uri",
                    "pattern": "^https://",
                    "type": "string"
                  }
                },
                "required": [
                  "org",
                  "url"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Register a webhook endpoint.",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhook-endpoints/{id}": {
      "delete": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "delete__v1_webhook_endpoints_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Disable a webhook endpoint.",
        "tags": [
          "Webhooks"
        ]
      },
      "patch": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "patch__v1_webhook_endpoints_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "properties": {
                  "active": {
                    "type": "boolean"
                  },
                  "events": {
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "url": {
                    "format": "uri",
                    "pattern": "^https://",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Update a webhook endpoint.",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhook-endpoints/{id}/deliveries": {
      "get": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "get__v1_webhook_endpoints_id_deliveries",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Recent deliveries for an endpoint.",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhook-endpoints/{id}/purge": {
      "delete": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "delete__v1_webhook_endpoints_id_purge",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Delete a webhook endpoint and its deliveries.",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhook-endpoints/{id}/rotate-secret": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_webhook_endpoints_id_rotate_secret",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Rotate an endpoint's signing secret.",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhook-endpoints/{id}/test": {
      "post": {
        "description": "See https://ordan.io/docs/authentication and https://ordan.io/docs/errors for authority, scopes and retries. Paid usage reports customer charges; preview usage reports provider-cost allowance consumption. Money fields use the units specified in their schemas.",
        "operationId": "post__v1_webhook_endpoints_id_test",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One key per logical operation; reuse only with identical body. Retrieve committed resources after ambiguous outcomes.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request; device token polling uses RFC 8628 string errors"
          },
          "402": {
            "description": "spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros"
          },
          "403": {
            "description": "Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature)"
          },
          "409": {
            "description": "Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work"
          },
          "422": {
            "description": "validation_error: the request is not valid; details name each field"
          },
          "429": {
            "description": "Rate limited; back off and retain the same idempotency key"
          },
          "502": {
            "description": "provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds"
          },
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            },
            "description": "Success (created objects use 201)"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "bearerKey": []
          }
        ],
        "summary": "Send a signed webhook.test event.",
        "tags": [
          "Webhooks"
        ]
      }
    }
  },
  "security": [
    {
      "sessionCookie": []
    },
    {
      "bearerAgent": []
    },
    {
      "bearerKey": []
    }
  ],
  "servers": [
    {
      "url": "https://api.ordan.io"
    }
  ],
  "tags": [
    {
      "name": "Auth"
    },
    {
      "name": "Organizations"
    },
    {
      "name": "Members"
    },
    {
      "name": "Projects"
    },
    {
      "name": "API keys"
    },
    {
      "name": "Agents"
    },
    {
      "name": "Grants"
    },
    {
      "name": "Credentials"
    },
    {
      "name": "Device flow"
    },
    {
      "name": "Approvals"
    },
    {
      "name": "Policies"
    },
    {
      "name": "Calls"
    },
    {
      "name": "Lines"
    },
    {
      "name": "Messaging registration"
    },
    {
      "name": "Messages"
    },
    {
      "name": "Purchases"
    },
    {
      "name": "Billing"
    },
    {
      "name": "Usage"
    },
    {
      "name": "Webhooks"
    }
  ]
}
