{
  "openapi": "3.0.3",
  "info": {
    "title": "Vobiz API",
    "description": "The Vobiz API lets you make calls, manage phone numbers, configure SIP trunks, \nand access account data programmatically.\n\n**Base URL:** `https://api.vobiz.ai`\n\n**Authentication:** All requests require `X-Auth-ID` and `X-Auth-Token` headers.\nObtain these from your [Vobiz Console](https://console.vobiz.ai).\n",
    "version": "1.0",
    "contact": {
      "email": "support@vobiz.ai",
      "url": "https://vobiz.ai"
    }
  },
  "servers": [
    {
      "url": "https://api.vobiz.ai",
      "description": "Production"
    }
  ],
  "security": [
    {
      "AuthID": [],
      "AuthToken": []
    }
  ],
  "components": {
    "securitySchemes": {
      "AuthID": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Auth-ID",
        "description": "Your Vobiz account Auth ID"
      },
      "AuthToken": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Auth-Token",
        "description": "Your Vobiz account Auth Token"
      }
    },
    "parameters": {
      "AuthId": {
        "name": "auth_id",
        "in": "path",
        "required": true,
        "description": "Your account Auth ID",
        "schema": {
          "type": "string",
          "example": "MA_XXXXXX"
        }
      },
      "SubAuthId": {
        "name": "sub_auth_id",
        "in": "path",
        "required": true,
        "description": "The sub-account's Auth ID.",
        "schema": {
          "type": "string",
          "example": "SA_XXXXXX"
        }
      },
      "CdrFromNumber": {
        "name": "from_number",
        "in": "query",
        "description": "Filter by the originating phone number (caller).",
        "schema": {
          "type": "string",
          "example": "9876543210"
        }
      },
      "CdrToNumber": {
        "name": "to_number",
        "in": "query",
        "description": "Filter by the destination phone number (callee).",
        "schema": {
          "type": "string",
          "example": "1234567890"
        }
      },
      "CdrStartDate": {
        "name": "start_date",
        "in": "query",
        "description": "Beginning of the search period (YYYY-MM-DD). Required when using `end_date`.",
        "schema": {
          "type": "string",
          "format": "date",
          "example": "2026-03-01"
        }
      },
      "CdrEndDate": {
        "name": "end_date",
        "in": "query",
        "description": "End of the search period (YYYY-MM-DD). Required when using `start_date`.",
        "schema": {
          "type": "string",
          "format": "date",
          "example": "2026-03-17"
        }
      },
      "CdrCallDirection": {
        "name": "call_direction",
        "in": "query",
        "description": "Filter by direction.",
        "schema": {
          "type": "string",
          "enum": [
            "inbound",
            "outbound"
          ]
        }
      },
      "CdrMinDuration": {
        "name": "min_duration",
        "in": "query",
        "description": "Minimum call duration in seconds. Excludes calls shorter than this value.",
        "schema": {
          "type": "integer",
          "example": 10
        }
      },
      "CdrSipCallId": {
        "name": "sip_call_id",
        "in": "query",
        "description": "Filter by the SIP Call-ID of the call (matches the cdr's sip_call_id field).",
        "schema": {
          "type": "string",
          "example": "dD1qwu5VZ5iK3ed5u3uspjY5RKL"
        }
      },
      "CdrBridgeUuid": {
        "name": "bridge_uuid",
        "in": "query",
        "description": "Filter by the UUID of the bridged leg (matches the cdr's bridge_uuid field).",
        "schema": {
          "type": "string",
          "example": "4b7ae653-f40d-42f1-b582-6b05dfcd0c0a"
        }
      },
      "CdrHangupCause": {
        "name": "hangup_cause",
        "in": "query",
        "description": "Filter by telephony hangup cause, e.g. NORMAL_CLEARING.",
        "schema": {
          "type": "string",
          "example": "NORMAL_CLEARING"
        }
      },
      "CdrHangupDisposition": {
        "name": "hangup_disposition",
        "in": "query",
        "description": "Filter by how the leg was released, e.g. send_refuse.",
        "schema": {
          "type": "string",
          "example": "send_refuse"
        }
      },
      "CdrContext": {
        "name": "context",
        "in": "query",
        "description": "Filter by the call context, e.g. sip-trunking.",
        "schema": {
          "type": "string",
          "example": "sip-trunking"
        }
      },
      "CdrCampaignId": {
        "name": "campaign_id",
        "in": "query",
        "description": "Filter by the campaign identifier associated with the call.",
        "schema": {
          "type": "string"
        }
      },
      "CdrSearch": {
        "name": "search",
        "in": "query",
        "description": "Free-text search across CDR fields (numbers, IDs, etc.).",
        "schema": {
          "type": "string"
        }
      },
      "CdrPage": {
        "name": "page",
        "in": "query",
        "description": "Page number for paginated results.",
        "schema": {
          "type": "integer",
          "default": 1
        }
      },
      "CdrPerPage": {
        "name": "per_page",
        "in": "query",
        "description": "Number of records per page. Max: 100.",
        "schema": {
          "type": "integer",
          "default": 20,
          "maximum": 100
        }
      }
    },
    "schemas": {
      "Account": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "MA_XXXXXX"
          },
          "name": {
            "type": "string",
            "example": "Acme Corporation"
          },
          "email": {
            "type": "string",
            "example": "admin@company.com"
          },
          "auth_id": {
            "type": "string",
            "example": "MA_XXXXXX"
          },
          "account_type": {
            "type": "string",
            "enum": [
              "PREPAID",
              "POSTPAID"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          },
          "cps_limit": {
            "type": "integer",
            "example": 10
          },
          "concurrent_calls_limit": {
            "type": "integer",
            "example": 50
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Balance": {
        "type": "object",
        "properties": {
          "auth_id": {
            "type": "string"
          },
          "balance": {
            "type": "string",
            "example": "450.00"
          },
          "currency": {
            "type": "string",
            "example": "INR"
          },
          "auto_recharge": {
            "type": "boolean"
          }
        }
      },
      "Call": {
        "type": "object",
        "properties": {
          "api_id": {
            "type": "string"
          },
          "request_uuid": {
            "type": "string"
          },
          "message": {
            "type": "string",
            "example": "Call fired"
          }
        }
      },
      "CallRecord": {
        "type": "object",
        "properties": {
          "call_uuid": {
            "type": "string",
            "example": "cdr_XXXXXXXXXX"
          },
          "from_number": {
            "type": "string"
          },
          "to_number": {
            "type": "string"
          },
          "call_status": {
            "type": "string",
            "enum": [
              "answered",
              "busy",
              "failed",
              "no-answer",
              "cancelled"
            ]
          },
          "duration": {
            "type": "integer"
          },
          "bill_duration": {
            "type": "integer"
          },
          "billed_amount": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SubAccount": {
        "type": "object",
        "properties": {
          "auth_id": {
            "type": "string"
          },
          "auth_token": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "kyc_mode": {
            "type": "string",
            "enum": [
              "personal_use",
              "customer_use"
            ],
            "description": "Verification mode. `customer_use` sub-accounts must complete their own KYC before placing calls."
          },
          "business_type": {
            "type": "string",
            "description": "Legal constitution of the customer (e.g. `private_limited`)."
          },
          "kyc_calls_blocked": {
            "type": "boolean",
            "description": "True while a `customer_use` sub-account has not yet completed the KYC required to place calls."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SubAccountKycStatus": {
        "type": "object",
        "description": "Aggregated KYC state for a sub-account.",
        "properties": {
          "sub_account_id": {
            "type": "string"
          },
          "kyc_mode": {
            "type": "string",
            "enum": [
              "personal_use",
              "customer_use"
            ]
          },
          "business_type": {
            "type": "string"
          },
          "overall_status": {
            "type": "string",
            "enum": [
              "not_started",
              "pending",
              "verified",
              "failed"
            ]
          },
          "kyc_calls_blocked": {
            "type": "boolean",
            "description": "True while the sub-account still needs KYC before it can place calls."
          },
          "verifications": {
            "type": "object",
            "description": "Per-document state keyed by verification type.",
            "additionalProperties": {
              "type": "string",
              "enum": [
                "not_started",
                "pending",
                "verified",
                "failed"
              ]
            }
          }
        }
      },
      "KycVerificationResult": {
        "type": "object",
        "description": "Outcome of a single KYC verification step.",
        "properties": {
          "verification_type": {
            "type": "string",
            "enum": [
              "pan",
              "gst",
              "cin",
              "aadhaar"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "verified",
              "failed",
              "pending"
            ]
          },
          "kyc_calls_blocked": {
            "type": "boolean",
            "description": "Recomputed sub-account call-blocking state after this verification."
          },
          "mock": {
            "type": "boolean",
            "description": "Present and `true` on responses from the test-mode endpoints."
          }
        },
        "required": [
          "verification_type",
          "status"
        ]
      },
      "Trunk": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "trunk_type": {
            "type": "string",
            "enum": [
              "INBOUND",
              "OUTBOUND"
            ]
          },
          "sip_domain": {
            "type": "string",
            "example": "abc123.sip.vobiz.ai"
          },
          "enabled": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PhoneNumber": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "example": "+919876543210"
          },
          "number_type": {
            "type": "string",
            "enum": [
              "mobile",
              "landline",
              "toll_free"
            ]
          },
          "country": {
            "type": "string",
            "example": "IN"
          },
          "monthly_rental_rate": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          }
        }
      },
      "Application": {
        "type": "object",
        "properties": {
          "app_id": {
            "type": "string",
            "example": "12345678"
          },
          "app_name": {
            "type": "string",
            "example": "My Voice Application"
          },
          "application_type": {
            "type": "string",
            "example": "voice"
          },
          "answer_url": {
            "type": "string",
            "example": "https://example.com/answer"
          },
          "answer_method": {
            "type": "string",
            "enum": [
              "GET",
              "POST"
            ],
            "default": "POST"
          },
          "hangup_url": {
            "type": "string",
            "example": "https://example.com/hangup"
          },
          "hangup_method": {
            "type": "string",
            "enum": [
              "GET",
              "POST"
            ],
            "default": "POST"
          },
          "fallback_answer_url": {
            "type": "string",
            "example": "https://example.com/fallback"
          },
          "fallback_method": {
            "type": "string",
            "enum": [
              "GET",
              "POST"
            ],
            "default": "POST"
          },
          "message_url": {
            "type": "string",
            "example": "https://example.com/message"
          },
          "message_method": {
            "type": "string",
            "enum": [
              "GET",
              "POST"
            ],
            "default": "POST"
          },
          "default_number_app": {
            "type": "boolean",
            "default": false
          },
          "default_endpoint_app": {
            "type": "boolean",
            "default": false
          },
          "default_app": {
            "type": "boolean",
            "default": false
          },
          "enabled": {
            "type": "boolean",
            "default": true
          },
          "log_incoming_message": {
            "type": "boolean",
            "default": true
          },
          "public_uri": {
            "type": "boolean",
            "default": false
          },
          "sip_transfer_url": {
            "type": "string"
          },
          "sip_transfer_method": {
            "type": "string",
            "enum": [
              "GET",
              "POST"
            ]
          },
          "sip_uri": {
            "type": "string",
            "example": "sip:12345678@vobiz.ai"
          },
          "sub_account": {
            "type": "string",
            "nullable": true
          },
          "resource_uri": {
            "type": "string",
            "example": "/v1/Account/MA_XXXXXX/Application/12345678/"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Endpoint": {
        "type": "object",
        "properties": {
          "endpoint_id": {
            "type": "string",
            "example": "87654321"
          },
          "username": {
            "type": "string",
            "example": "john_doe"
          },
          "alias": {
            "type": "string",
            "example": "John's Desktop Phone"
          },
          "sip_uri": {
            "type": "string",
            "example": "sip:john_doe@sip.vobiz.ai"
          },
          "sip_registered": {
            "type": "string",
            "enum": [
              "true",
              "false"
            ]
          },
          "sip_contact": {
            "type": "string",
            "nullable": true
          },
          "sip_expires": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "sip_user_agent": {
            "type": "string",
            "nullable": true
          },
          "application": {
            "type": "object",
            "nullable": true,
            "properties": {
              "app_id": {
                "type": "string"
              },
              "app_name": {
                "type": "string"
              },
              "answer_url": {
                "type": "string"
              },
              "answer_method": {
                "type": "string"
              }
            }
          },
          "allow_voice": {
            "type": "boolean",
            "default": true
          },
          "allow_message": {
            "type": "boolean",
            "default": true
          },
          "allow_video": {
            "type": "boolean",
            "default": false
          },
          "allow_same_domain": {
            "type": "boolean",
            "default": true
          },
          "allow_other_domains": {
            "type": "boolean",
            "default": false
          },
          "allow_phones": {
            "type": "boolean",
            "default": true
          },
          "allow_apps": {
            "type": "boolean",
            "default": true
          },
          "sub_account": {
            "type": "string",
            "nullable": true
          },
          "resource_uri": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "InventoryNumber": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "e164": {
            "type": "string",
            "example": "+14155551234"
          },
          "country": {
            "type": "string",
            "example": "US"
          },
          "region": {
            "type": "string",
            "example": "CA"
          },
          "status": {
            "type": "string",
            "example": "active"
          },
          "setup_fee": {
            "type": "number",
            "format": "float",
            "example": 0
          },
          "monthly_fee": {
            "type": "number",
            "format": "float",
            "example": 1
          },
          "currency": {
            "type": "string",
            "example": "INR"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PurchasedNumber": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "auth_id": {
            "type": "string"
          },
          "e164": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "setup_fee": {
            "type": "number",
            "format": "float"
          },
          "monthly_fee": {
            "type": "number",
            "format": "float"
          },
          "currency": {
            "type": "string"
          },
          "purchased_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "api_id": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "PartnerProfile": {
        "type": "object",
        "description": "Partner identity, balance, GST configuration, and permanent partner ID.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Permanent partner ID - required as a filter parameter for Transaction and CDR queries.",
            "example": "partner-882abc"
          },
          "name": {
            "type": "string",
            "example": "Acme Telecom"
          },
          "email": {
            "type": "string",
            "example": "partner@acmetelecom.com"
          },
          "phone": {
            "type": "string",
            "example": "9876543210"
          },
          "company": {
            "type": "string",
            "example": "Acme Telecom Private Limited"
          },
          "balance": {
            "type": "number",
            "format": "float",
            "example": 48250
          },
          "currency": {
            "type": "string",
            "example": "INR"
          },
          "gstin": {
            "type": "string",
            "example": "27AAPFU0939F1ZV"
          },
          "gst_status": {
            "type": "string",
            "example": "active"
          },
          "tds_applicable": {
            "type": "boolean",
            "example": false
          },
          "tds_percentage": {
            "type": "number",
            "format": "float",
            "example": 0
          },
          "account_type": {
            "type": "string",
            "example": "partner"
          },
          "status": {
            "type": "string",
            "example": "active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PartnerAnalytics": {
        "type": "object",
        "description": "Aggregated call analytics across all customer accounts for a date range.",
        "properties": {
          "period": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "format": "date",
                "example": "2026-01-01"
              },
              "to": {
                "type": "string",
                "format": "date",
                "example": "2026-03-31"
              }
            }
          },
          "totals": {
            "type": "object",
            "properties": {
              "total_calls": {
                "type": "integer",
                "example": 124830
              },
              "answered_calls": {
                "type": "integer",
                "example": 118204
              },
              "failed_calls": {
                "type": "integer",
                "example": 6626
              },
              "total_duration_seconds": {
                "type": "integer",
                "example": 7482600
              },
              "total_cost": {
                "type": "number",
                "format": "float",
                "example": 336717
              },
              "currency": {
                "type": "string",
                "example": "INR"
              }
            }
          },
          "by_direction": {
            "type": "object",
            "properties": {
              "inbound": {
                "type": "object",
                "properties": {
                  "calls": {
                    "type": "integer",
                    "example": 61200
                  },
                  "cost": {
                    "type": "number",
                    "format": "float",
                    "example": 165840
                  }
                }
              },
              "outbound": {
                "type": "object",
                "properties": {
                  "calls": {
                    "type": "integer",
                    "example": 63630
                  },
                  "cost": {
                    "type": "number",
                    "format": "float",
                    "example": 170877
                  }
                }
              }
            }
          },
          "top_customers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "auth_id": {
                  "type": "string",
                  "example": "MA_48149cf4"
                },
                "name": {
                  "type": "string",
                  "example": "Credresolve"
                },
                "calls": {
                  "type": "integer",
                  "example": 18420
                },
                "cost": {
                  "type": "number",
                  "format": "float",
                  "example": 82890
                }
              }
            }
          }
        }
      },
      "PartnerCustomer": {
        "type": "object",
        "description": "A SIP-enabled customer sub-account under your partner umbrella.",
        "properties": {
          "auth_id": {
            "type": "string",
            "description": "Permanent customer identifier - primary key for balance transfers, CDR lookups, transaction queries, and number assignments.",
            "example": "MA_48149cf4"
          },
          "name": {
            "type": "string",
            "example": "Credresolve"
          },
          "email": {
            "type": "string",
            "example": "admin@credresolve.com"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended",
              "inactive"
            ],
            "example": "active"
          },
          "balance": {
            "type": "number",
            "format": "float",
            "example": 2450
          },
          "currency": {
            "type": "string",
            "example": "INR"
          },
          "country": {
            "type": "string",
            "example": "IN"
          },
          "timezone": {
            "type": "string",
            "example": "Asia/Kolkata"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BalanceTransferResult": {
        "type": "object",
        "description": "Result of an atomic transfer from the partner master wallet to a customer sub-account.",
        "properties": {
          "transaction_id": {
            "type": "string",
            "example": "txn_abc123"
          },
          "customer_auth_id": {
            "type": "string",
            "example": "MA_48149cf4"
          },
          "amount": {
            "type": "number",
            "format": "float",
            "example": 500
          },
          "currency": {
            "type": "string",
            "example": "INR"
          },
          "description": {
            "type": "string",
            "example": "April recharge - Credresolve"
          },
          "partner_balance_after": {
            "type": "number",
            "format": "float",
            "example": 47750
          },
          "customer_balance_after": {
            "type": "number",
            "format": "float",
            "example": 2950
          },
          "status": {
            "type": "string",
            "enum": [
              "completed",
              "failed"
            ],
            "example": "completed"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PartnerTransaction": {
        "type": "object",
        "description": "A single credit or debit ledger entry on a partner or customer account.",
        "properties": {
          "id": {
            "type": "string",
            "example": "txn_abc123"
          },
          "type": {
            "type": "string",
            "enum": [
              "recharge",
              "debit",
              "adjustment",
              "refund"
            ],
            "example": "recharge"
          },
          "amount": {
            "type": "number",
            "format": "float",
            "example": 500
          },
          "currency": {
            "type": "string",
            "example": "INR"
          },
          "balance_before": {
            "type": "number",
            "format": "float",
            "example": 1950
          },
          "balance_after": {
            "type": "number",
            "format": "float",
            "example": 2450
          },
          "description": {
            "type": "string",
            "example": "April recharge - Credresolve"
          },
          "initiated_by": {
            "type": "string",
            "example": "partner-882abc"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PartnerCDR": {
        "type": "object",
        "description": "Call detail record for a single voice session under a partner customer account.",
        "properties": {
          "call_uuid": {
            "type": "string",
            "example": "abc123-def456-ghi789"
          },
          "from_number": {
            "type": "string",
            "example": "+919876543210"
          },
          "to_number": {
            "type": "string",
            "example": "+911234567890"
          },
          "direction": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ],
            "example": "outbound"
          },
          "status": {
            "type": "string",
            "enum": [
              "answered",
              "busy",
              "failed",
              "no-answer",
              "cancelled"
            ],
            "example": "answered"
          },
          "duration_seconds": {
            "type": "integer",
            "example": 185
          },
          "hangup_cause": {
            "type": "string",
            "example": "NORMAL_CLEARING"
          },
          "cost": {
            "type": "number",
            "format": "float",
            "example": 1.39
          },
          "currency": {
            "type": "string",
            "example": "INR"
          },
          "start_time": {
            "type": "string",
            "format": "date-time"
          },
          "answer_time": {
            "type": "string",
            "format": "date-time"
          },
          "end_time": {
            "type": "string",
            "format": "date-time"
          },
          "trunk_id": {
            "type": "string",
            "example": "trunk_abc"
          },
          "context": {
            "type": "string",
            "example": "sip-trunking"
          },
          "account_auth_id": {
            "type": "string",
            "example": "MA_48149cf4"
          }
        }
      },
      "PartnerNumber": {
        "type": "object",
        "description": "A DID phone number assigned to a customer account under the partner umbrella.",
        "properties": {
          "number": {
            "type": "string",
            "example": "+912271264217"
          },
          "account_auth_id": {
            "type": "string",
            "example": "MA_48149cf4"
          },
          "account_name": {
            "type": "string",
            "example": "Credresolve"
          },
          "number_type": {
            "type": "string",
            "example": "local"
          },
          "country": {
            "type": "string",
            "example": "IN"
          },
          "region": {
            "type": "string",
            "example": "Mumbai"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "expired"
            ],
            "example": "active"
          },
          "application_id": {
            "type": "string",
            "example": "app_abc123"
          },
          "application_name": {
            "type": "string",
            "example": "Main IVR"
          },
          "trunk_id": {
            "type": "string",
            "example": "trunk_xyz"
          },
          "monthly_cost": {
            "type": "number",
            "format": "float",
            "example": 500
          },
          "currency": {
            "type": "string",
            "example": "INR"
          },
          "assigned_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Account",
      "description": "Manage your account details and credentials"
    },
    {
      "name": "Balance",
      "description": "Retrieve balance and transaction history"
    },
    {
      "name": "Calls",
      "description": "Make and manage outbound calls"
    },
    {
      "name": "Live Calls",
      "description": "Retrieve and control in-progress calls"
    },
    {
      "name": "CDR",
      "description": "Call detail records and history"
    },
    {
      "name": "Sub-Accounts",
      "description": "Create and manage sub-accounts"
    },
    {
      "name": "Phone Numbers",
      "description": "Manage phone numbers on your account"
    },
    {
      "name": "Trunks",
      "description": "Configure SIP trunks for inbound and outbound calling"
    },
    {
      "name": "Conference",
      "description": "Manage conference calls and members"
    },
    {
      "name": "Applications",
      "description": "Manage voice and messaging applications with webhook URLs"
    },
    {
      "name": "Endpoints",
      "description": "Manage SIP endpoints for IP phones, softphones, and SIP clients"
    },
    {
      "name": "Partner API",
      "description": "Reseller and white-label endpoints for managing customer sub-accounts, balance transfers, transactions, CDRs, and DIDs across your partner ecosystem"
    },
    {
      "name": "Sub-Account KYC",
      "description": "Per-sub-account KYC verification (PAN, GST, CIN, Aadhaar, DigiLocker) and hosted email/redirect KYC sessions. Authenticated as the parent main account."
    },
    {
      "name": "Sub-Account KYC (Test Mode)",
      "description": "Mock KYC endpoints that never call the upstream provider. Drive verified / failed / pending / error outcomes with magic inputs for integration testing."
    }
  ],
  "paths": {
    "/api/v1/auth/me": {
      "get": {
        "operationId": "retrieve-account",
        "summary": "Retrieve account",
        "description": "Retrieve complete account details including pricing tier and credentials.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "Account details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "api_id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "phone": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "auth_id": {
                      "type": "string"
                    },
                    "auth_secret": {
                      "type": "string"
                    },
                    "auth_token_expire_time": {
                      "nullable": true
                    },
                    "country": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string"
                    },
                    "address": {
                      "type": "string"
                    },
                    "zip_code": {
                      "type": "string"
                    },
                    "company": {
                      "type": "string"
                    },
                    "account_type": {
                      "type": "string"
                    },
                    "postpaid": {
                      "type": "boolean"
                    },
                    "auto_recharge": {
                      "type": "boolean"
                    },
                    "auto_recharge_config": {
                      "nullable": true
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "carrier_type": {
                      "nullable": true
                    },
                    "customer_type": {
                      "nullable": true
                    },
                    "credit_limit": {
                      "type": "integer"
                    },
                    "cps_limit": {
                      "type": "integer"
                    },
                    "concurrent_calls_limit": {
                      "type": "integer"
                    },
                    "base_cps_limit": {
                      "type": "integer"
                    },
                    "base_concurrent_calls_limit": {
                      "type": "integer"
                    },
                    "purchased_cps": {
                      "type": "integer"
                    },
                    "purchased_concurrent_calls": {
                      "type": "integer"
                    },
                    "risk_rating": {
                      "type": "integer"
                    },
                    "risk_status": {
                      "nullable": true
                    },
                    "features": {
                      "type": "object",
                      "properties": {
                        "call_queue": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "call_queue"
                      ]
                    },
                    "ip_auth_enabled": {
                      "type": "boolean"
                    },
                    "ip_whitelist_rules": {
                      "type": "object"
                    },
                    "allow_aws_ips": {
                      "type": "boolean"
                    },
                    "role": {
                      "type": "string"
                    },
                    "is_active": {
                      "type": "boolean"
                    },
                    "is_verified": {
                      "type": "boolean"
                    },
                    "is_trial_account": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "last_login": {
                      "type": "string"
                    },
                    "pricing_tier_id": {
                      "type": "string"
                    },
                    "pricing_tier": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        },
                        "rate_per_minute": {
                          "type": "number"
                        },
                        "billing_increment_seconds": {
                          "type": "integer"
                        },
                        "minimum_duration_seconds": {
                          "type": "integer"
                        },
                        "is_active": {
                          "type": "boolean"
                        },
                        "is_default": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "description",
                        "currency",
                        "rate_per_minute",
                        "billing_increment_seconds",
                        "minimum_duration_seconds",
                        "is_active",
                        "is_default"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "api_id",
                    "name",
                    "email",
                    "phone",
                    "description",
                    "auth_id",
                    "auth_secret",
                    "auth_token_expire_time",
                    "country",
                    "timezone",
                    "city",
                    "state",
                    "address",
                    "zip_code",
                    "company",
                    "account_type",
                    "postpaid",
                    "auto_recharge",
                    "auto_recharge_config",
                    "enabled",
                    "carrier_type",
                    "customer_type",
                    "credit_limit",
                    "cps_limit",
                    "concurrent_calls_limit",
                    "base_cps_limit",
                    "base_concurrent_calls_limit",
                    "purchased_cps",
                    "purchased_concurrent_calls",
                    "risk_rating",
                    "risk_status",
                    "features",
                    "ip_auth_enabled",
                    "ip_whitelist_rules",
                    "allow_aws_ips",
                    "role",
                    "is_active",
                    "is_verified",
                    "is_trial_account",
                    "created_at",
                    "updated_at",
                    "last_login",
                    "pricing_tier_id",
                    "pricing_tier"
                  ]
                },
                "example": {
                  "type": "account",
                  "id": "500000",
                  "api_id": "aabbccdd-1234-5678-90ab-cdef12345678",
                  "name": "Acme Corp",
                  "email": "admin@example.com",
                  "phone": "+919876543210",
                  "description": null,
                  "auth_id": "MA_XXXXXXXX",
                  "auth_secret": "<redacted>",
                  "auth_token_expire_time": null,
                  "country": "IN",
                  "timezone": "Asia/Kolkata",
                  "city": "Bengaluru",
                  "state": "KA",
                  "address": "123 Example Street, Bengaluru",
                  "zip_code": "560001",
                  "company": "Acme Corp",
                  "account_type": "standard",
                  "postpaid": false,
                  "auto_recharge": true,
                  "auto_recharge_config": null,
                  "enabled": true,
                  "carrier_type": null,
                  "customer_type": null,
                  "credit_limit": 0,
                  "cps_limit": 11,
                  "concurrent_calls_limit": 10,
                  "base_cps_limit": 1,
                  "base_concurrent_calls_limit": 10,
                  "purchased_cps": 10,
                  "purchased_concurrent_calls": 0,
                  "risk_rating": 0,
                  "risk_status": null,
                  "features": {
                    "call_queue": true
                  },
                  "ip_auth_enabled": false,
                  "ip_whitelist_rules": {},
                  "allow_aws_ips": false,
                  "role": "admin",
                  "is_active": true,
                  "is_verified": false,
                  "is_trial_account": false,
                  "created_at": "2025-09-30T08:33:24.700542+00:00",
                  "updated_at": "2026-05-12T05:41:41.892287+00:00",
                  "last_login": "2026-05-12T05:41:42.601005+00:00",
                  "pricing_tier_id": "11223344-5566-7788-99aa-bbccddeeff00",
                  "pricing_tier": {
                    "id": "11223344-5566-7788-99aa-bbccddeeff00",
                    "name": "Standard",
                    "description": null,
                    "currency": "INR",
                    "rate_per_minute": 0.45,
                    "billing_increment_seconds": 60,
                    "minimum_duration_seconds": 0,
                    "is_active": true,
                    "is_default": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/concurrency": {
      "get": {
        "operationId": "get-concurrency",
        "summary": "Get concurrency limits",
        "description": "Retrieve the current concurrent call usage and configured limits.",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "responses": {
          "200": {
            "description": "Concurrency info",
            "content": {
              "application/json": {
                "example": {
                  "account_id": "MA_XXXXXXXX",
                  "concurrent_calls": 0,
                  "max_concurrent": 46,
                  "utilization_pct": 0,
                  "request_id": "aabbccdd1234567890abcdef12345678"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "account_id": {
                      "type": "string"
                    },
                    "concurrent_calls": {
                      "type": "integer"
                    },
                    "max_concurrent": {
                      "type": "integer"
                    },
                    "utilization_pct": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "account_id",
                    "concurrent_calls",
                    "max_concurrent",
                    "utilization_pct",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/balance/{currency}": {
      "get": {
        "operationId": "get-balance",
        "summary": "Get balance",
        "description": "Retrieve the current account balance for a specific currency.",
        "tags": [
          "Balance"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "currency",
            "in": "path",
            "required": true,
            "description": "Currency code (e.g. INR, USD)",
            "schema": {
              "type": "string",
              "example": "INR"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Account balance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "account_id": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "balance": {
                      "type": "number"
                    },
                    "reserved_funds": {
                      "type": "integer"
                    },
                    "promotional_balance": {
                      "type": "integer"
                    },
                    "promotional_reserved_balance": {
                      "type": "integer"
                    },
                    "available_balance": {
                      "type": "number"
                    },
                    "credit_limit": {
                      "type": "integer"
                    },
                    "is_postpaid": {
                      "type": "boolean"
                    },
                    "credit_limit_type": {
                      "type": "string"
                    },
                    "low_balance_threshold": {
                      "type": "integer"
                    },
                    "status": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "account_id",
                    "currency",
                    "balance",
                    "reserved_funds",
                    "promotional_balance",
                    "promotional_reserved_balance",
                    "available_balance",
                    "credit_limit",
                    "is_postpaid",
                    "credit_limit_type",
                    "low_balance_threshold",
                    "status",
                    "created_at",
                    "updated_at"
                  ]
                },
                "example": {
                  "id": "aabbccdd-1234-5678-90ab-cdef12345678",
                  "account_id": "MA_XXXXXXXX",
                  "currency": "INR",
                  "balance": 23906.83,
                  "reserved_funds": 0,
                  "promotional_balance": 0,
                  "promotional_reserved_balance": 0,
                  "available_balance": 23906.83,
                  "credit_limit": 1000,
                  "is_postpaid": true,
                  "credit_limit_type": "soft",
                  "low_balance_threshold": 50,
                  "status": "active",
                  "created_at": "2026-01-19T18:39:15.050543Z",
                  "updated_at": "2026-05-11T06:59:32.802705Z"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/transactions": {
      "get": {
        "operationId": "list-transactions",
        "summary": "List transactions",
        "description": "Retrieve paginated transaction history for the account.",
        "tags": [
          "Balance"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transaction list",
            "content": {
              "application/json": {
                "example": {
                  "transactions": [
                    {
                      "id": "aabbccdd-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "balance_id": "11223344-5566-7788-99aa-bbccddeeff00",
                      "type": "debit",
                      "amount": 0.08,
                      "currency": "INR",
                      "description": "Call to 919876543210 (1s)",
                      "reference": "cdr:99887766-aabb-ccdd-eeff-001122334455",
                      "reference_type": "cdr",
                      "status": "completed",
                      "processed_at": "2026-05-11T06:59:32.806790Z",
                      "created_at": "2026-05-11T06:59:32.806790Z",
                      "updated_at": "2026-05-11T06:59:32.806790Z"
                    }
                  ],
                  "summary": {
                    "total_transactions": 5657,
                    "total_debit": 138901.97,
                    "total_credit": 350806,
                    "net_amount": 211904.03,
                    "by_reference_type": [
                      {
                        "reference_type": "cdr",
                        "total_debit": 932.93,
                        "total_credit": 0,
                        "count": 1866
                      },
                      {
                        "reference_type": "did_rental",
                        "total_debit": 18100,
                        "total_credit": 0,
                        "count": 44
                      },
                      {
                        "reference_type": "manual_adjustment",
                        "total_debit": 0,
                        "total_credit": 2455,
                        "count": 6
                      }
                    ]
                  },
                  "total": 5657,
                  "page": 1,
                  "per_page": 50,
                  "total_pages": 114
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "transactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "account_id": {
                            "type": "string"
                          },
                          "balance_id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "amount": {
                            "type": "number"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "reference": {
                            "type": "string"
                          },
                          "reference_type": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "processed_at": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "account_id",
                          "balance_id",
                          "type",
                          "amount",
                          "currency",
                          "description",
                          "reference",
                          "status",
                          "processed_at",
                          "created_at",
                          "updated_at"
                        ]
                      }
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "total_transactions": {
                          "type": "integer"
                        },
                        "total_debit": {
                          "type": "number"
                        },
                        "total_credit": {
                          "type": "integer"
                        },
                        "net_amount": {
                          "type": "number"
                        },
                        "by_reference_type": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "reference_type": {
                                "type": "string"
                              },
                              "total_debit": {
                                "type": "number"
                              },
                              "total_credit": {
                                "type": "integer"
                              },
                              "count": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "reference_type",
                              "total_debit",
                              "total_credit",
                              "count"
                            ]
                          }
                        }
                      },
                      "required": [
                        "total_transactions",
                        "total_debit",
                        "total_credit",
                        "net_amount",
                        "by_reference_type"
                      ]
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "per_page": {
                      "type": "integer"
                    },
                    "total_pages": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "transactions",
                    "summary",
                    "total",
                    "page",
                    "per_page",
                    "total_pages"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Call/": {
      "get": {
        "operationId": "list-queued-calls",
        "summary": "List queued calls",
        "description": "Retrieve all queued (pending, not yet connected) calls on the account.",
        "tags": [
          "Live Calls"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "status",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "live",
                "queued"
              ],
              "default": "queued"
            },
            "example": "queued"
          }
        ],
        "responses": {
          "200": {
            "description": "List of queued call UUIDs",
            "content": {
              "application/json": {
                "example": {
                  "api_id": "c9527676-5839-11e1-86da-6ff39efcb949",
                  "calls": [
                    "eac94337-b1cd-499b-82d1-b39bca50dc31",
                    "0a70a7fb-168e-4944-a846-4f3f4d2f96f1"
                  ]
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "api_id": {
                      "type": "string",
                      "description": "Unique identifier for this API request"
                    },
                    "calls": {
                      "type": "array",
                      "description": "Array of call UUIDs for all queued calls (max 20)",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "api_id",
                    "calls"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "make-call",
        "summary": "Make an outbound call",
        "description": "Initiate an outbound call to a PSTN number or SIP endpoint.\nUse `<` to separate multiple destinations (max 1000).\n",
        "tags": [
          "Calls"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string"
                  },
                  "to": {
                    "type": "string"
                  },
                  "answer_url": {
                    "type": "string"
                  },
                  "answer_method": {
                    "type": "string"
                  }
                },
                "required": [
                  "from",
                  "to",
                  "answer_url",
                  "answer_method"
                ]
              },
              "example": {
                "from": "14155551234",
                "to": "+919876543210",
                "answer_url": "https://example.com/answer",
                "answer_method": "POST",
                "time_limit": 3600
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Call initiated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "api_id": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_uuid": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "api_id",
                    "message",
                    "request_uuid"
                  ]
                },
                "example": {
                  "api_id": "5a9fcfee-3d4c-11ef-bef9-0242ac110005",
                  "request_uuid": "5a9fd4a0-3d4c-11ef-bef9-0242ac110005",
                  "message": "Call fired"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Call": {
      "get": {
        "operationId": "list-live-calls",
        "summary": "List live calls",
        "description": "Retrieve all currently active (live) calls on the account.",
        "tags": [
          "Live Calls"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "status",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "live",
                "queued"
              ],
              "default": "live"
            },
            "example": "live"
          }
        ],
        "responses": {
          "200": {
            "description": "List of live call UUIDs",
            "content": {
              "application/json": {
                "example": {
                  "api_id": "c9527676-5839-11e1-86da-6ff39efcb949",
                  "calls": [
                    "eac94337-b1cd-499b-82d1-b39bca50dc31",
                    "0a70a7fb-168e-4944-a846-4f3f4d2f96f1"
                  ]
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "api_id": {
                      "type": "string",
                      "description": "Unique identifier for this API request"
                    },
                    "calls": {
                      "type": "array",
                      "description": "Array of call UUIDs for all active calls",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "api_id",
                    "calls"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Call/{call_uuid}": {
      "get": {
        "operationId": "get-live-call",
        "summary": "Retrieve a live call",
        "description": "Retrieve details of a specific live or queued call.",
        "tags": [
          "Live Calls"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "call_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "cdr_XXXXXXXXXX"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "live",
                "queued"
              ],
              "default": "live"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Live call details",
            "content": {
              "application/json": {
                "example": {
                  "api_id": "c9cab827-d7e6-4ab8-b521-f29e593a1c26",
                  "call_status": "in-progress",
                  "call_uuid": "2ded13fe-4f9b-4958-9bfb-093ea2f29f91",
                  "caller_name": "",
                  "direction": "outbound",
                  "from": "919262171438",
                  "request_uuid": "2ded13fe-4f9b-4958-9bfb-093ea2f29f91",
                  "session_start": "2026-06-11 16:03:28.586839",
                  "stir_attestation": "Not Applicable",
                  "stir_verification": "Not Applicable",
                  "to": "919148227303"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "api_id": {
                      "type": "string",
                      "description": "Unique identifier for this API request"
                    },
                    "call_status": {
                      "type": "string",
                      "description": "Current state of the call (e.g. in-progress)"
                    },
                    "call_uuid": {
                      "type": "string"
                    },
                    "caller_name": {
                      "type": "string"
                    },
                    "direction": {
                      "type": "string"
                    },
                    "from": {
                      "type": "string"
                    },
                    "request_uuid": {
                      "type": "string"
                    },
                    "session_start": {
                      "type": "string"
                    },
                    "stir_attestation": {
                      "type": "string"
                    },
                    "stir_verification": {
                      "type": "string"
                    },
                    "to": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "api_id",
                    "call_status",
                    "call_uuid",
                    "caller_name",
                    "direction",
                    "from",
                    "request_uuid",
                    "session_start",
                    "stir_attestation",
                    "stir_verification",
                    "to"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "hangup-call",
        "summary": "Hang up a call",
        "description": "Terminate an active call by its UUID.",
        "tags": [
          "Live Calls"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "call_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Call terminated"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Call/{call_uuid}/": {
      "get": {
        "operationId": "get-queued-call",
        "summary": "Retrieve a queued call",
        "description": "Retrieve details of a specific queued (pending) call.",
        "tags": [
          "Live Calls"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "call_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "cdr_XXXXXXXXXX"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "live",
                "queued"
              ],
              "default": "queued"
            },
            "example": "queued"
          }
        ],
        "responses": {
          "200": {
            "description": "Queued call details",
            "content": {
              "application/json": {
                "example": {
                  "api_id": "45223222-74f8-11e1-8ea7-12313806be9a",
                  "call_status": "queued",
                  "call_uuid": "6653422-91b6-4716-9fad-9463daaeeec2",
                  "request_uuid": "6653422-91b6-4716-9fad-9463daaeeec2",
                  "caller_name": "+15856338537",
                  "direction": "outbound",
                  "from": "15856338537",
                  "to": "14154290945"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "api_id": {
                      "type": "string",
                      "description": "Unique identifier for this API request"
                    },
                    "call_status": {
                      "type": "string",
                      "description": "Always queued for this endpoint"
                    },
                    "call_uuid": {
                      "type": "string"
                    },
                    "request_uuid": {
                      "type": "string"
                    },
                    "caller_name": {
                      "type": "string"
                    },
                    "direction": {
                      "type": "string"
                    },
                    "from": {
                      "type": "string"
                    },
                    "to": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "api_id",
                    "call_status",
                    "call_uuid",
                    "request_uuid",
                    "caller_name",
                    "direction",
                    "from",
                    "to"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/cdr": {
      "get": {
        "operationId": "list-cdrs",
        "summary": "List call records",
        "description": "Returns all CDRs for your account. Supports filtering by phone numbers,\ndate range, call direction, duration, and pagination.\n",
        "tags": [
          "CDR"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "$ref": "#/components/parameters/CdrFromNumber"
          },
          {
            "$ref": "#/components/parameters/CdrToNumber"
          },
          {
            "$ref": "#/components/parameters/CdrStartDate"
          },
          {
            "$ref": "#/components/parameters/CdrEndDate"
          },
          {
            "$ref": "#/components/parameters/CdrCallDirection"
          },
          {
            "$ref": "#/components/parameters/CdrMinDuration"
          },
          {
            "$ref": "#/components/parameters/CdrSipCallId"
          },
          {
            "$ref": "#/components/parameters/CdrBridgeUuid"
          },
          {
            "$ref": "#/components/parameters/CdrHangupCause"
          },
          {
            "$ref": "#/components/parameters/CdrHangupDisposition"
          },
          {
            "$ref": "#/components/parameters/CdrContext"
          },
          {
            "$ref": "#/components/parameters/CdrCampaignId"
          },
          {
            "$ref": "#/components/parameters/CdrSearch"
          },
          {
            "$ref": "#/components/parameters/CdrPage"
          },
          {
            "$ref": "#/components/parameters/CdrPerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of CDRs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "account_id": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "account_id": {
                            "type": "string"
                          },
                          "answer_time": {
                            "type": "string",
                            "nullable": true
                          },
                          "billsec": {
                            "type": "integer"
                          },
                          "bridge_uuid": {
                            "type": "string",
                            "nullable": true
                          },
                          "call_direction": {
                            "type": "string"
                          },
                          "caller_id_name": {
                            "type": "string"
                          },
                          "caller_id_number": {
                            "type": "string"
                          },
                          "campaign_id": {
                            "nullable": true
                          },
                          "carrier_ip": {
                            "nullable": true
                          },
                          "codec": {
                            "type": "string",
                            "nullable": true
                          },
                          "context": {
                            "type": "string"
                          },
                          "cost": {
                            "type": "number"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "customer_endpoint": {
                            "nullable": true
                          },
                          "destination_number": {
                            "type": "string"
                          },
                          "duration": {
                            "type": "integer"
                          },
                          "end_time": {
                            "type": "string"
                          },
                          "failure_code": {
                            "type": "string",
                            "nullable": true
                          },
                          "failure_reason": {
                            "type": "string",
                            "nullable": true
                          },
                          "hangup_cause": {
                            "type": "string",
                            "nullable": true
                          },
                          "hangup_cause_code": {
                            "type": "integer",
                            "nullable": true
                          },
                          "hangup_cause_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "hangup_disposition": {
                            "type": "string",
                            "nullable": true
                          },
                          "hangup_source": {
                            "type": "string",
                            "nullable": true
                          },
                          "id": {
                            "type": "integer"
                          },
                          "jitter": {
                            "type": "number",
                            "nullable": true
                          },
                          "mos": {
                            "type": "number",
                            "nullable": true
                          },
                          "network_addr": {
                            "type": "string",
                            "nullable": true
                          },
                          "origination_region": {
                            "type": "string"
                          },
                          "packet_loss": {
                            "type": "number",
                            "nullable": true
                          },
                          "progress_time": {
                            "type": "string",
                            "nullable": true
                          },
                          "region": {
                            "type": "string"
                          },
                          "ring_time": {
                            "type": "integer"
                          },
                          "sip_call_id": {
                            "type": "string"
                          },
                          "sip_user_agent": {
                            "type": "string",
                            "nullable": true
                          },
                          "start_time": {
                            "type": "string"
                          },
                          "streaming_cost": {
                            "type": "number"
                          },
                          "terminated_to": {
                            "type": "string",
                            "nullable": true
                          },
                          "total_cost": {
                            "type": "number"
                          },
                          "trunk_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "updated_at": {
                            "type": "string"
                          },
                          "uuid": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "account_id",
                          "answer_time",
                          "billsec",
                          "bridge_uuid",
                          "call_direction",
                          "caller_id_name",
                          "caller_id_number",
                          "campaign_id",
                          "carrier_ip",
                          "codec",
                          "context",
                          "cost",
                          "created_at",
                          "currency",
                          "customer_endpoint",
                          "destination_number",
                          "duration",
                          "end_time",
                          "failure_code",
                          "failure_reason",
                          "hangup_cause",
                          "hangup_cause_code",
                          "hangup_cause_name",
                          "hangup_disposition",
                          "hangup_source",
                          "id",
                          "jitter",
                          "mos",
                          "network_addr",
                          "origination_region",
                          "packet_loss",
                          "progress_time",
                          "region",
                          "ring_time",
                          "sip_call_id",
                          "sip_user_agent",
                          "start_time",
                          "streaming_cost",
                          "terminated_to",
                          "total_cost",
                          "trunk_id",
                          "updated_at",
                          "uuid"
                        ]
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        },
                        "pages": {
                          "type": "integer"
                        },
                        "has_next": {
                          "type": "boolean"
                        },
                        "has_prev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "page",
                        "per_page",
                        "total",
                        "pages",
                        "has_next",
                        "has_prev"
                      ]
                    },
                    "success": {
                      "type": "boolean"
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "answerRate": {
                          "type": "number"
                        },
                        "answeredCalls": {
                          "type": "integer"
                        },
                        "avgCallDuration": {
                          "type": "string"
                        },
                        "last_call_at": {
                          "type": "string"
                        },
                        "totalCalls": {
                          "type": "integer"
                        },
                        "total_billable_seconds": {
                          "type": "integer"
                        },
                        "total_cost": {
                          "type": "number"
                        },
                        "total_duration_seconds": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "answerRate",
                        "answeredCalls",
                        "avgCallDuration",
                        "last_call_at",
                        "totalCalls",
                        "total_billable_seconds",
                        "total_cost",
                        "total_duration_seconds"
                      ]
                    }
                  },
                  "required": [
                    "account_id",
                    "count",
                    "data",
                    "pagination",
                    "success",
                    "summary"
                  ]
                },
                "example": {
                  "account_id": "MA_XXXXXXXX",
                  "count": 2,
                  "data": [
                    {
                      "account_id": "MA_XXXXXXXX",
                      "answer_time": "2026-03-25T10:00:01Z",
                      "billsec": 42,
                      "bridge_uuid": "aabbccdd-1234-5678-90ab-cdef12345678",
                      "call_direction": "outbound",
                      "caller_id_name": "John Doe",
                      "caller_id_number": "+919876543210",
                      "campaign_id": null,
                      "carrier_ip": "10.0.0.1",
                      "codec": "PCMU",
                      "context": "voice-api",
                      "cost": 0.45,
                      "created_at": "2026-03-25T10:00:42Z",
                      "currency": "INR",
                      "customer_endpoint": null,
                      "destination_number": "+918012345678",
                      "duration": 47,
                      "end_time": "2026-03-25T10:00:42Z",
                      "failure_code": null,
                      "failure_reason": null,
                      "hangup_cause": "NORMAL_CLEARING",
                      "hangup_cause_code": 4000,
                      "hangup_cause_name": "Normal Hangup",
                      "hangup_disposition": "send_bye",
                      "hangup_source": "Caller",
                      "id": 18000000,
                      "jitter": 0.2,
                      "mos": 4.5,
                      "network_addr": "10.0.0.1",
                      "origination_region": "mumbai",
                      "packet_loss": 0.1,
                      "progress_time": "2026-03-25T10:00:00Z",
                      "region": "ap-south-1",
                      "ring_time": 5,
                      "sip_call_id": "11223344-5566-7788-99aa-bbccddeeff00",
                      "sip_user_agent": "Vobiz",
                      "start_time": "2026-03-25T10:00:00Z",
                      "streaming_cost": 0,
                      "terminated_to": null,
                      "total_cost": 0.45,
                      "trunk_id": null,
                      "updated_at": "2026-03-25T10:00:42Z",
                      "uuid": "aabbccdd-1234-5678-90ab-cdef12345678"
                    },
                    {
                      "account_id": "MA_XXXXXXXX",
                      "answer_time": null,
                      "billsec": 0,
                      "bridge_uuid": null,
                      "call_direction": "inbound",
                      "caller_id_name": "",
                      "caller_id_number": "+919876543210",
                      "campaign_id": null,
                      "carrier_ip": null,
                      "codec": "PCMU",
                      "context": "voice-api",
                      "cost": 0,
                      "created_at": "2026-03-25T09:30:12Z",
                      "currency": "INR",
                      "customer_endpoint": null,
                      "destination_number": "+918012345678",
                      "duration": 12,
                      "end_time": "2026-03-25T09:30:12Z",
                      "failure_code": "16",
                      "failure_reason": "NO_ANSWER",
                      "hangup_cause": "NO_ANSWER",
                      "hangup_cause_code": 4100,
                      "hangup_cause_name": "No Answer",
                      "hangup_disposition": "send_cancel",
                      "hangup_source": "Callee",
                      "id": 18000001,
                      "jitter": 0,
                      "mos": 0,
                      "network_addr": "10.0.0.1",
                      "origination_region": "mumbai",
                      "packet_loss": 0,
                      "progress_time": "2026-03-25T09:30:00Z",
                      "region": "ap-south-1",
                      "ring_time": 12,
                      "sip_call_id": "99887766-5544-3322-1100-aabbccddeeff",
                      "sip_user_agent": "Vobiz",
                      "start_time": "2026-03-25T09:30:00Z",
                      "streaming_cost": 0,
                      "terminated_to": null,
                      "total_cost": 0,
                      "trunk_id": null,
                      "updated_at": "2026-03-25T09:30:12Z",
                      "uuid": "11223344-5566-7788-99aa-bbccddeeff00"
                    }
                  ],
                  "pagination": {
                    "page": 1,
                    "per_page": 20,
                    "total": 4500,
                    "pages": 225,
                    "has_next": true,
                    "has_prev": false
                  },
                  "success": true,
                  "summary": {
                    "answerRate": 48.2,
                    "answeredCalls": 2171,
                    "avgCallDuration": "28s",
                    "last_call_at": "2026-03-25T10:00:00Z",
                    "totalCalls": 4500,
                    "total_billable_seconds": 61211,
                    "total_cost": 1564.51,
                    "total_duration_seconds": 118234
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/cdr/search": {
      "get": {
        "operationId": "search-cdrs",
        "summary": "Search CDRs with filter summary",
        "description": "Identical filters to the list endpoint, but the response also includes a\n`filter_summary` object describing the active filters applied.\n",
        "tags": [
          "CDR"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "$ref": "#/components/parameters/CdrFromNumber"
          },
          {
            "$ref": "#/components/parameters/CdrToNumber"
          },
          {
            "$ref": "#/components/parameters/CdrStartDate"
          },
          {
            "$ref": "#/components/parameters/CdrEndDate"
          },
          {
            "$ref": "#/components/parameters/CdrCallDirection"
          },
          {
            "$ref": "#/components/parameters/CdrMinDuration"
          },
          {
            "$ref": "#/components/parameters/CdrSipCallId"
          },
          {
            "$ref": "#/components/parameters/CdrBridgeUuid"
          },
          {
            "$ref": "#/components/parameters/CdrHangupCause"
          },
          {
            "$ref": "#/components/parameters/CdrHangupDisposition"
          },
          {
            "$ref": "#/components/parameters/CdrContext"
          },
          {
            "$ref": "#/components/parameters/CdrCampaignId"
          },
          {
            "$ref": "#/components/parameters/CdrSearch"
          },
          {
            "$ref": "#/components/parameters/CdrPage"
          },
          {
            "$ref": "#/components/parameters/CdrPerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "CDR list with active filter summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "account_id": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "account_id": {
                            "type": "string"
                          },
                          "answer_time": {
                            "type": "string",
                            "nullable": true
                          },
                          "billsec": {
                            "type": "integer"
                          },
                          "bridge_uuid": {
                            "type": "string",
                            "nullable": true
                          },
                          "call_direction": {
                            "type": "string"
                          },
                          "caller_id_name": {
                            "type": "string"
                          },
                          "caller_id_number": {
                            "type": "string"
                          },
                          "campaign_id": {
                            "nullable": true
                          },
                          "carrier_ip": {
                            "nullable": true
                          },
                          "codec": {
                            "type": "string",
                            "nullable": true
                          },
                          "context": {
                            "type": "string"
                          },
                          "cost": {
                            "type": "number"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "customer_endpoint": {
                            "nullable": true
                          },
                          "destination_number": {
                            "type": "string"
                          },
                          "duration": {
                            "type": "integer"
                          },
                          "end_time": {
                            "type": "string"
                          },
                          "failure_code": {
                            "type": "string",
                            "nullable": true
                          },
                          "failure_reason": {
                            "type": "string",
                            "nullable": true
                          },
                          "hangup_cause": {
                            "type": "string",
                            "nullable": true
                          },
                          "hangup_cause_code": {
                            "type": "integer",
                            "nullable": true
                          },
                          "hangup_cause_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "hangup_disposition": {
                            "type": "string",
                            "nullable": true
                          },
                          "hangup_source": {
                            "type": "string",
                            "nullable": true
                          },
                          "id": {
                            "type": "integer"
                          },
                          "jitter": {
                            "type": "number",
                            "nullable": true
                          },
                          "mos": {
                            "type": "number",
                            "nullable": true
                          },
                          "network_addr": {
                            "type": "string",
                            "nullable": true
                          },
                          "origination_region": {
                            "type": "string"
                          },
                          "packet_loss": {
                            "type": "number",
                            "nullable": true
                          },
                          "progress_time": {
                            "type": "string",
                            "nullable": true
                          },
                          "region": {
                            "type": "string"
                          },
                          "ring_time": {
                            "type": "integer"
                          },
                          "sip_call_id": {
                            "type": "string"
                          },
                          "sip_user_agent": {
                            "type": "string",
                            "nullable": true
                          },
                          "start_time": {
                            "type": "string"
                          },
                          "streaming_cost": {
                            "type": "number"
                          },
                          "terminated_to": {
                            "type": "string",
                            "nullable": true
                          },
                          "total_cost": {
                            "type": "number"
                          },
                          "trunk_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "updated_at": {
                            "type": "string"
                          },
                          "uuid": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "account_id",
                          "answer_time",
                          "billsec",
                          "bridge_uuid",
                          "call_direction",
                          "caller_id_name",
                          "caller_id_number",
                          "campaign_id",
                          "carrier_ip",
                          "codec",
                          "context",
                          "cost",
                          "created_at",
                          "currency",
                          "customer_endpoint",
                          "destination_number",
                          "duration",
                          "end_time",
                          "failure_code",
                          "failure_reason",
                          "hangup_cause",
                          "hangup_cause_code",
                          "hangup_cause_name",
                          "hangup_disposition",
                          "hangup_source",
                          "id",
                          "jitter",
                          "mos",
                          "network_addr",
                          "origination_region",
                          "packet_loss",
                          "progress_time",
                          "region",
                          "ring_time",
                          "sip_call_id",
                          "sip_user_agent",
                          "start_time",
                          "streaming_cost",
                          "terminated_to",
                          "total_cost",
                          "trunk_id",
                          "updated_at",
                          "uuid"
                        ]
                      }
                    },
                    "filters": {
                      "type": "object",
                      "properties": {
                        "call_direction": {
                          "type": "string"
                        },
                        "from_number": {
                          "type": "string"
                        },
                        "hangup_cause": {
                          "type": "string"
                        },
                        "to_number": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "call_direction",
                        "from_number",
                        "hangup_cause",
                        "to_number"
                      ]
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        },
                        "pages": {
                          "type": "integer"
                        },
                        "has_next": {
                          "type": "boolean"
                        },
                        "has_prev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "page",
                        "per_page",
                        "total",
                        "pages",
                        "has_next",
                        "has_prev"
                      ]
                    },
                    "success": {
                      "type": "boolean"
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "answerRate": {
                          "type": "number"
                        },
                        "answeredCalls": {
                          "type": "integer"
                        },
                        "avgCallDuration": {
                          "type": "string"
                        },
                        "last_call_at": {
                          "type": "string"
                        },
                        "totalCalls": {
                          "type": "integer"
                        },
                        "total_billable_seconds": {
                          "type": "integer"
                        },
                        "total_cost": {
                          "type": "number"
                        },
                        "total_duration_seconds": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "answerRate",
                        "answeredCalls",
                        "avgCallDuration",
                        "last_call_at",
                        "totalCalls",
                        "total_billable_seconds",
                        "total_cost",
                        "total_duration_seconds"
                      ]
                    }
                  },
                  "required": [
                    "account_id",
                    "count",
                    "data",
                    "filters",
                    "pagination",
                    "success",
                    "summary"
                  ]
                },
                "example": {
                  "account_id": "MA_XXXXXXXX",
                  "count": 1,
                  "data": [
                    {
                      "account_id": "MA_XXXXXXXX",
                      "answer_time": "2026-03-25T10:00:01Z",
                      "billsec": 42,
                      "bridge_uuid": "55667788-1122-3344-5566-77889900aabb",
                      "call_direction": "outbound",
                      "caller_id_name": "John Doe",
                      "caller_id_number": "+919876543210",
                      "campaign_id": null,
                      "carrier_ip": "10.0.0.1",
                      "codec": "PCMU",
                      "context": "voice-api",
                      "cost": 0.45,
                      "created_at": "2026-03-25T10:00:42Z",
                      "currency": "INR",
                      "customer_endpoint": null,
                      "destination_number": "+918012345678",
                      "duration": 47,
                      "end_time": "2026-03-25T10:00:42Z",
                      "failure_code": null,
                      "failure_reason": null,
                      "hangup_cause": "NORMAL_CLEARING",
                      "hangup_cause_code": 4000,
                      "hangup_cause_name": "Normal Hangup",
                      "hangup_disposition": "send_bye",
                      "hangup_source": "Caller",
                      "id": 18000002,
                      "jitter": 0.2,
                      "mos": 4.5,
                      "network_addr": "10.0.0.1",
                      "origination_region": "mumbai",
                      "packet_loss": 0.1,
                      "progress_time": "2026-03-25T10:00:00Z",
                      "region": "ap-south-1",
                      "ring_time": 5,
                      "sip_call_id": "55667788-1122-3344-5566-77889900aabb",
                      "sip_user_agent": "Vobiz",
                      "start_time": "2026-03-25T10:00:00Z",
                      "streaming_cost": 0,
                      "terminated_to": null,
                      "total_cost": 0.45,
                      "trunk_id": null,
                      "updated_at": "2026-03-25T10:00:42Z",
                      "uuid": "55667788-1122-3344-5566-77889900aabb"
                    }
                  ],
                  "filters": {
                    "call_direction": "outbound",
                    "from_number": "+919876543210",
                    "hangup_cause": "",
                    "to_number": ""
                  },
                  "pagination": {
                    "page": 1,
                    "per_page": 20,
                    "total": 1,
                    "pages": 1,
                    "has_next": false,
                    "has_prev": false
                  },
                  "success": true,
                  "summary": {
                    "answerRate": 100,
                    "answeredCalls": 1,
                    "avgCallDuration": "47s",
                    "last_call_at": "2026-03-25T10:00:00Z",
                    "totalCalls": 1,
                    "total_billable_seconds": 42,
                    "total_cost": 0.45,
                    "total_duration_seconds": 47
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/cdr/recent": {
      "get": {
        "operationId": "list-recent-cdrs",
        "summary": "Get the most recent CDRs",
        "description": "Returns the most recent CDRs for your account without requiring a date range.\nDefault 20 records; use `limit` to retrieve more.\n",
        "tags": [
          "CDR"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of recent CDRs to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "example": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Recent CDRs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "account_id": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "account_id": {
                            "type": "string"
                          },
                          "answer_time": {
                            "type": "string",
                            "nullable": true
                          },
                          "billsec": {
                            "type": "integer"
                          },
                          "bridge_uuid": {
                            "type": "string",
                            "nullable": true
                          },
                          "call_direction": {
                            "type": "string"
                          },
                          "caller_id_name": {
                            "type": "string"
                          },
                          "caller_id_number": {
                            "type": "string"
                          },
                          "campaign_id": {
                            "nullable": true
                          },
                          "carrier_ip": {
                            "nullable": true
                          },
                          "codec": {
                            "type": "string",
                            "nullable": true
                          },
                          "context": {
                            "type": "string"
                          },
                          "cost": {
                            "type": "number"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "customer_endpoint": {
                            "nullable": true
                          },
                          "destination_number": {
                            "type": "string"
                          },
                          "duration": {
                            "type": "integer"
                          },
                          "end_time": {
                            "type": "string"
                          },
                          "failure_code": {
                            "type": "string",
                            "nullable": true
                          },
                          "failure_reason": {
                            "type": "string",
                            "nullable": true
                          },
                          "hangup_cause": {
                            "type": "string",
                            "nullable": true
                          },
                          "hangup_cause_code": {
                            "type": "integer",
                            "nullable": true
                          },
                          "hangup_cause_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "hangup_disposition": {
                            "type": "string",
                            "nullable": true
                          },
                          "hangup_source": {
                            "type": "string",
                            "nullable": true
                          },
                          "id": {
                            "type": "integer"
                          },
                          "jitter": {
                            "type": "number",
                            "nullable": true
                          },
                          "mos": {
                            "type": "number",
                            "nullable": true
                          },
                          "network_addr": {
                            "type": "string",
                            "nullable": true
                          },
                          "origination_region": {
                            "type": "string"
                          },
                          "packet_loss": {
                            "type": "number",
                            "nullable": true
                          },
                          "progress_time": {
                            "type": "string",
                            "nullable": true
                          },
                          "region": {
                            "type": "string"
                          },
                          "ring_time": {
                            "type": "integer"
                          },
                          "sip_call_id": {
                            "type": "string"
                          },
                          "sip_user_agent": {
                            "type": "string",
                            "nullable": true
                          },
                          "start_time": {
                            "type": "string"
                          },
                          "streaming_cost": {
                            "type": "number"
                          },
                          "terminated_to": {
                            "type": "string",
                            "nullable": true
                          },
                          "total_cost": {
                            "type": "number"
                          },
                          "trunk_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "updated_at": {
                            "type": "string"
                          },
                          "uuid": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "account_id",
                          "answer_time",
                          "billsec",
                          "bridge_uuid",
                          "call_direction",
                          "caller_id_name",
                          "caller_id_number",
                          "campaign_id",
                          "carrier_ip",
                          "codec",
                          "context",
                          "cost",
                          "created_at",
                          "currency",
                          "customer_endpoint",
                          "destination_number",
                          "duration",
                          "end_time",
                          "failure_code",
                          "failure_reason",
                          "hangup_cause",
                          "hangup_cause_code",
                          "hangup_cause_name",
                          "hangup_disposition",
                          "hangup_source",
                          "id",
                          "jitter",
                          "mos",
                          "network_addr",
                          "origination_region",
                          "packet_loss",
                          "progress_time",
                          "region",
                          "ring_time",
                          "sip_call_id",
                          "sip_user_agent",
                          "start_time",
                          "streaming_cost",
                          "terminated_to",
                          "total_cost",
                          "trunk_id",
                          "updated_at",
                          "uuid"
                        ]
                      }
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "account_id",
                    "count",
                    "data",
                    "success"
                  ]
                },
                "example": {
                  "account_id": "MA_XXXXXXXX",
                  "count": 1,
                  "data": [
                    {
                      "account_id": "MA_XXXXXXXX",
                      "answer_time": "2026-03-25T10:00:01Z",
                      "billsec": 42,
                      "bridge_uuid": "99887766-5544-3322-1100-aabbccddeeff",
                      "call_direction": "outbound",
                      "caller_id_name": "John Doe",
                      "caller_id_number": "+919876543210",
                      "campaign_id": null,
                      "carrier_ip": "10.0.0.1",
                      "codec": "PCMU",
                      "context": "voice-api",
                      "cost": 0.45,
                      "created_at": "2026-03-25T10:00:42Z",
                      "currency": "INR",
                      "customer_endpoint": null,
                      "destination_number": "+918012345678",
                      "duration": 47,
                      "end_time": "2026-03-25T10:00:42Z",
                      "failure_code": null,
                      "failure_reason": null,
                      "hangup_cause": "NORMAL_CLEARING",
                      "hangup_cause_code": 4000,
                      "hangup_cause_name": "Normal Hangup",
                      "hangup_disposition": "send_bye",
                      "hangup_source": "Caller",
                      "id": 18000003,
                      "jitter": 0.2,
                      "mos": 4.5,
                      "network_addr": "10.0.0.1",
                      "origination_region": "mumbai",
                      "packet_loss": 0.1,
                      "progress_time": "2026-03-25T10:00:00Z",
                      "region": "ap-south-1",
                      "ring_time": 5,
                      "sip_call_id": "99887766-5544-3322-1100-aabbccddeeff",
                      "sip_user_agent": "Vobiz",
                      "start_time": "2026-03-25T10:00:00Z",
                      "streaming_cost": 0,
                      "terminated_to": null,
                      "total_cost": 0.45,
                      "trunk_id": null,
                      "updated_at": "2026-03-25T10:00:42Z",
                      "uuid": "99887766-5544-3322-1100-aabbccddeeff"
                    }
                  ],
                  "success": true
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/cdr/export": {
      "get": {
        "operationId": "export-cdrs",
        "summary": "Export CDRs as CSV",
        "description": "Returns CDR data as a downloadable CSV file. Same filters as the list endpoint.\n\n**Note:** Do NOT send `Accept: application/json` on this endpoint - the response is `text/csv`.\n",
        "tags": [
          "CDR"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "$ref": "#/components/parameters/CdrFromNumber"
          },
          {
            "$ref": "#/components/parameters/CdrToNumber"
          },
          {
            "$ref": "#/components/parameters/CdrStartDate"
          },
          {
            "$ref": "#/components/parameters/CdrEndDate"
          },
          {
            "$ref": "#/components/parameters/CdrCallDirection"
          },
          {
            "$ref": "#/components/parameters/CdrMinDuration"
          },
          {
            "$ref": "#/components/parameters/CdrSipCallId"
          },
          {
            "$ref": "#/components/parameters/CdrBridgeUuid"
          },
          {
            "$ref": "#/components/parameters/CdrHangupCause"
          },
          {
            "$ref": "#/components/parameters/CdrHangupDisposition"
          },
          {
            "$ref": "#/components/parameters/CdrContext"
          },
          {
            "$ref": "#/components/parameters/CdrCampaignId"
          },
          {
            "$ref": "#/components/parameters/CdrSearch"
          }
        ],
        "responses": {
          "200": {
            "description": "CSV file containing CDR rows",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/cdr/{call_id}": {
      "get": {
        "operationId": "get-cdr",
        "summary": "Retrieve a CDR by call ID",
        "description": "Retrieve the CDR for a specific completed call using its `call_id`.\nUseful when you have a `call_id` from a callback or previous API response.\n",
        "tags": [
          "CDR"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "call_id",
            "in": "path",
            "required": true,
            "description": "The unique call ID of the completed call.",
            "schema": {
              "type": "string",
              "example": "abc123-def456-ghi789"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CDR details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "account_id": {
                          "type": "string"
                        },
                        "answer_time": {
                          "type": "string"
                        },
                        "billsec": {
                          "type": "integer"
                        },
                        "bridge_uuid": {
                          "type": "string"
                        },
                        "call_direction": {
                          "type": "string"
                        },
                        "caller_id_name": {
                          "type": "string"
                        },
                        "caller_id_number": {
                          "type": "string"
                        },
                        "campaign_id": {
                          "nullable": true
                        },
                        "carrier_ip": {
                          "nullable": true
                        },
                        "codec": {
                          "type": "string"
                        },
                        "context": {
                          "type": "string"
                        },
                        "cost": {
                          "type": "number"
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        },
                        "customer_endpoint": {
                          "nullable": true
                        },
                        "destination_number": {
                          "type": "string"
                        },
                        "duration": {
                          "type": "integer"
                        },
                        "end_time": {
                          "type": "string"
                        },
                        "failure_code": {
                          "nullable": true
                        },
                        "failure_reason": {
                          "nullable": true
                        },
                        "hangup_cause": {
                          "type": "string"
                        },
                        "hangup_cause_code": {
                          "type": "integer"
                        },
                        "hangup_cause_name": {
                          "type": "string"
                        },
                        "hangup_disposition": {
                          "type": "string"
                        },
                        "hangup_source": {
                          "type": "string"
                        },
                        "id": {
                          "type": "integer"
                        },
                        "jitter": {
                          "type": "number"
                        },
                        "mos": {
                          "type": "number"
                        },
                        "network_addr": {
                          "type": "string"
                        },
                        "origination_region": {
                          "type": "string"
                        },
                        "packet_loss": {
                          "type": "integer"
                        },
                        "progress_time": {
                          "type": "string"
                        },
                        "region": {
                          "type": "string"
                        },
                        "ring_time": {
                          "type": "integer"
                        },
                        "sip_call_id": {
                          "type": "string"
                        },
                        "sip_user_agent": {
                          "type": "string"
                        },
                        "start_time": {
                          "type": "string"
                        },
                        "streaming_cost": {
                          "type": "integer"
                        },
                        "terminated_to": {
                          "nullable": true
                        },
                        "total_cost": {
                          "type": "number"
                        },
                        "trunk_id": {
                          "nullable": true
                        },
                        "updated_at": {
                          "type": "string"
                        },
                        "uuid": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "account_id",
                        "answer_time",
                        "billsec",
                        "bridge_uuid",
                        "call_direction",
                        "caller_id_name",
                        "caller_id_number",
                        "campaign_id",
                        "carrier_ip",
                        "codec",
                        "context",
                        "cost",
                        "created_at",
                        "currency",
                        "customer_endpoint",
                        "destination_number",
                        "duration",
                        "end_time",
                        "failure_code",
                        "failure_reason",
                        "hangup_cause",
                        "hangup_cause_code",
                        "hangup_cause_name",
                        "hangup_disposition",
                        "hangup_source",
                        "id",
                        "jitter",
                        "mos",
                        "network_addr",
                        "origination_region",
                        "packet_loss",
                        "progress_time",
                        "region",
                        "ring_time",
                        "sip_call_id",
                        "sip_user_agent",
                        "start_time",
                        "streaming_cost",
                        "terminated_to",
                        "total_cost",
                        "trunk_id",
                        "updated_at",
                        "uuid"
                      ]
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "success"
                  ]
                },
                "example": {
                  "data": {
                    "account_id": "MA_XXXXXXXX",
                    "answer_time": "2026-03-25T10:00:01Z",
                    "billsec": 42,
                    "bridge_uuid": "11223344-5566-7788-99aa-bbccddeeff00",
                    "call_direction": "outbound",
                    "caller_id_name": "John Doe",
                    "caller_id_number": "+919876543210",
                    "campaign_id": null,
                    "carrier_ip": "10.0.0.1",
                    "codec": "PCMU",
                    "context": "voice-api",
                    "cost": 0.45,
                    "created_at": "2026-03-25T10:00:42Z",
                    "currency": "INR",
                    "customer_endpoint": null,
                    "destination_number": "+918012345678",
                    "duration": 47,
                    "end_time": "2026-03-25T10:00:42Z",
                    "failure_code": null,
                    "failure_reason": null,
                    "hangup_cause": "NORMAL_CLEARING",
                    "hangup_cause_code": 4000,
                    "hangup_cause_name": "Normal Hangup",
                    "hangup_disposition": "send_bye",
                    "hangup_source": "Caller",
                    "id": 18000004,
                    "jitter": 0,
                    "mos": 4.5,
                    "network_addr": "10.0.0.1",
                    "origination_region": "mumbai",
                    "packet_loss": 0,
                    "progress_time": "2026-03-25T10:00:00Z",
                    "region": "ap-south-1",
                    "ring_time": 5,
                    "sip_call_id": "11223344-5566-7788-99aa-bbccddeeff00",
                    "sip_user_agent": "Vobiz",
                    "start_time": "2026-03-25T10:00:00Z",
                    "streaming_cost": 0,
                    "terminated_to": null,
                    "total_cost": 0.45,
                    "trunk_id": null,
                    "updated_at": "2026-03-25T10:00:42Z",
                    "uuid": "aabbccdd-1234-5678-90ab-cdef12345678"
                  },
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "CDR not found"
          }
        }
      }
    },
    "/api/v1/accounts/{auth_id}/sub-accounts/": {
      "get": {
        "operationId": "list-subaccounts",
        "summary": "List sub-accounts",
        "description": "Retrieve all sub-accounts under the master account.",
        "tags": [
          "Sub-Accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "responses": {
          "200": {
            "description": "List of sub-accounts",
            "content": {
              "application/json": {
                "example": {
                  "sub_accounts": [
                    {
                      "name": "Acme Corp",
                      "email": null,
                      "phone": null,
                      "description": null,
                      "permissions": null,
                      "rate_limit": 1000,
                      "id": "500001",
                      "parent_account_id": "500000",
                      "parent_auth_id": "MA_XXXXXXXX",
                      "auth_id": "SA_XXXXXXXX",
                      "auth_token": "<redacted>",
                      "api_id": "aabbccdd-1234-5678-90ab-cdef12345678",
                      "email_verified": false,
                      "enabled": true,
                      "created": "2026-03-25",
                      "modified": "2026-03-25",
                      "is_active": true,
                      "created_at": "2026-03-25T08:33:24.700542Z",
                      "updated_at": "2026-03-25T08:33:24.700542Z",
                      "last_used": null,
                      "account": "/v1/Account/MA_XXXXXXXX/",
                      "resource_uri": "/v1/Account/MA_XXXXXXXX/Subaccount/SA_XXXXXXXX/"
                    },
                    {
                      "name": "John Doe",
                      "email": "john@example.com",
                      "phone": null,
                      "description": null,
                      "permissions": {
                        "cdr": true,
                        "calls": true
                      },
                      "rate_limit": 5000,
                      "id": "500002",
                      "parent_account_id": "500000",
                      "parent_auth_id": "MA_XXXXXXXX",
                      "auth_id": "SA_YYYYYYYY",
                      "auth_token": "<redacted>",
                      "api_id": "11223344-5566-7788-99aa-bbccddeeff00",
                      "email_verified": false,
                      "enabled": true,
                      "created": "2026-03-25",
                      "modified": "2026-03-25",
                      "is_active": true,
                      "created_at": "2026-03-25T11:56:03.796409Z",
                      "updated_at": "2026-03-25T11:56:03.796409Z",
                      "last_used": null,
                      "account": "/v1/Account/MA_XXXXXXXX/",
                      "resource_uri": "/v1/Account/MA_XXXXXXXX/Subaccount/SA_YYYYYYYY/"
                    }
                  ],
                  "total": 28,
                  "page": 1,
                  "size": 10
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "sub_accounts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string",
                            "nullable": true
                          },
                          "phone": {
                            "nullable": true
                          },
                          "description": {
                            "nullable": true
                          },
                          "permissions": {
                            "anyOf": [
                              {
                                "nullable": true
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "cdr": {
                                    "type": "boolean"
                                  },
                                  "calls": {
                                    "type": "boolean"
                                  }
                                }
                              }
                            ]
                          },
                          "rate_limit": {
                            "type": "integer"
                          },
                          "id": {
                            "type": "string"
                          },
                          "parent_account_id": {
                            "type": "string"
                          },
                          "parent_auth_id": {
                            "type": "string"
                          },
                          "auth_id": {
                            "type": "string"
                          },
                          "auth_token": {
                            "type": "string"
                          },
                          "api_id": {
                            "type": "string"
                          },
                          "email_verified": {
                            "type": "boolean"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "created": {
                            "type": "string"
                          },
                          "modified": {
                            "type": "string"
                          },
                          "is_active": {
                            "type": "boolean"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          },
                          "last_used": {
                            "type": "string",
                            "nullable": true
                          },
                          "account": {
                            "type": "string"
                          },
                          "resource_uri": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "email",
                          "phone",
                          "description",
                          "permissions",
                          "rate_limit",
                          "id",
                          "parent_account_id",
                          "parent_auth_id",
                          "auth_id",
                          "auth_token",
                          "api_id",
                          "email_verified",
                          "enabled",
                          "created",
                          "modified",
                          "is_active",
                          "created_at",
                          "updated_at",
                          "last_used",
                          "account",
                          "resource_uri"
                        ]
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "size": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "sub_accounts",
                    "total",
                    "page",
                    "size"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-subaccount",
        "summary": "Create a sub-account",
        "description": "Create a new sub-account under the master account.\n\nSet `kyc_mode` to control how the sub-account is verified:\n\n- `personal_use` *(default)* — the sub-account inherits the parent's\n  KYC; no separate verification is required.\n- `customer_use` — the sub-account must complete its own KYC before it\n  can place calls. A fresh `customer_use` sub-account is returned with\n  `kyc_calls_blocked: true`. `customer_use` **requires** `email`.\n",
        "tags": [
          "Sub-Accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Human-readable name for the sub-account."
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Required when `kyc_mode` is `customer_use`."
                  },
                  "password": {
                    "type": "string",
                    "description": "Login password for the sub-account."
                  },
                  "kyc_mode": {
                    "type": "string",
                    "enum": [
                      "personal_use",
                      "customer_use"
                    ],
                    "default": "personal_use",
                    "description": "`personal_use` inherits parent KYC. `customer_use` requires\nthe sub-account to complete its own KYC and requires `email`.\n"
                  },
                  "business_type": {
                    "type": "string",
                    "enum": [
                      "individual",
                      "proprietorship",
                      "private_limited",
                      "llp",
                      "partnership",
                      "public_limited",
                      "trust",
                      "society",
                      "huf",
                      "government"
                    ],
                    "description": "Legal constitution of the customer. Drives which KYC documents are required."
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "Customer Co",
                "email": "customer@example.com",
                "password": "Customer@12345",
                "kyc_mode": "customer_use",
                "business_type": "private_limited"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "sub_account": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "nullable": true
                        },
                        "phone": {
                          "nullable": true
                        },
                        "description": {
                          "nullable": true
                        },
                        "permissions": {
                          "nullable": true
                        },
                        "rate_limit": {
                          "type": "integer"
                        },
                        "id": {
                          "type": "string"
                        },
                        "parent_account_id": {
                          "type": "string"
                        },
                        "parent_auth_id": {
                          "type": "string"
                        },
                        "auth_id": {
                          "type": "string"
                        },
                        "auth_token": {
                          "type": "string"
                        },
                        "api_id": {
                          "type": "string"
                        },
                        "email_verified": {
                          "type": "boolean"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "created": {
                          "type": "string"
                        },
                        "modified": {
                          "type": "string"
                        },
                        "is_active": {
                          "type": "boolean"
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        },
                        "last_used": {
                          "nullable": true
                        },
                        "account": {
                          "type": "string"
                        },
                        "resource_uri": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "email",
                        "phone",
                        "description",
                        "permissions",
                        "rate_limit",
                        "id",
                        "parent_account_id",
                        "parent_auth_id",
                        "auth_id",
                        "auth_token",
                        "api_id",
                        "email_verified",
                        "enabled",
                        "created",
                        "modified",
                        "is_active",
                        "created_at",
                        "updated_at",
                        "last_used",
                        "account",
                        "resource_uri"
                      ]
                    },
                    "auth_credentials": {
                      "type": "object",
                      "properties": {
                        "auth_id": {
                          "type": "string"
                        },
                        "auth_token": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "auth_id",
                        "auth_token"
                      ]
                    },
                    "tokens": {
                      "type": "object",
                      "properties": {
                        "access_token": {
                          "type": "string"
                        },
                        "refresh_token": {
                          "type": "string"
                        },
                        "token_type": {
                          "type": "string"
                        },
                        "expires_in": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "access_token",
                        "refresh_token",
                        "token_type",
                        "expires_in"
                      ]
                    }
                  },
                  "required": [
                    "message",
                    "sub_account",
                    "auth_credentials",
                    "tokens"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "Sub-account created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubAccount"
                },
                "example": {
                  "message": "Sub-account created successfully",
                  "sub_account": {
                    "name": "Acme Sub-Account",
                    "email": null,
                    "phone": null,
                    "description": null,
                    "permissions": null,
                    "rate_limit": 1000,
                    "id": "500001",
                    "parent_account_id": "510762",
                    "parent_auth_id": "MA_XXXXXXXX",
                    "auth_id": "SA_XXXXXXXX",
                    "auth_token": "<redacted>",
                    "api_id": "aabbccdd-1234-5678-90ab-cdef12345678",
                    "email_verified": false,
                    "enabled": true,
                    "created": "2026-03-25",
                    "modified": "2026-03-25",
                    "is_active": true,
                    "created_at": "2026-03-25T10:00:00Z",
                    "updated_at": "2026-03-25T10:00:00Z",
                    "last_used": null,
                    "account": "/v1/Account/MA_XXXXXXXX/",
                    "resource_uri": "/v1/Account/MA_XXXXXXXX/Subaccount/SA_XXXXXXXX/"
                  },
                  "auth_credentials": {
                    "auth_id": "SA_XXXXXXXX",
                    "auth_token": "<redacted>"
                  },
                  "tokens": {
                    "access_token": "<redacted>",
                    "refresh_token": "<redacted>",
                    "token_type": "bearer",
                    "expires_in": 1800
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{auth_id}/sub-accounts/{sub_auth_id}": {
      "get": {
        "operationId": "retrieve-subaccount",
        "summary": "Retrieve a sub-account",
        "description": "Retrieve details of a specific sub-account.",
        "tags": [
          "Sub-Accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "sub_auth_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "SA_XXXXXX"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sub-account details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "nullable": true
                    },
                    "phone": {
                      "nullable": true
                    },
                    "description": {
                      "nullable": true
                    },
                    "permissions": {
                      "nullable": true
                    },
                    "rate_limit": {
                      "type": "integer"
                    },
                    "id": {
                      "type": "string"
                    },
                    "parent_account_id": {
                      "type": "string"
                    },
                    "parent_auth_id": {
                      "type": "string"
                    },
                    "auth_id": {
                      "type": "string"
                    },
                    "auth_token": {
                      "type": "string"
                    },
                    "api_id": {
                      "type": "string"
                    },
                    "email_verified": {
                      "type": "boolean"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "created": {
                      "type": "string"
                    },
                    "modified": {
                      "type": "string"
                    },
                    "is_active": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "last_used": {
                      "nullable": true
                    },
                    "account": {
                      "type": "string"
                    },
                    "resource_uri": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "email",
                    "phone",
                    "description",
                    "permissions",
                    "rate_limit",
                    "id",
                    "parent_account_id",
                    "parent_auth_id",
                    "auth_id",
                    "auth_token",
                    "api_id",
                    "email_verified",
                    "enabled",
                    "created",
                    "modified",
                    "is_active",
                    "created_at",
                    "updated_at",
                    "last_used",
                    "account",
                    "resource_uri"
                  ]
                },
                "example": {
                  "name": "Acme Sub-Account",
                  "email": null,
                  "phone": null,
                  "description": null,
                  "permissions": null,
                  "rate_limit": 1000,
                  "id": "500001",
                  "parent_account_id": "510762",
                  "parent_auth_id": "MA_XXXXXXXX",
                  "auth_id": "SA_XXXXXXXX",
                  "auth_token": "<redacted>",
                  "api_id": "11223344-1234-5678-90ab-cdef12345678",
                  "email_verified": false,
                  "enabled": true,
                  "created": "2026-03-25",
                  "modified": "2026-03-25",
                  "is_active": true,
                  "created_at": "2026-03-25T10:00:00Z",
                  "updated_at": "2026-03-25T10:00:00Z",
                  "last_used": null,
                  "account": "/v1/Account/MA_XXXXXXXX/",
                  "resource_uri": "/v1/Account/MA_XXXXXXXX/Subaccount/SA_XXXXXXXX/"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-subaccount",
        "summary": "Update a sub-account",
        "description": "Update the name or status of a sub-account, or change its `kyc_mode`.\n\nPromoting an existing sub-account to `customer_use` requires the\nsub-account to already have an `email` (otherwise `400`). On any\n`kyc_mode` change, `kyc_calls_blocked` is re-derived from the\nsub-account's current KYC state.\n",
        "tags": [
          "Sub-Accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "sub_auth_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "kyc_mode": {
                    "type": "string",
                    "enum": [
                      "personal_use",
                      "customer_use"
                    ],
                    "description": "Change the verification mode. Promoting to `customer_use` requires the sub-account to have an `email`."
                  }
                }
              },
              "example": {
                "kyc_mode": "customer_use"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sub-account updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "nullable": true
                    },
                    "phone": {
                      "nullable": true
                    },
                    "description": {
                      "nullable": true
                    },
                    "permissions": {
                      "nullable": true
                    },
                    "rate_limit": {
                      "type": "integer"
                    },
                    "id": {
                      "type": "string"
                    },
                    "parent_account_id": {
                      "type": "string"
                    },
                    "parent_auth_id": {
                      "type": "string"
                    },
                    "auth_id": {
                      "type": "string"
                    },
                    "auth_token": {
                      "type": "string"
                    },
                    "api_id": {
                      "type": "string"
                    },
                    "email_verified": {
                      "type": "boolean"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "created": {
                      "type": "string"
                    },
                    "modified": {
                      "type": "string"
                    },
                    "is_active": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "last_used": {
                      "nullable": true
                    },
                    "account": {
                      "type": "string"
                    },
                    "resource_uri": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "email",
                    "phone",
                    "description",
                    "permissions",
                    "rate_limit",
                    "id",
                    "parent_account_id",
                    "parent_auth_id",
                    "auth_id",
                    "auth_token",
                    "api_id",
                    "email_verified",
                    "enabled",
                    "created",
                    "modified",
                    "is_active",
                    "created_at",
                    "updated_at",
                    "last_used",
                    "account",
                    "resource_uri"
                  ]
                },
                "example": {
                  "name": "Acme Sub-Account Updated",
                  "email": null,
                  "phone": null,
                  "description": null,
                  "permissions": null,
                  "rate_limit": 1000,
                  "id": "500001",
                  "parent_account_id": "510762",
                  "parent_auth_id": "MA_XXXXXXXX",
                  "auth_id": "SA_XXXXXXXX",
                  "auth_token": "<redacted>",
                  "api_id": "aabbccdd-1234-5678-90ab-cdef12345678",
                  "email_verified": false,
                  "enabled": false,
                  "created": "2026-03-25",
                  "modified": "2026-03-25",
                  "is_active": true,
                  "created_at": "2026-03-25T10:00:00Z",
                  "updated_at": "2026-03-25T10:30:00Z",
                  "last_used": null,
                  "account": "/v1/Account/MA_XXXXXXXX/",
                  "resource_uri": "/v1/Account/MA_XXXXXXXX/Subaccount/SA_XXXXXXXX/"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-subaccount",
        "summary": "Delete a sub-account",
        "description": "Permanently delete a sub-account and revoke its credentials.",
        "tags": [
          "Sub-Accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "sub_auth_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ]
                }
              }
            }
          },
          "204": {
            "description": "Sub-account deleted"
          }
        }
      }
    },
    "/api/v1/sub-accounts/{sub_auth_id}/kyc/status": {
      "get": {
        "operationId": "get-subaccount-kyc-status",
        "summary": "Get sub-account KYC status",
        "description": "Returns the aggregated KYC state for a `customer_use` sub-account —\nwhich verifications have passed, whether calls are still blocked, and\nthe business type. The caller must be the parent main account that owns\nthe sub-account (or an admin).\n",
        "tags": [
          "Sub-Account KYC"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubAuthId"
          }
        ],
        "responses": {
          "200": {
            "description": "Aggregated KYC state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubAccountKycStatus"
                },
                "example": {
                  "sub_account_id": "SA_XXXXXX",
                  "kyc_mode": "customer_use",
                  "business_type": "private_limited",
                  "overall_status": "pending",
                  "kyc_calls_blocked": true,
                  "verifications": {
                    "pan": "verified",
                    "gst": "pending",
                    "aadhaar": "not_started",
                    "cin": "not_started"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Caller is not the parent of this sub-account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Sub-account not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sub-accounts/{sub_auth_id}/kyc/verify-pan": {
      "post": {
        "operationId": "verify-subaccount-pan",
        "summary": "Verify PAN",
        "description": "Runs a real PAN verification (Perfios) for the sub-account. `pan` must\nbe exactly 10 characters. Persists a `kyc_verifications` row and\nrecomputes the sub-account's aggregated `kyc_status`.\n",
        "tags": [
          "Sub-Account KYC"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubAuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "pan"
                ],
                "properties": {
                  "pan": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 10,
                    "example": "ABCDE1234F"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verification result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KycVerificationResult"
                },
                "example": {
                  "verification_type": "pan",
                  "status": "verified",
                  "pan": "ABCDE1234F",
                  "registered_name": "ACME PRIVATE LIMITED",
                  "name_match": true,
                  "kyc_calls_blocked": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid PAN format",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sub-accounts/{sub_auth_id}/kyc/verify-gst": {
      "post": {
        "operationId": "verify-subaccount-gst",
        "summary": "Verify GST",
        "description": "Runs a real GSTIN verification. `gstin` must be a 15-character GSTIN.",
        "tags": [
          "Sub-Account KYC"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubAuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "gstin"
                ],
                "properties": {
                  "gstin": {
                    "type": "string",
                    "minLength": 15,
                    "maxLength": 15,
                    "example": "29AAJCN5983D1Z0"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verification result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KycVerificationResult"
                },
                "example": {
                  "verification_type": "gst",
                  "status": "verified",
                  "gstin": "29AAJCN5983D1Z0",
                  "legal_name": "ACME PRIVATE LIMITED"
                }
              }
            }
          },
          "400": {
            "description": "Invalid GSTIN format",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sub-accounts/{sub_auth_id}/kyc/cin/search": {
      "post": {
        "operationId": "search-subaccount-cin",
        "summary": "CIN search",
        "description": "Name-based CIN lookup. Returns candidate company matches; pick one and\npass it to [CIN confirm](#operation/confirm-subaccount-cin).\n",
        "tags": [
          "Sub-Account KYC"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubAuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "company_name"
                ],
                "properties": {
                  "company_name": {
                    "type": "string",
                    "example": "ACME PRIVATE LIMITED"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Candidate matches",
            "content": {
              "application/json": {
                "example": {
                  "matches": [
                    {
                      "cin": "U72900KA2024PTC123456",
                      "company_name": "ACME PRIVATE LIMITED",
                      "status": "Active"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sub-accounts/{sub_auth_id}/kyc/cin/confirm": {
      "post": {
        "operationId": "confirm-subaccount-cin",
        "summary": "CIN confirm",
        "description": "Confirm the CIN selected from the search results.",
        "tags": [
          "Sub-Account KYC"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubAuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "company_name",
                  "selected_cin"
                ],
                "properties": {
                  "company_name": {
                    "type": "string",
                    "example": "ACME PRIVATE LIMITED"
                  },
                  "selected_cin": {
                    "type": "string",
                    "example": "U72900KA2024PTC123456"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verification result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KycVerificationResult"
                },
                "example": {
                  "verification_type": "cin",
                  "status": "verified",
                  "cin": "U72900KA2024PTC123456"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sub-accounts/{sub_auth_id}/kyc/digilocker/initiate": {
      "post": {
        "operationId": "subaccount-digilocker-initiate",
        "summary": "DigiLocker initiate",
        "description": "Returns the DigiLocker authorization link and an `access_request_id`.\nThe customer completes the OAuth flow on the DigiLocker portal, after\nwhich you finalize with\n[DigiLocker verify](#operation/subaccount-digilocker-verify).\n",
        "tags": [
          "Sub-Account KYC"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubAuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "redirect_url"
                ],
                "properties": {
                  "redirect_url": {
                    "type": "string",
                    "format": "uri",
                    "example": "https://partner.example.com/kyc/callback"
                  },
                  "oauth_state": {
                    "type": "string",
                    "description": "Opaque value echoed back on the redirect for CSRF protection.",
                    "example": "opaque-state-xyz"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "DigiLocker authorization link",
            "content": {
              "application/json": {
                "example": {
                  "auth_url": "https://api.digitallocker.gov.in/public/oauth2/1/authorize?...",
                  "access_request_id": "AR_xxxxxxxx"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sub-accounts/{sub_auth_id}/kyc/digilocker/verify": {
      "post": {
        "operationId": "subaccount-digilocker-verify",
        "summary": "DigiLocker verify",
        "description": "Finalize Aadhaar via DigiLocker after the customer completes OAuth.",
        "tags": [
          "Sub-Account KYC"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubAuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "access_request_id"
                ],
                "properties": {
                  "access_request_id": {
                    "type": "string",
                    "example": "AR_xxxxxxxx"
                  },
                  "linked_number": {
                    "type": "string",
                    "description": "Optional. Binds the Aadhaar to a specific number (92-series).",
                    "example": "+91XXXXXXXXXX"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verification result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KycVerificationResult"
                },
                "example": {
                  "verification_type": "aadhaar",
                  "status": "verified",
                  "source": "digilocker"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sub-accounts/{sub_auth_id}/kyc-sessions": {
      "post": {
        "operationId": "create-subaccount-kyc-session",
        "summary": "Create a hosted KYC session",
        "description": "Creates a Vobiz-hosted KYC session for the sub-account. With\n`flow_type=email` (default) Vobiz emails the customer a signed link\n(from `kyc@vobiz.ai`, hosted at `kyc.vobiz.ai`) and `customer_email` is\nrequired. With `flow_type=redirect`, omit `customer_email`, pass a\n`redirect_url`, and the `widget_url` is returned directly for an inline\nredirect.\n\nThis is the sub-account–scoped equivalent of the partner-level\n[KYC Sessions](/partner/api/kyc-sessions) endpoint.\n",
        "tags": [
          "Sub-Account KYC"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubAuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "account_auth_id",
                  "flow_type"
                ],
                "properties": {
                  "account_auth_id": {
                    "type": "string",
                    "description": "The sub-account's auth_id (typically equal to the path `sub_auth_id`).",
                    "example": "SA_XXXXXX"
                  },
                  "flow_type": {
                    "type": "string",
                    "enum": [
                      "email",
                      "redirect"
                    ],
                    "default": "email"
                  },
                  "customer_email": {
                    "type": "string",
                    "format": "email",
                    "description": "Required when `flow_type` is `email`.",
                    "example": "customer@example.com"
                  },
                  "redirect_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "Required when `flow_type` is `redirect`. After verification the customer's\nbrowser is sent to this URL.\n",
                    "example": "https://your-app.example.com/kyc/done"
                  },
                  "webhook_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "HTTPS endpoint VoBiz POSTs the KYC result to. Omit it and no callbacks are sent.",
                    "example": "https://your-app.example.com/kyc/webhook"
                  },
                  "expires_in_days": {
                    "type": "integer",
                    "default": 7,
                    "example": 30
                  }
                }
              },
              "examples": {
                "email-flow": {
                  "summary": "Email flow (Vobiz emails the link)",
                  "value": {
                    "account_auth_id": "SA_XXXXXX",
                    "flow_type": "email",
                    "customer_email": "customer@example.com",
                    "webhook_url": "https://your-app.example.com/kyc/webhook",
                    "expires_in_days": 30
                  }
                },
                "redirect-flow": {
                  "summary": "Redirect flow (you redirect to widget_url)",
                  "value": {
                    "account_auth_id": "SA_XXXXXX",
                    "flow_type": "redirect",
                    "redirect_url": "https://your-app.example.com/kyc/done",
                    "webhook_url": "https://your-app.example.com/kyc/webhook",
                    "expires_in_days": 30
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "KYC session created",
            "content": {
              "application/json": {
                "examples": {
                  "email-flow": {
                    "summary": "Email-flow response",
                    "value": {
                      "session_id": "a5f8da3c-b47f-40c3-a3e6-d2c9a0f27065",
                      "account_auth_id": "SA_XXXXXX",
                      "customer_email": "customer@example.com",
                      "status": "email_sent",
                      "expires_at": "2026-06-24T19:37:01.316686Z",
                      "widget_url": null,
                      "message": "KYC email dispatched successfully"
                    }
                  },
                  "redirect-flow": {
                    "summary": "Redirect-flow response",
                    "value": {
                      "session_id": "1a0f7da5-2abb-47bf-a6c3-eb5cff7feda5",
                      "account_auth_id": "SA_XXXXXX",
                      "customer_email": null,
                      "status": "link_ready",
                      "expires_at": "2026-06-24T19:37:01.841263Z",
                      "widget_url": "https://kyc.vobiz.ai/verify?token=kst_cb1b3fda...",
                      "message": "Redirect your customer to widget_url to begin."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error (email flow missing `customer_email`, or redirect flow missing `redirect_url`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sub-accounts/test/{sub_auth_id}/kyc/verify-pan": {
      "post": {
        "operationId": "mock-verify-subaccount-pan",
        "summary": "Mock verify PAN",
        "description": "Mock PAN verification — never hits the provider. Magic `pan` inputs:\n\n| Input | Outcome |\n|---|---|\n| `TESTSUCCESS0001` | verified |\n| `TESTFAIL0001` | failed |\n| `TESTERROR0001` | HTTP 500 |\n| `TESTPENDING001` | pending (finalize as verified) |\n| `TESTPENDING_FAIL` | pending (finalize as failed) |\n\nPersists a real `kyc_verifications` row and recomputes `kyc_status`.\n",
        "tags": [
          "Sub-Account KYC (Test Mode)"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubAuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "pan"
                ],
                "properties": {
                  "pan": {
                    "type": "string",
                    "example": "TESTSUCCESS0001"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Mock verification result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KycVerificationResult"
                },
                "example": {
                  "verification_type": "pan",
                  "status": "verified",
                  "mock": true
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sub-accounts/test/{sub_auth_id}/kyc/verify-gst": {
      "post": {
        "operationId": "mock-verify-subaccount-gst",
        "summary": "Mock verify GST",
        "description": "Mock GST verification. Same magic-input matrix as [Mock verify PAN](#operation/mock-verify-subaccount-pan).",
        "tags": [
          "Sub-Account KYC (Test Mode)"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubAuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "gstin"
                ],
                "properties": {
                  "gstin": {
                    "type": "string",
                    "example": "TESTSUCCESS0001GST"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Mock verification result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KycVerificationResult"
                },
                "example": {
                  "verification_type": "gst",
                  "status": "verified",
                  "mock": true
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sub-accounts/test/{sub_auth_id}/kyc/cin/search": {
      "post": {
        "operationId": "mock-search-subaccount-cin",
        "summary": "Mock CIN search",
        "description": "Returns deterministic fake company matches.",
        "tags": [
          "Sub-Account KYC (Test Mode)"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubAuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "company_name"
                ],
                "properties": {
                  "company_name": {
                    "type": "string",
                    "example": "ACME"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic fake matches",
            "content": {
              "application/json": {
                "example": {
                  "matches": [
                    {
                      "cin": "U72900KA2024PTC123456",
                      "company_name": "ACME PRIVATE LIMITED",
                      "status": "Active"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sub-accounts/test/{sub_auth_id}/kyc/cin/confirm": {
      "post": {
        "operationId": "mock-confirm-subaccount-cin",
        "summary": "Mock CIN confirm",
        "description": "Succeeds when `selected_cin` starts with `U72900KA2024PTC123456`.",
        "tags": [
          "Sub-Account KYC (Test Mode)"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubAuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "company_name",
                  "selected_cin"
                ],
                "properties": {
                  "company_name": {
                    "type": "string",
                    "example": "ACME"
                  },
                  "selected_cin": {
                    "type": "string",
                    "example": "U72900KA2024PTC123456"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Mock verification result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KycVerificationResult"
                },
                "example": {
                  "verification_type": "cin",
                  "status": "verified",
                  "mock": true
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sub-accounts/test/{sub_auth_id}/kyc/digilocker/initiate": {
      "post": {
        "operationId": "mock-subaccount-digilocker-initiate",
        "summary": "Mock DigiLocker initiate",
        "description": "Returns a deterministic `access_request_id`.",
        "tags": [
          "Sub-Account KYC (Test Mode)"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubAuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "redirect_url"
                ],
                "properties": {
                  "redirect_url": {
                    "type": "string",
                    "format": "uri",
                    "example": "https://partner.example.com/kyc/callback"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Mock DigiLocker link",
            "content": {
              "application/json": {
                "example": {
                  "auth_url": "https://kyc.vobiz.ai/mock/digilocker",
                  "access_request_id": "MOCK_AR_SUCCESS"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sub-accounts/test/{sub_auth_id}/kyc/digilocker/verify": {
      "post": {
        "operationId": "mock-subaccount-digilocker-verify",
        "summary": "Mock DigiLocker verify",
        "description": "`access_request_id` `MOCK_AR_SUCCESS` → verified; `MOCK_AR_FAIL` → failed.\n",
        "tags": [
          "Sub-Account KYC (Test Mode)"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubAuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "access_request_id"
                ],
                "properties": {
                  "access_request_id": {
                    "type": "string",
                    "enum": [
                      "MOCK_AR_SUCCESS",
                      "MOCK_AR_FAIL"
                    ],
                    "example": "MOCK_AR_SUCCESS"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Mock verification result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KycVerificationResult"
                },
                "example": {
                  "verification_type": "aadhaar",
                  "status": "verified",
                  "source": "digilocker",
                  "mock": true
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sub-accounts/test/{sub_auth_id}/kyc/finalize-pending": {
      "post": {
        "operationId": "mock-finalize-pending-kyc",
        "summary": "Mock finalize pending",
        "description": "Promotes the most recent **pending** mock verification of the given\ntype to a terminal outcome — this drives the async (`TESTPENDING…`)\npath without webhooks. `verification_type` ∈ `pan | aadhaar | gst | cin`;\n`outcome` ∈ `verified | failed`.\n",
        "tags": [
          "Sub-Account KYC (Test Mode)"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubAuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "verification_type",
                  "outcome"
                ],
                "properties": {
                  "verification_type": {
                    "type": "string",
                    "enum": [
                      "pan",
                      "aadhaar",
                      "gst",
                      "cin"
                    ],
                    "example": "pan"
                  },
                  "outcome": {
                    "type": "string",
                    "enum": [
                      "verified",
                      "failed"
                    ],
                    "example": "verified"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pending verification finalized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KycVerificationResult"
                },
                "example": {
                  "verification_type": "pan",
                  "status": "verified",
                  "mock": true
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/numbers": {
      "get": {
        "operationId": "list-numbers",
        "summary": "List phone numbers",
        "description": "List all phone numbers on your account.",
        "tags": [
          "Phone Numbers"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of phone numbers",
            "content": {
              "application/json": {
                "example": {
                  "items": [
                    {
                      "id": "aabbccdd-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "e164": "+919876543210",
                      "country": "IN",
                      "region": "Karnataka",
                      "capabilities": {
                        "voice": true,
                        "sms": false,
                        "mms": false,
                        "fax": false
                      },
                      "status": "active",
                      "provider": "",
                      "setup_fee": 100,
                      "monthly_fee": 300,
                      "currency": "INR",
                      "application_id": "20577609616603585",
                      "voice_enabled": true,
                      "tags": [],
                      "purchased_at": "2026-03-25T06:58:38.796024Z",
                      "is_blocked": false,
                      "created_at": "2026-03-25T18:30:00Z",
                      "updated_at": "2026-03-25T06:58:54.752187Z",
                      "is_trial_number": false,
                      "last_billing_date": "2026-03-25T06:58:38.796024Z",
                      "next_billing_date": "2026-04-25T06:58:38.796024Z",
                      "minimum_commitment_months": 0,
                      "aadhaar_verification_required": false,
                      "aadhaar_verified": false,
                      "source": "purchased"
                    },
                    {
                      "id": "11223344-5566-7788-99aa-bbccddeeff00",
                      "account_id": "MA_XXXXXXXX",
                      "e164": "+912271263984",
                      "country": "IN",
                      "region": "Mumbai",
                      "capabilities": {
                        "voice": true,
                        "sms": false,
                        "mms": false,
                        "fax": false
                      },
                      "status": "active",
                      "provider": "",
                      "setup_fee": 100,
                      "monthly_fee": 200,
                      "currency": "INR",
                      "application_id": "31985999331899218",
                      "voice_enabled": true,
                      "tags": [],
                      "purchased_at": "2026-03-25T10:25:30.672202Z",
                      "is_blocked": false,
                      "created_at": "2026-03-25T09:30:04.541115Z",
                      "updated_at": "2026-03-25T10:29:35.330503Z",
                      "is_trial_number": false,
                      "last_billing_date": "2026-03-25T10:25:30.672202Z",
                      "next_billing_date": "2026-04-25T10:25:30.672202Z",
                      "minimum_commitment_months": 0,
                      "aadhaar_verification_required": false,
                      "aadhaar_verified": false,
                      "source": "purchased"
                    }
                  ],
                  "page": 1,
                  "per_page": 25,
                  "total": 24
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "account_id": {
                            "type": "string"
                          },
                          "e164": {
                            "type": "string"
                          },
                          "country": {
                            "type": "string"
                          },
                          "region": {
                            "type": "string"
                          },
                          "capabilities": {
                            "type": "object",
                            "properties": {
                              "voice": {
                                "type": "boolean"
                              },
                              "sms": {
                                "type": "boolean"
                              },
                              "mms": {
                                "type": "boolean"
                              },
                              "fax": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "voice",
                              "sms",
                              "mms",
                              "fax"
                            ]
                          },
                          "status": {
                            "type": "string"
                          },
                          "provider": {
                            "type": "string"
                          },
                          "setup_fee": {
                            "type": "integer"
                          },
                          "monthly_fee": {
                            "type": "integer"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "application_id": {
                            "type": "string"
                          },
                          "voice_enabled": {
                            "type": "boolean"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "purchased_at": {
                            "type": "string"
                          },
                          "is_blocked": {
                            "type": "boolean"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          },
                          "is_trial_number": {
                            "type": "boolean"
                          },
                          "last_billing_date": {
                            "type": "string"
                          },
                          "next_billing_date": {
                            "type": "string"
                          },
                          "minimum_commitment_months": {
                            "type": "integer"
                          },
                          "aadhaar_verification_required": {
                            "type": "boolean"
                          },
                          "aadhaar_verified": {
                            "type": "boolean"
                          },
                          "source": {
                            "type": "string"
                          },
                          "released_at": {
                            "type": "string"
                          },
                          "trunk_group_id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "account_id",
                          "e164",
                          "country",
                          "region",
                          "capabilities",
                          "status",
                          "provider",
                          "setup_fee",
                          "monthly_fee",
                          "currency",
                          "voice_enabled",
                          "tags",
                          "purchased_at",
                          "is_blocked",
                          "created_at",
                          "updated_at",
                          "is_trial_number",
                          "minimum_commitment_months",
                          "aadhaar_verification_required",
                          "aadhaar_verified",
                          "source"
                        ]
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "per_page": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items",
                    "page",
                    "per_page",
                    "total"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/numbers/{e164}": {
      "delete": {
        "operationId": "unrent-number",
        "summary": "Unrent a number",
        "description": "Release a phone number from your account.",
        "tags": [
          "Phone Numbers"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "e164",
            "in": "path",
            "required": true,
            "description": "Phone number in E.164 format (without the +)",
            "schema": {
              "type": "string",
              "example": "919876543210"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Number released"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/trunks": {
      "get": {
        "operationId": "list-trunks",
        "summary": "List trunks",
        "description": "Retrieve all SIP trunks configured on the account.",
        "tags": [
          "Trunks"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "responses": {
          "200": {
            "description": "List of trunks",
            "content": {
              "application/json": {
                "example": {
                  "meta": {
                    "limit": 20,
                    "offset": 0,
                    "total": 2
                  },
                  "objects": [
                    {
                      "trunk_id": "aabbccdd-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "name": "My Outbound Trunk",
                      "trunk_domain": "aabbccdd-1234-5678-90ab-cdef12345678.sip.vobiz.ai",
                      "trunk_status": "active",
                      "secure": false,
                      "trunk_direction": "outbound",
                      "concurrent_calls_limit": 10,
                      "cps_limit": 2,
                      "credential_uuid": "11223344-5566-7788-99aa-bbccddeeff00",
                      "description": "",
                      "transport": "udp",
                      "recording": true,
                      "enable_transcription": true,
                      "pii_redaction": false,
                      "webhook_method": "POST",
                      "recording_webhook_enabled": false,
                      "created_at": "2026-03-25T08:52:02.383938Z",
                      "updated_at": "2026-03-25T08:52:02.383938Z"
                    },
                    {
                      "trunk_id": "99887766-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "name": "Acme Production Trunk",
                      "trunk_domain": "99887766-1234-5678-90ab-cdef12345678.sip.vobiz.ai",
                      "trunk_status": "active",
                      "secure": false,
                      "trunk_direction": "inbound",
                      "concurrent_calls_limit": 10,
                      "cps_limit": 2,
                      "primary_uri_uuid": "55667788-1234-5678-90ab-cdef12345678",
                      "description": "",
                      "inbound_destination": "55667788-1234-5678-90ab-cdef12345678",
                      "transport": "udp",
                      "recording": true,
                      "enable_transcription": true,
                      "pii_redaction": false,
                      "pii_entity_types": "",
                      "webhook_url": "https://webhook.site/example",
                      "webhook_method": "POST",
                      "recording_webhook_enabled": false,
                      "created_at": "2026-03-25T10:28:06.112095Z",
                      "updated_at": "2026-03-25T10:28:06.112095Z"
                    }
                  ]
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "limit",
                        "offset",
                        "total"
                      ]
                    },
                    "objects": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "trunk_id": {
                            "type": "string"
                          },
                          "account_id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "trunk_domain": {
                            "type": "string"
                          },
                          "trunk_status": {
                            "type": "string"
                          },
                          "secure": {
                            "type": "boolean"
                          },
                          "trunk_direction": {
                            "type": "string"
                          },
                          "concurrent_calls_limit": {
                            "type": "integer"
                          },
                          "cps_limit": {
                            "type": "integer"
                          },
                          "credential_uuid": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "transport": {
                            "type": "string"
                          },
                          "recording": {
                            "type": "boolean"
                          },
                          "enable_transcription": {
                            "type": "boolean"
                          },
                          "pii_redaction": {
                            "type": "boolean"
                          },
                          "webhook_method": {
                            "type": "string"
                          },
                          "recording_webhook_enabled": {
                            "type": "boolean"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          },
                          "primary_uri_uuid": {
                            "type": "string"
                          },
                          "inbound_destination": {
                            "type": "string"
                          },
                          "pii_entity_types": {
                            "type": "string"
                          },
                          "webhook_url": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "trunk_id",
                          "account_id",
                          "name",
                          "trunk_domain",
                          "trunk_status",
                          "secure",
                          "trunk_direction",
                          "concurrent_calls_limit",
                          "cps_limit",
                          "description",
                          "transport",
                          "recording",
                          "enable_transcription",
                          "pii_redaction",
                          "webhook_method",
                          "recording_webhook_enabled",
                          "created_at",
                          "updated_at"
                        ]
                      }
                    }
                  },
                  "required": [
                    "meta",
                    "objects"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-trunk",
        "summary": "Create a trunk",
        "description": "Create a new SIP trunk for inbound or outbound calling.",
        "tags": [
          "Trunks"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Trunk name."
                  },
                  "trunk_direction": {
                    "type": "string",
                    "enum": [
                      "inbound",
                      "outbound"
                    ],
                    "description": "Direction of the trunk — **`inbound` or `outbound` only** (a trunk is one direction, not both)."
                  },
                  "trunk_status": {
                    "type": "string",
                    "enum": [
                      "enabled",
                      "disabled"
                    ],
                    "description": "Trunk status — `enabled` or `disabled` (note: not `active`)."
                  },
                  "secure": {
                    "type": "boolean"
                  },
                  "trunk_domain": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "SIP domain. Auto-generated as `{first8ofUUID}.sip.vobiz.ai` if omitted."
                  },
                  "transport": {
                    "type": "string",
                    "enum": [
                      "udp",
                      "tcp",
                      "tls"
                    ]
                  },
                  "inbound_destination": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "concurrent_calls_limit": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000,
                    "description": "Stored on the trunk. The **enforced** concurrency limit is account-level (account base + channel subscriptions), not this field."
                  },
                  "cps_limit": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "Stored on the trunk. The **enforced** CPS is account-level, not this field."
                  },
                  "credential_uuid": {
                    "type": "string",
                    "description": "Attach an existing SIP credential (username / password / realm) by UUID."
                  },
                  "ipacl_uuid": {
                    "type": "string",
                    "description": "Attach an existing IP access-control list (IP-based auth) by UUID."
                  },
                  "primary_uri_uuid": {
                    "type": "string",
                    "description": "Primary origination URI UUID."
                  },
                  "fallback_uri_uuid": {
                    "type": "string",
                    "description": "Fallback origination URI UUID."
                  },
                  "recording": {
                    "type": "boolean",
                    "default": false,
                    "description": "Enable call recording."
                  },
                  "enable_transcription": {
                    "type": "boolean",
                    "default": false,
                    "description": "Auto-transcribe recordings when `recording=true`."
                  },
                  "pii_redaction": {
                    "type": "boolean",
                    "default": false,
                    "description": "Redact PII from transcriptions."
                  },
                  "pii_entity_types": {
                    "type": "string",
                    "description": "Comma-separated list of entity types to redact."
                  },
                  "webhook_url": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Customer webhook for call-admission events (`CallInitiated` / `Hangup`).\nMust be a valid **public** http/https URL. SSRF-validated — localhost,\nprivate (RFC1918), and cloud-metadata (`169.254.169.254`) URLs are\nrejected with `invalid webhook_url`. See [Trunk Webhooks](/trunks/webhook).\n",
                    "example": "https://example.com/vobiz/webhook"
                  },
                  "webhook_method": {
                    "type": "string",
                    "enum": [
                      "POST",
                      "GET"
                    ],
                    "default": "POST",
                    "description": "HTTP method for the webhook callback."
                  },
                  "recording_webhook_enabled": {
                    "type": "boolean",
                    "default": false,
                    "description": "Fire a `recording.completed` webhook to `webhook_url` after a recording is saved."
                  },
                  "username": {
                    "type": "string",
                    "maxLength": 100,
                    "deprecated": true,
                    "description": "Deprecated — use `credential_uuid`."
                  },
                  "password": {
                    "type": "string",
                    "maxLength": 100,
                    "deprecated": true,
                    "description": "Deprecated — use `credential_uuid`."
                  },
                  "ip_whitelist": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "deprecated": true,
                    "description": "Deprecated — use `ipacl_uuid`."
                  }
                },
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "Retell AI SIP",
                "trunk_direction": "outbound",
                "transport": "udp",
                "webhook_url": "https://example.com/vobiz/webhook",
                "webhook_method": "POST",
                "recording": true,
                "enable_transcription": true,
                "concurrent_calls_limit": 50,
                "cps_limit": 15,
                "credential_uuid": "b1e2...",
                "ipacl_uuid": "c3d4..."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "trunk_id": {
                      "type": "string"
                    },
                    "account_id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "trunk_domain": {
                      "type": "string"
                    },
                    "trunk_status": {
                      "type": "string"
                    },
                    "secure": {
                      "type": "boolean"
                    },
                    "trunk_direction": {
                      "type": "string"
                    },
                    "concurrent_calls_limit": {
                      "type": "integer"
                    },
                    "cps_limit": {
                      "type": "integer"
                    },
                    "description": {
                      "type": "string"
                    },
                    "transport": {
                      "type": "string"
                    },
                    "recording": {
                      "type": "boolean"
                    },
                    "enable_transcription": {
                      "type": "boolean"
                    },
                    "pii_redaction": {
                      "type": "boolean"
                    },
                    "webhook_method": {
                      "type": "string"
                    },
                    "recording_webhook_enabled": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "trunk_id",
                    "account_id",
                    "name",
                    "trunk_domain",
                    "trunk_status",
                    "secure",
                    "trunk_direction",
                    "concurrent_calls_limit",
                    "cps_limit",
                    "description",
                    "transport",
                    "recording",
                    "enable_transcription",
                    "pii_redaction",
                    "webhook_method",
                    "recording_webhook_enabled",
                    "created_at",
                    "updated_at"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "Trunk created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Trunk"
                },
                "example": {
                  "trunk_id": "aabbccdd-1234-5678-90ab-cdef12345678",
                  "account_id": "MA_XXXXXXXX",
                  "name": "My Outbound Trunk",
                  "trunk_domain": "aabbccdd-1234-5678-90ab-cdef12345678.sip.vobiz.ai",
                  "trunk_status": "active",
                  "secure": false,
                  "trunk_direction": "outbound",
                  "concurrent_calls_limit": 10,
                  "cps_limit": 2,
                  "description": "",
                  "transport": "udp",
                  "recording": false,
                  "enable_transcription": false,
                  "pii_redaction": false,
                  "webhook_method": "POST",
                  "recording_webhook_enabled": false,
                  "created_at": "2026-03-25T05:11:52.054462Z",
                  "updated_at": "2026-03-25T05:11:52.054462Z"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/trunks/{trunk_id}": {
      "get": {
        "operationId": "retrieve-trunk",
        "summary": "Retrieve a trunk",
        "description": "Get details of a specific SIP trunk.",
        "tags": [
          "Trunks"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "trunk_XXXXXX"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Trunk details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "trunk_id": {
                      "type": "string"
                    },
                    "account_id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "trunk_domain": {
                      "type": "string"
                    },
                    "trunk_status": {
                      "type": "string"
                    },
                    "secure": {
                      "type": "boolean"
                    },
                    "trunk_direction": {
                      "type": "string"
                    },
                    "concurrent_calls_limit": {
                      "type": "integer"
                    },
                    "cps_limit": {
                      "type": "integer"
                    },
                    "description": {
                      "type": "string"
                    },
                    "transport": {
                      "type": "string"
                    },
                    "recording": {
                      "type": "boolean"
                    },
                    "enable_transcription": {
                      "type": "boolean"
                    },
                    "pii_redaction": {
                      "type": "boolean"
                    },
                    "webhook_method": {
                      "type": "string"
                    },
                    "recording_webhook_enabled": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "trunk_id",
                    "account_id",
                    "name",
                    "trunk_domain",
                    "trunk_status",
                    "secure",
                    "trunk_direction",
                    "concurrent_calls_limit",
                    "cps_limit",
                    "description",
                    "transport",
                    "recording",
                    "enable_transcription",
                    "pii_redaction",
                    "webhook_method",
                    "recording_webhook_enabled",
                    "created_at",
                    "updated_at"
                  ]
                },
                "example": {
                  "trunk_id": "11223344-1234-5678-90ab-cdef12345678",
                  "account_id": "MA_XXXXXXXX",
                  "name": "Acme Production Trunk",
                  "trunk_domain": "11223344-1234-5678-90ab-cdef12345678.sip.vobiz.ai",
                  "trunk_status": "active",
                  "secure": false,
                  "trunk_direction": "both",
                  "concurrent_calls_limit": 10,
                  "cps_limit": 2,
                  "description": "",
                  "transport": "udp",
                  "recording": false,
                  "enable_transcription": false,
                  "pii_redaction": false,
                  "webhook_method": "POST",
                  "recording_webhook_enabled": false,
                  "created_at": "2026-03-25T10:00:00Z",
                  "updated_at": "2026-03-25T10:00:00Z"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-trunk",
        "summary": "Update a trunk",
        "description": "Update a SIP trunk's name, configuration, or status.",
        "tags": [
          "Trunks"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "All fields are optional — send only what you want to change. Does not accept `username`/`password` (rotate credentials via the credentials subresource endpoint).",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "trunk_direction": {
                    "type": "string",
                    "enum": [
                      "inbound",
                      "outbound"
                    ],
                    "description": "Direction of the trunk — `inbound` or `outbound` only."
                  },
                  "trunk_status": {
                    "type": "string",
                    "enum": [
                      "enabled",
                      "disabled"
                    ]
                  },
                  "secure": {
                    "type": "boolean"
                  },
                  "trunk_domain": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "transport": {
                    "type": "string",
                    "enum": [
                      "udp",
                      "tcp",
                      "tls"
                    ]
                  },
                  "inbound_destination": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "concurrent_calls_limit": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000
                  },
                  "cps_limit": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "credential_uuid": {
                    "type": "string"
                  },
                  "ipacl_uuid": {
                    "type": "string"
                  },
                  "primary_uri_uuid": {
                    "type": "string"
                  },
                  "fallback_uri_uuid": {
                    "type": "string"
                  },
                  "recording": {
                    "type": "boolean"
                  },
                  "enable_transcription": {
                    "type": "boolean"
                  },
                  "pii_redaction": {
                    "type": "boolean"
                  },
                  "pii_entity_types": {
                    "type": "string"
                  },
                  "webhook_url": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Customer webhook for call-admission events (`CallInitiated` / `Hangup`). Public http/https URL; SSRF-validated. See [Trunk Webhooks](/trunks/webhook)."
                  },
                  "webhook_method": {
                    "type": "string",
                    "enum": [
                      "POST",
                      "GET"
                    ],
                    "default": "POST"
                  },
                  "recording_webhook_enabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Trunk updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "trunk_id": {
                      "type": "string"
                    },
                    "account_id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "trunk_domain": {
                      "type": "string"
                    },
                    "trunk_status": {
                      "type": "string"
                    },
                    "secure": {
                      "type": "boolean"
                    },
                    "trunk_direction": {
                      "type": "string"
                    },
                    "concurrent_calls_limit": {
                      "type": "integer"
                    },
                    "cps_limit": {
                      "type": "integer"
                    },
                    "description": {
                      "type": "string"
                    },
                    "transport": {
                      "type": "string"
                    },
                    "recording": {
                      "type": "boolean"
                    },
                    "enable_transcription": {
                      "type": "boolean"
                    },
                    "pii_redaction": {
                      "type": "boolean"
                    },
                    "webhook_method": {
                      "type": "string"
                    },
                    "recording_webhook_enabled": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "trunk_id",
                    "account_id",
                    "name",
                    "trunk_domain",
                    "trunk_status",
                    "secure",
                    "trunk_direction",
                    "concurrent_calls_limit",
                    "cps_limit",
                    "description",
                    "transport",
                    "recording",
                    "enable_transcription",
                    "pii_redaction",
                    "webhook_method",
                    "recording_webhook_enabled",
                    "created_at",
                    "updated_at"
                  ]
                },
                "example": {
                  "trunk_id": "99887766-1234-5678-90ab-cdef12345678",
                  "account_id": "MA_XXXXXXXX",
                  "name": "Acme Production Trunk Updated",
                  "trunk_domain": "99887766-1234-5678-90ab-cdef12345678.sip.vobiz.ai",
                  "trunk_status": "active",
                  "secure": false,
                  "trunk_direction": "both",
                  "concurrent_calls_limit": 10,
                  "cps_limit": 2,
                  "description": "",
                  "transport": "udp",
                  "recording": false,
                  "enable_transcription": false,
                  "pii_redaction": false,
                  "webhook_method": "POST",
                  "recording_webhook_enabled": false,
                  "created_at": "2026-03-25T10:00:00Z",
                  "updated_at": "2026-03-25T10:05:00Z"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-trunk",
        "summary": "Delete a trunk",
        "description": "Permanently delete a SIP trunk.",
        "tags": [
          "Trunks"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "204": {
            "description": "Trunk deleted"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Conference/{conference_name}/Member/{member_id}/Kick/": {
      "post": {
        "operationId": "kick-member",
        "summary": "Kick a conference member",
        "description": "Remove a specific participant from a conference call.",
        "tags": [
          "Conference"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "conference_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Member kicked",
            "content": {
              "application/json": {
                "example": {
                  "message": "Member kicked from conference"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Conference/{conference_name}/Member/{member_id}/": {
      "delete": {
        "operationId": "hangup-member",
        "summary": "Hang up a member",
        "description": "Disconnect a specific member from a conference.",
        "tags": [
          "Conference"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "conference_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Member hung up"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Conference/{conference_name}/Member/{member_id}/Play/": {
      "post": {
        "operationId": "play-audio-member",
        "summary": "Play audio to a member",
        "description": "Play an audio file to a specific conference member.",
        "tags": [
          "Conference"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "conference_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "URL of the audio file to play",
                    "example": "https://example.com/audio.mp3"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Audio playback started"
          }
        }
      },
      "delete": {
        "operationId": "stop-audio-member",
        "summary": "Stop audio for a member",
        "description": "Stop audio playback for a specific conference member.",
        "tags": [
          "Conference"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "conference_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Playback stopped"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Conference/{conference_name}/Member/{member_id}/Deaf/": {
      "post": {
        "operationId": "deaf-member",
        "summary": "Mute a member's audio",
        "description": "Prevent a conference member from hearing other participants.",
        "tags": [
          "Conference"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "conference_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Member deafened"
          }
        }
      },
      "delete": {
        "operationId": "undeaf-member",
        "summary": "Unmute a member's audio",
        "description": "Restore a conference member's ability to hear other participants.",
        "tags": [
          "Conference"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "conference_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Member undeafened"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Call/{call_uuid}/Record/": {
      "post": {
        "operationId": "start-recording",
        "summary": "Start recording a call",
        "description": "Begin recording an active call. Set format, enable transcription, and configure a callback URL.",
        "tags": [
          "Record Calls"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "call_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "cdr_XXXXXXXXXX"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "time_limit": {
                    "type": "integer",
                    "default": 60
                  },
                  "file_format": {
                    "type": "string",
                    "enum": [
                      "mp3",
                      "wav"
                    ],
                    "default": "mp3"
                  },
                  "transcription_type": {
                    "type": "string",
                    "description": "Set to `auto` to enable transcription"
                  },
                  "callback_url": {
                    "type": "string"
                  },
                  "record_channel_type": {
                    "type": "string",
                    "enum": [
                      "mono",
                      "stereo"
                    ],
                    "default": "mono"
                  }
                }
              },
              "example": {
                "time_limit": 120,
                "file_format": "mp3"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recording started",
            "content": {
              "application/json": {
                "example": {
                  "recording_id": "rec_XXXXXXXXXX",
                  "message": "Recording started"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "stop-recording",
        "summary": "Stop recording a call",
        "description": "Stop an active recording on an in-progress call.",
        "tags": [
          "Record Calls"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "call_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Recording stopped"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Call/{call_uuid}/Play/": {
      "post": {
        "operationId": "play-audio-call",
        "summary": "Play audio to a call",
        "description": "Play an audio file to a live call leg.",
        "tags": [
          "Play Audio"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "call_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "urls"
                ],
                "properties": {
                  "urls": {
                    "type": "string",
                    "example": "https://example.com/audio.mp3"
                  },
                  "legs": {
                    "type": "string",
                    "enum": [
                      "aleg",
                      "bleg",
                      "both"
                    ],
                    "default": "aleg"
                  },
                  "loop": {
                    "type": "boolean",
                    "default": false
                  }
                }
              },
              "example": {
                "urls": "https://example.com/audio.mp3",
                "legs": "aleg"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Audio playback started"
          }
        }
      },
      "delete": {
        "operationId": "stop-audio-call",
        "summary": "Stop audio playback on a call",
        "description": "Stop audio playing on a live call.",
        "tags": [
          "Play Audio"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "call_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Playback stopped"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Call/{call_uuid}/Speak/": {
      "post": {
        "operationId": "speak-text-call",
        "summary": "Speak text on a call",
        "description": "Convert text to speech and play it on a live call.",
        "tags": [
          "Speak Text"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "call_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "example": "Hello, your appointment is confirmed."
                  },
                  "voice": {
                    "type": "string",
                    "default": "WOMAN"
                  },
                  "language": {
                    "type": "string",
                    "default": "en-US"
                  },
                  "legs": {
                    "type": "string",
                    "enum": [
                      "aleg",
                      "bleg",
                      "both"
                    ],
                    "default": "aleg"
                  }
                }
              },
              "example": {
                "text": "Hello, your appointment is confirmed for tomorrow at 3 PM.",
                "voice": "WOMAN",
                "language": "en-US"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "TTS started"
          }
        }
      },
      "delete": {
        "operationId": "stop-speak-call",
        "summary": "Stop text-to-speech on a call",
        "description": "Stop ongoing TTS playback on a live call.",
        "tags": [
          "Speak Text"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "call_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "TTS stopped"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Call/{call_uuid}/DTMF/": {
      "post": {
        "operationId": "send-dtmf",
        "summary": "Send DTMF tones",
        "description": "Send DTMF (keypad) tones on an active call. Use `w` for 0.5s pause, `W` for 1s pause.",
        "tags": [
          "DTMF"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "call_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "digits"
                ],
                "properties": {
                  "digits": {
                    "type": "string",
                    "example": "1w2W3"
                  },
                  "leg": {
                    "type": "string",
                    "enum": [
                      "aleg",
                      "bleg",
                      "both"
                    ],
                    "default": "aleg"
                  }
                }
              },
              "example": {
                "digits": "1234",
                "leg": "aleg"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "DTMF sent"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Call/{call_uuid}/Stream/": {
      "post": {
        "operationId": "start-stream",
        "summary": "Start audio stream",
        "description": "Start streaming raw audio from a live call to a WebSocket URL.",
        "tags": [
          "Audio Streams"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "call_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "service_url"
                ],
                "properties": {
                  "service_url": {
                    "type": "string",
                    "example": "wss://your-server.com/ws"
                  },
                  "bidirectional": {
                    "type": "boolean",
                    "default": false
                  },
                  "audio_track": {
                    "type": "string",
                    "enum": [
                      "inbound",
                      "outbound",
                      "both"
                    ],
                    "default": "both"
                  },
                  "audio_format": {
                    "type": "string",
                    "enum": [
                      "pcm",
                      "mulaw"
                    ],
                    "default": "mulaw"
                  }
                }
              },
              "example": {
                "service_url": "wss://your-server.com/ws",
                "bidirectional": true,
                "audio_track": "both"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stream started",
            "content": {
              "application/json": {
                "example": {
                  "stream_id": "str_XXXXXXXXXX",
                  "message": "Stream started"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-streams",
        "summary": "List audio streams",
        "description": "List all audio streams on a live call.",
        "tags": [
          "Audio Streams"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "call_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Active streams"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Call/{call_uuid}/Stream/{stream_id}/": {
      "get": {
        "operationId": "get-stream",
        "summary": "Retrieve a stream",
        "description": "Get details of a specific audio stream.",
        "tags": [
          "Audio Streams"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "call_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stream details"
          }
        }
      },
      "delete": {
        "operationId": "stop-stream",
        "summary": "Stop a stream",
        "description": "Stop a specific audio stream on a live call.",
        "tags": [
          "Audio Streams"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "call_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Stream stopped"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Conference/": {
      "get": {
        "operationId": "list-conferences",
        "summary": "List conferences",
        "description": "Retrieve all active conference rooms on the account.",
        "tags": [
          "Conferences"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "responses": {
          "200": {
            "description": "List of conferences",
            "content": {
              "application/json": {
                "example": {
                  "objects": [
                    {
                      "conference_name": "My Conf Room",
                      "member_count": 3
                    }
                  ]
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "api_id": {
                      "type": "string"
                    },
                    "conferences": {
                      "type": "array"
                    }
                  },
                  "required": [
                    "api_id",
                    "conferences"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-all-conferences",
        "summary": "Delete all conferences",
        "description": "Terminate all active conference rooms.",
        "tags": [
          "Conferences"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "responses": {
          "204": {
            "description": "All conferences terminated"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Conference/{conference_name}/": {
      "get": {
        "operationId": "get-conference",
        "summary": "Retrieve a conference",
        "description": "Get details and member list of a specific conference room.",
        "tags": [
          "Conferences"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "conference_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "My Conf Room"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Conference details",
            "content": {
              "application/json": {
                "example": {
                  "conference_name": "My Conf Room",
                  "member_count": 3,
                  "members": [
                    {
                      "member_id": "1",
                      "muted": false,
                      "deaf": false
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-conference",
        "summary": "Delete a conference",
        "description": "Terminate a specific conference room and disconnect all members.",
        "tags": [
          "Conferences"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "conference_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Conference deleted"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Conference/{conference_name}/Member/{member_id}/Mute/": {
      "post": {
        "operationId": "mute-member",
        "summary": "Mute a conference member",
        "description": "Prevent a member from speaking. Use `all` as member_id to mute everyone.",
        "tags": [
          "Conference Members"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "conference_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "description": "Member ID, comma-separated IDs, or `all`",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Member muted"
          }
        }
      },
      "delete": {
        "operationId": "unmute-member",
        "summary": "Unmute a conference member",
        "description": "Allow a muted member to speak again.",
        "tags": [
          "Conference Members"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "conference_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Member unmuted"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Conference/{conference_name}/Record/": {
      "post": {
        "operationId": "start-conference-recording",
        "summary": "Start conference recording",
        "description": "Begin recording all audio in a conference room.",
        "tags": [
          "Conference Recording"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "conference_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_format": {
                    "type": "string",
                    "enum": [
                      "mp3",
                      "wav"
                    ],
                    "default": "mp3"
                  },
                  "callback_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recording started"
          }
        }
      },
      "delete": {
        "operationId": "stop-conference-recording",
        "summary": "Stop conference recording",
        "description": "Stop recording a conference room.",
        "tags": [
          "Conference Recording"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "conference_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Recording stopped"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Recording/": {
      "get": {
        "operationId": "list-recordings",
        "summary": "List recordings",
        "description": "Retrieve all call recordings on the account.",
        "tags": [
          "Recordings"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of recordings",
            "content": {
              "application/json": {
                "example": {
                  "objects": [
                    {
                      "recording_id": "rec_XXXXXXXXXX",
                      "recording_url": "https://storage.vobiz.ai/recordings/rec_XXXXXXXXXX.mp3",
                      "duration": 120,
                      "file_format": "mp3"
                    }
                  ]
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "api_id": {
                      "type": "string"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string"
                        },
                        "offset": {
                          "type": "integer"
                        },
                        "previous": {
                          "nullable": true
                        },
                        "total_count": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "limit",
                        "next",
                        "offset",
                        "previous",
                        "total_count"
                      ]
                    },
                    "objects": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "add_time": {
                            "type": "string"
                          },
                          "call_uuid": {
                            "type": "string"
                          },
                          "conference_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "from_number": {
                            "type": "string"
                          },
                          "monthly_recording_storage_amount": {
                            "type": "integer"
                          },
                          "recording_duration_ms": {
                            "type": "string"
                          },
                          "recording_end_ms": {
                            "type": "string",
                            "nullable": true
                          },
                          "recording_format": {
                            "type": "string"
                          },
                          "recording_id": {
                            "type": "string"
                          },
                          "recording_start_ms": {
                            "type": "string",
                            "nullable": true
                          },
                          "recording_storage_duration": {
                            "type": "integer"
                          },
                          "recording_storage_rate": {
                            "type": "number"
                          },
                          "recording_type": {
                            "type": "string"
                          },
                          "recording_url": {
                            "type": "string"
                          },
                          "resource_uri": {
                            "type": "string"
                          },
                          "rounded_recording_duration": {
                            "type": "integer"
                          },
                          "to_number": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "add_time",
                          "call_uuid",
                          "conference_name",
                          "from_number",
                          "monthly_recording_storage_amount",
                          "recording_duration_ms",
                          "recording_end_ms",
                          "recording_format",
                          "recording_id",
                          "recording_start_ms",
                          "recording_storage_duration",
                          "recording_storage_rate",
                          "recording_type",
                          "recording_url",
                          "resource_uri",
                          "rounded_recording_duration",
                          "to_number"
                        ]
                      }
                    }
                  },
                  "required": [
                    "api_id",
                    "meta",
                    "objects"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Recording/{recording_id}/": {
      "get": {
        "operationId": "get-recording",
        "summary": "Retrieve a recording",
        "description": "Get details and download URL for a specific recording.",
        "tags": [
          "Recordings"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "recording_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "rec_XXXXXXXXXX"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Recording details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "add_time": {
                      "type": "string"
                    },
                    "api_id": {
                      "type": "string"
                    },
                    "call_uuid": {
                      "type": "string"
                    },
                    "conference_name": {
                      "nullable": true
                    },
                    "from_number": {
                      "type": "string"
                    },
                    "monthly_recording_storage_amount": {
                      "type": "integer"
                    },
                    "recording_duration_ms": {
                      "type": "string"
                    },
                    "recording_end_ms": {
                      "nullable": true
                    },
                    "recording_format": {
                      "type": "string"
                    },
                    "recording_id": {
                      "type": "string"
                    },
                    "recording_start_ms": {
                      "nullable": true
                    },
                    "recording_storage_duration": {
                      "type": "integer"
                    },
                    "recording_storage_rate": {
                      "type": "number"
                    },
                    "recording_type": {
                      "type": "string"
                    },
                    "recording_url": {
                      "type": "string"
                    },
                    "resource_uri": {
                      "type": "string"
                    },
                    "rounded_recording_duration": {
                      "type": "integer"
                    },
                    "to_number": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "add_time",
                    "api_id",
                    "call_uuid",
                    "conference_name",
                    "from_number",
                    "monthly_recording_storage_amount",
                    "recording_duration_ms",
                    "recording_end_ms",
                    "recording_format",
                    "recording_id",
                    "recording_start_ms",
                    "recording_storage_duration",
                    "recording_storage_rate",
                    "recording_type",
                    "recording_url",
                    "resource_uri",
                    "rounded_recording_duration",
                    "to_number"
                  ]
                },
                "example": {
                  "add_time": "2026-03-25 10:00:00.000000+05:30",
                  "api_id": "55667788-1234-5678-90ab-cdef12345678",
                  "call_uuid": "55667788-1234-5678-90ab-cdef12345678",
                  "conference_name": null,
                  "from_number": "+919876543210",
                  "monthly_recording_storage_amount": 0,
                  "recording_duration_ms": "7880.00000",
                  "recording_end_ms": null,
                  "recording_format": "wav",
                  "recording_id": "55667788-1234-5678-90ab-cdef12345678",
                  "recording_start_ms": null,
                  "recording_storage_duration": 6,
                  "recording_storage_rate": 0.005,
                  "recording_type": "trunk",
                  "recording_url": "https://recordings.vobiz.ai/example/abc123.mp3",
                  "resource_uri": "/v1/Account/MA_XXXXXXXX/Recording/55667788-1234-5678-90ab-cdef12345678/",
                  "rounded_recording_duration": 60,
                  "to_number": "+918012345678"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-recording",
        "summary": "Delete a recording",
        "description": "Permanently delete a recording from the account.",
        "tags": [
          "Recordings"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "recording_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Recording deleted"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/credentials": {
      "post": {
        "operationId": "create-credential",
        "summary": "Create a credential",
        "description": "Create SIP credentials for trunk authentication.",
        "tags": [
          "Credentials"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  }
                },
                "required": [
                  "username",
                  "password"
                ]
              },
              "example": {
                "username": "myuser",
                "password": "securepassword123"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "account_id": {
                      "type": "string"
                    },
                    "username": {
                      "type": "string"
                    },
                    "password": {
                      "type": "string"
                    },
                    "realm": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "account_id",
                    "username",
                    "password",
                    "realm",
                    "enabled",
                    "created_at",
                    "updated_at"
                  ]
                },
                "example": {
                  "id": "aabbccdd-1234-5678-90ab-cdef12345678",
                  "account_id": "MA_XXXXXXXX",
                  "username": "acme_sip_user_01",
                  "password": "<redacted>",
                  "realm": "MA_XXXXXXXX.sip.vobiz.ai",
                  "enabled": true,
                  "created_at": "2026-03-25T10:00:00Z",
                  "updated_at": "2026-03-25T10:00:00Z"
                }
              }
            }
          },
          "201": {
            "description": "Credential created"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/trunks/credentials": {
      "get": {
        "operationId": "list-credentials",
        "summary": "List credentials",
        "description": "Retrieve all SIP credentials on the account.",
        "tags": [
          "Credentials"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "responses": {
          "200": {
            "description": "List of credentials",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "limit",
                        "offset",
                        "total"
                      ]
                    },
                    "objects": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "account_id": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          },
                          "realm": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "account_id",
                          "username",
                          "password",
                          "realm",
                          "enabled",
                          "created_at",
                          "updated_at"
                        ]
                      }
                    }
                  },
                  "required": [
                    "meta",
                    "objects"
                  ]
                },
                "example": {
                  "meta": {
                    "limit": 20,
                    "offset": 0,
                    "total": 3
                  },
                  "objects": [
                    {
                      "id": "11223344-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "username": "acme_sip_user_01",
                      "password": "<redacted>",
                      "realm": "MA_XXXXXXXX.sip.vobiz.ai",
                      "enabled": true,
                      "created_at": "2026-03-25T10:00:00Z",
                      "updated_at": "2026-03-25T10:00:00Z"
                    },
                    {
                      "id": "99887766-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "username": "office_phone_03",
                      "password": "<redacted>",
                      "realm": "MA_XXXXXXXX.sip.vobiz.ai",
                      "enabled": true,
                      "created_at": "2026-03-20T08:15:00Z",
                      "updated_at": "2026-03-20T08:15:00Z"
                    },
                    {
                      "id": "55667788-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "username": "sipuser_demo",
                      "password": "<redacted>",
                      "realm": "MA_XXXXXXXX.sip.vobiz.ai",
                      "enabled": true,
                      "created_at": "2026-03-15T14:42:00Z",
                      "updated_at": "2026-03-15T14:42:00Z"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/credentials/{credential_id}": {
      "put": {
        "operationId": "update-credential",
        "summary": "Update a credential",
        "description": "Update the password for an existing SIP credential.",
        "tags": [
          "Credentials"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "credential_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "password": {
                    "type": "string"
                  }
                },
                "required": [
                  "password"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Credential updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "account_id": {
                      "type": "string"
                    },
                    "username": {
                      "type": "string"
                    },
                    "password": {
                      "type": "string"
                    },
                    "realm": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "account_id",
                    "username",
                    "password",
                    "realm",
                    "enabled",
                    "created_at",
                    "updated_at"
                  ]
                },
                "example": {
                  "id": "aabbccdd-1234-5678-90ab-cdef12345678",
                  "account_id": "MA_XXXXXXXX",
                  "username": "acme_sip_user_01",
                  "password": "<redacted>",
                  "realm": "MA_XXXXXXXX.sip.vobiz.ai",
                  "enabled": true,
                  "created_at": "2026-03-25T10:00:00Z",
                  "updated_at": "2026-03-25T11:30:00Z"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-credential",
        "summary": "Delete a credential",
        "description": "Delete an existing SIP credential.",
        "tags": [
          "Credentials"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "credential_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "204": {
            "description": "Credential deleted"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/ip-acl": {
      "post": {
        "operationId": "create-ip-acl",
        "summary": "Create an IP ACL",
        "description": "Add an IP access control rule to restrict SIP trunk access.",
        "tags": [
          "IP Access Control List"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "ip_address": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "ip_address"
                ]
              },
              "example": {
                "name": "Office IP",
                "cidr_ip": "203.0.113.0/24"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "account_id": {
                      "type": "string"
                    },
                    "ip_address": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "account_id",
                    "ip_address",
                    "description",
                    "enabled",
                    "created_at",
                    "updated_at"
                  ]
                },
                "example": {
                  "id": "aabbccdd-1234-5678-90ab-cdef12345678",
                  "account_id": "MA_XXXXXXXX",
                  "ip_address": "10.20.30.0/24",
                  "description": "",
                  "enabled": true,
                  "created_at": "2026-03-25T10:00:00Z",
                  "updated_at": "2026-03-25T10:00:00Z"
                }
              }
            }
          },
          "201": {
            "description": "IP ACL created"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/trunks/ip-acl": {
      "get": {
        "operationId": "list-ip-acls",
        "summary": "List IP ACLs",
        "description": "Retrieve all IP access control rules on the account.",
        "tags": [
          "IP Access Control List"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "responses": {
          "200": {
            "description": "List of IP ACLs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "limit",
                        "offset",
                        "total"
                      ]
                    },
                    "objects": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "account_id": {
                            "type": "string"
                          },
                          "ip_address": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "account_id",
                          "ip_address",
                          "description",
                          "enabled",
                          "created_at",
                          "updated_at"
                        ]
                      }
                    }
                  },
                  "required": [
                    "meta",
                    "objects"
                  ]
                },
                "example": {
                  "meta": {
                    "limit": 20,
                    "offset": 0,
                    "total": 3
                  },
                  "objects": [
                    {
                      "id": "11223344-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "ip_address": "10.20.30.0/24",
                      "description": "Office IP",
                      "enabled": true,
                      "created_at": "2026-03-25T10:00:00Z",
                      "updated_at": "2026-03-25T10:00:00Z"
                    },
                    {
                      "id": "99887766-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "ip_address": "192.168.1.0/24",
                      "description": "Datacenter ACL",
                      "enabled": true,
                      "created_at": "2026-03-22T09:00:00Z",
                      "updated_at": "2026-03-22T09:00:00Z"
                    },
                    {
                      "id": "55667788-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "ip_address": "203.0.113.0/24",
                      "description": "Production SBC",
                      "enabled": true,
                      "created_at": "2026-03-18T14:41:41Z",
                      "updated_at": "2026-03-18T14:41:41Z"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/ip-acl/{ip_acl_id}": {
      "put": {
        "operationId": "update-ip-acl",
        "summary": "Update an IP ACL",
        "description": "Update an existing IP access control rule.",
        "tags": [
          "IP Access Control List"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "ip_acl_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "ip_address": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "ip_address"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "IP ACL updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "account_id": {
                      "type": "string"
                    },
                    "ip_address": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "account_id",
                    "ip_address",
                    "description",
                    "enabled",
                    "created_at",
                    "updated_at"
                  ]
                },
                "example": {
                  "id": "aabbccdd-1234-5678-90ab-cdef12345678",
                  "account_id": "MA_XXXXXXXX",
                  "ip_address": "192.168.1.0/24",
                  "description": "Datacenter ACL",
                  "enabled": true,
                  "created_at": "2026-03-25T10:00:00Z",
                  "updated_at": "2026-03-25T11:30:00Z"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-ip-acl",
        "summary": "Delete an IP ACL",
        "description": "Remove an IP access control rule.",
        "tags": [
          "IP Access Control List"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "ip_acl_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "204": {
            "description": "IP ACL deleted"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/origination-uris": {
      "post": {
        "operationId": "create-origination-uri",
        "summary": "Create an origination URI",
        "description": "Add an inbound SIP endpoint (origination URI) to a trunk.",
        "tags": [
          "Origination URI"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "sip_uri": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "integer"
                  }
                },
                "required": [
                  "name",
                  "sip_uri",
                  "priority"
                ]
              },
              "example": {
                "name": "Primary SBC",
                "sip_uri": "sip:sbc.example.com",
                "priority": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "account_id": {
                      "type": "string"
                    },
                    "uri": {
                      "type": "string"
                    },
                    "priority": {
                      "type": "integer"
                    },
                    "weight": {
                      "type": "integer"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "transport": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "account_id",
                    "uri",
                    "priority",
                    "weight",
                    "enabled",
                    "transport",
                    "description",
                    "created_at",
                    "updated_at"
                  ]
                },
                "example": {
                  "id": "aabbccdd-1234-5678-90ab-cdef12345678",
                  "account_id": "MA_XXXXXXXX",
                  "uri": "sip:sbc1.example.com",
                  "priority": 1,
                  "weight": 10,
                  "enabled": true,
                  "transport": "TCP",
                  "description": "Primary SBC",
                  "created_at": "2026-03-25T10:00:00Z",
                  "updated_at": "2026-03-25T10:00:00Z"
                }
              }
            }
          },
          "201": {
            "description": "Origination URI created"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/trunks/origination-uris": {
      "get": {
        "operationId": "list-origination-uris",
        "summary": "List origination URIs",
        "description": "Retrieve all origination URIs on the account.",
        "tags": [
          "Origination URI"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "responses": {
          "200": {
            "description": "List of origination URIs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "limit",
                        "offset",
                        "total"
                      ]
                    },
                    "objects": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "account_id": {
                            "type": "string"
                          },
                          "uri": {
                            "type": "string"
                          },
                          "priority": {
                            "type": "integer"
                          },
                          "weight": {
                            "type": "integer"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "transport": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "account_id",
                          "uri",
                          "priority",
                          "weight",
                          "enabled",
                          "transport",
                          "description",
                          "created_at",
                          "updated_at"
                        ]
                      }
                    }
                  },
                  "required": [
                    "meta",
                    "objects"
                  ]
                },
                "example": {
                  "meta": {
                    "limit": 20,
                    "offset": 0,
                    "total": 3
                  },
                  "objects": [
                    {
                      "id": "11223344-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "uri": "sip:sbc1.example.com",
                      "priority": 1,
                      "weight": 10,
                      "enabled": true,
                      "transport": "udp",
                      "description": "Primary SBC",
                      "created_at": "2026-03-25T10:00:00Z",
                      "updated_at": "2026-03-25T10:00:00Z"
                    },
                    {
                      "id": "99887766-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "uri": "sip:sbc2.example.com",
                      "priority": 2,
                      "weight": 10,
                      "enabled": true,
                      "transport": "tcp",
                      "description": "US East SBC",
                      "created_at": "2026-03-22T09:00:00Z",
                      "updated_at": "2026-03-22T09:00:00Z"
                    },
                    {
                      "id": "55667788-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "uri": "sip:sbc3.example.com",
                      "priority": 10,
                      "weight": 10,
                      "enabled": true,
                      "transport": "tls",
                      "description": "",
                      "created_at": "2026-03-18T14:41:41Z",
                      "updated_at": "2026-03-18T14:41:41Z"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/origination-uris/{uri_id}": {
      "put": {
        "operationId": "update-origination-uri",
        "summary": "Update an origination URI",
        "description": "Update an existing origination URI.",
        "tags": [
          "Origination URI"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "uri_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "integer"
                  }
                },
                "required": [
                  "name",
                  "priority"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Origination URI updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "account_id": {
                      "type": "string"
                    },
                    "uri": {
                      "type": "string"
                    },
                    "priority": {
                      "type": "integer"
                    },
                    "weight": {
                      "type": "integer"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "transport": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "account_id",
                    "uri",
                    "priority",
                    "weight",
                    "enabled",
                    "transport",
                    "description",
                    "created_at",
                    "updated_at"
                  ]
                },
                "example": {
                  "id": "aabbccdd-1234-5678-90ab-cdef12345678",
                  "account_id": "MA_XXXXXXXX",
                  "uri": "sip:sbc1.example.com",
                  "priority": 2,
                  "weight": 10,
                  "enabled": true,
                  "transport": "TCP",
                  "description": "Primary SBC",
                  "created_at": "2026-03-25T10:00:00Z",
                  "updated_at": "2026-03-25T11:30:00Z"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-origination-uri",
        "summary": "Delete an origination URI",
        "description": "Delete an origination URI from a trunk.",
        "tags": [
          "Origination URI"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "uri_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "204": {
            "description": "Origination URI deleted"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Application/": {
      "post": {
        "operationId": "create-application",
        "summary": "Create an Application",
        "description": "Creates an Application with webhook URLs for call handling.\nCreating an application is usually a first step, after which you\nattach the application to either a number or an endpoint.\n",
        "tags": [
          "Applications"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "app_name": {
                    "type": "string"
                  },
                  "answer_url": {
                    "type": "string"
                  },
                  "answer_method": {
                    "type": "string"
                  }
                },
                "required": [
                  "app_name",
                  "answer_url",
                  "answer_method"
                ]
              },
              "example": {
                "app_name": "My Voice Application",
                "answer_url": "https://example.com/answer",
                "answer_method": "POST",
                "hangup_url": "https://example.com/hangup",
                "hangup_method": "POST"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "api_id": {
                      "type": "string"
                    },
                    "app_id": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "api_id",
                    "app_id",
                    "message"
                  ]
                },
                "example": {
                  "api_id": "aabbccdd-1234-5678-90ab-cdef12345678",
                  "app_id": "12345678901234567",
                  "message": "created"
                }
              }
            }
          },
          "201": {
            "description": "Application created",
            "content": {
              "application/json": {
                "example": {
                  "api_id": "aabbccdd-1234-5678-90ab-cdef12345678",
                  "app_id": "12345678901234567",
                  "message": "created"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials"
          }
        }
      },
      "get": {
        "operationId": "list-applications",
        "summary": "List All Applications",
        "description": "Get details of all applications created under your Vobiz account.",
        "tags": [
          "Applications"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of applications",
            "content": {
              "application/json": {
                "example": {
                  "api_id": "aabbccdd-1234-5678-90ab-cdef12345678",
                  "meta": {
                    "limit": 20,
                    "next": "/v1/Account/MA_XXXXXXXX/Application/?limit=20&offset=20",
                    "offset": 0,
                    "previous": null,
                    "total_count": 23
                  },
                  "objects": [
                    {
                      "answer_method": "POST",
                      "answer_url": "https://example.com/answer",
                      "app_id": "12345678901234567",
                      "app_name": "My Voice App",
                      "application_type": "XML",
                      "created_at": "2026-04-02 12:11:19.740666+00:00",
                      "default_app": true,
                      "default_endpoint_app": false,
                      "enabled": true,
                      "fallback_answer_url": null,
                      "fallback_method": "POST",
                      "hangup_method": "POST",
                      "hangup_url": "https://example.com/hangup",
                      "log_incoming_message": true,
                      "message_method": "POST",
                      "message_url": null,
                      "public_uri": false,
                      "resource_uri": "/v1/Account/MA_XXXXXXXX/Application/12345678901234567/",
                      "sip_transfer_method": "POST",
                      "sip_transfer_url": null,
                      "sip_uri": "sip:12345678901234567@app.vobiz.ai",
                      "sub_account": null,
                      "updated_at": "2026-04-02 12:11:19.740666+00:00"
                    },
                    {
                      "answer_method": "POST",
                      "answer_url": "https://example.com/answer",
                      "app_id": "11223344556677889",
                      "app_name": "Acme Voice Application",
                      "application_type": "XML",
                      "created_at": "2026-03-25 09:33:08.869648+00:00",
                      "default_app": false,
                      "default_endpoint_app": false,
                      "enabled": true,
                      "fallback_answer_url": null,
                      "fallback_method": "POST",
                      "hangup_method": "POST",
                      "hangup_url": "https://example.com/hangup",
                      "log_incoming_message": true,
                      "message_method": "POST",
                      "message_url": null,
                      "public_uri": false,
                      "resource_uri": "/v1/Account/MA_XXXXXXXX/Application/11223344556677889/",
                      "sip_transfer_method": "POST",
                      "sip_transfer_url": null,
                      "sip_uri": "sip:11223344556677889@app.vobiz.ai",
                      "sub_account": null,
                      "updated_at": "2026-03-25 09:33:08.869648+00:00"
                    }
                  ]
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "api_id": {
                      "type": "string"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string"
                        },
                        "offset": {
                          "type": "integer"
                        },
                        "previous": {
                          "nullable": true
                        },
                        "total_count": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "limit",
                        "next",
                        "offset",
                        "previous",
                        "total_count"
                      ]
                    },
                    "objects": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "answer_method": {
                            "type": "string"
                          },
                          "answer_url": {
                            "type": "string"
                          },
                          "app_id": {
                            "type": "string"
                          },
                          "app_name": {
                            "type": "string"
                          },
                          "application_type": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "default_app": {
                            "type": "boolean"
                          },
                          "default_endpoint_app": {
                            "type": "boolean"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "fallback_answer_url": {
                            "type": "string",
                            "nullable": true
                          },
                          "fallback_method": {
                            "type": "string"
                          },
                          "hangup_method": {
                            "type": "string"
                          },
                          "hangup_url": {
                            "type": "string"
                          },
                          "log_incoming_message": {
                            "type": "boolean"
                          },
                          "message_method": {
                            "type": "string"
                          },
                          "message_url": {
                            "type": "string",
                            "nullable": true
                          },
                          "public_uri": {
                            "type": "boolean"
                          },
                          "resource_uri": {
                            "type": "string"
                          },
                          "sip_transfer_method": {
                            "type": "string"
                          },
                          "sip_transfer_url": {
                            "nullable": true
                          },
                          "sip_uri": {
                            "type": "string"
                          },
                          "sub_account": {
                            "nullable": true
                          },
                          "updated_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "answer_method",
                          "answer_url",
                          "app_id",
                          "app_name",
                          "application_type",
                          "created_at",
                          "default_app",
                          "default_endpoint_app",
                          "enabled",
                          "fallback_answer_url",
                          "fallback_method",
                          "hangup_method",
                          "hangup_url",
                          "log_incoming_message",
                          "message_method",
                          "message_url",
                          "public_uri",
                          "resource_uri",
                          "sip_transfer_method",
                          "sip_transfer_url",
                          "sip_uri",
                          "sub_account",
                          "updated_at"
                        ]
                      }
                    }
                  },
                  "required": [
                    "api_id",
                    "meta",
                    "objects"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Application/{app_id}/": {
      "get": {
        "operationId": "retrieve-application",
        "summary": "Retrieve an Application",
        "description": "Get details of a particular application by passing the app_id.",
        "tags": [
          "Applications"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Unique identifier for the application",
            "schema": {
              "type": "string",
              "example": "12345678"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Application details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "answer_method": {
                      "type": "string"
                    },
                    "answer_url": {
                      "type": "string"
                    },
                    "api_id": {
                      "type": "string"
                    },
                    "app_id": {
                      "type": "string"
                    },
                    "app_name": {
                      "type": "string"
                    },
                    "application_type": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "default_app": {
                      "type": "boolean"
                    },
                    "default_endpoint_app": {
                      "type": "boolean"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "fallback_answer_url": {
                      "nullable": true
                    },
                    "fallback_method": {
                      "type": "string"
                    },
                    "hangup_method": {
                      "type": "string"
                    },
                    "hangup_url": {
                      "type": "string"
                    },
                    "log_incoming_message": {
                      "type": "boolean"
                    },
                    "message_method": {
                      "type": "string"
                    },
                    "message_url": {
                      "nullable": true
                    },
                    "public_uri": {
                      "type": "boolean"
                    },
                    "resource_uri": {
                      "type": "string"
                    },
                    "sip_transfer_method": {
                      "type": "string"
                    },
                    "sip_transfer_url": {
                      "nullable": true
                    },
                    "sip_uri": {
                      "type": "string"
                    },
                    "sub_account": {
                      "nullable": true
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "answer_method",
                    "answer_url",
                    "api_id",
                    "app_id",
                    "app_name",
                    "application_type",
                    "created_at",
                    "default_app",
                    "default_endpoint_app",
                    "enabled",
                    "fallback_answer_url",
                    "fallback_method",
                    "hangup_method",
                    "hangup_url",
                    "log_incoming_message",
                    "message_method",
                    "message_url",
                    "public_uri",
                    "resource_uri",
                    "sip_transfer_method",
                    "sip_transfer_url",
                    "sip_uri",
                    "sub_account",
                    "updated_at"
                  ]
                },
                "example": {
                  "answer_method": "GET",
                  "answer_url": "https://example.com/answer",
                  "api_id": "aabbccdd-1234-5678-90ab-cdef12345678",
                  "app_id": "12345678901234567",
                  "app_name": "My Voice App",
                  "application_type": "XML",
                  "created_at": "2026-03-25 10:00:00.000000+00:00",
                  "default_app": true,
                  "default_endpoint_app": false,
                  "enabled": true,
                  "fallback_answer_url": null,
                  "fallback_method": "POST",
                  "hangup_method": "POST",
                  "hangup_url": "https://example.com/hangup",
                  "log_incoming_message": true,
                  "message_method": "POST",
                  "message_url": null,
                  "public_uri": false,
                  "resource_uri": "/v1/Account/MA_XXXXXXXX/Application/12345678901234567/",
                  "sip_transfer_method": "POST",
                  "sip_transfer_url": null,
                  "sip_uri": "sip:12345678901234567@app.vobiz.ai",
                  "sub_account": null,
                  "updated_at": "2026-03-25 10:00:00.000000+00:00"
                }
              }
            }
          },
          "404": {
            "description": "Application not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "update-application",
        "summary": "Update an Application",
        "description": "Modify an application using this API. You can update any subset of\nfields (partial update). Fields not provided will remain unchanged.\n",
        "tags": [
          "Applications"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "12345678"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "app_name": {
                    "type": "string"
                  },
                  "default_number_app": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "app_name",
                  "default_number_app"
                ]
              },
              "example": {
                "app_name": "Updated Application Name",
                "default_number_app": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application updated",
            "content": {
              "application/json": {
                "example": {
                  "api_id": "11223344-5566-7788-99aa-bbccddeeff00",
                  "message": "changed"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "api_id": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "api_id",
                    "message"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Application not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-application",
        "summary": "Delete an Application",
        "description": "Permanently delete an Application. If the application is associated\nwith phone numbers, the deletion may be blocked unless those\nassociations are removed first.\n",
        "tags": [
          "Applications"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "12345678"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "204": {
            "description": "Application deleted"
          },
          "404": {
            "description": "Application not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Cannot delete application (in use)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Endpoint/": {
      "post": {
        "operationId": "create-endpoint",
        "summary": "Create an Endpoint",
        "description": "Create a new SIP endpoint that can be used to make and receive calls\nthrough IP phones, softphones, or SIP clients. Each endpoint is\nassigned a unique SIP URI and endpoint ID.\n",
        "tags": [
          "Endpoints"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  },
                  "alias": {
                    "type": "string"
                  },
                  "application": {
                    "type": "integer"
                  }
                },
                "required": [
                  "username",
                  "password",
                  "alias",
                  "application"
                ]
              },
              "example": {
                "username": "john_doe",
                "password": "SecurePassword123!",
                "alias": "John's Desktop Phone",
                "application": 12345678
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "alias": {
                      "type": "string"
                    },
                    "endpoint_id": {
                      "type": "string"
                    },
                    "username": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "alias",
                    "endpoint_id",
                    "username"
                  ]
                },
                "example": {
                  "alias": "Acme Desktop Phone",
                  "endpoint_id": "193962768711692",
                  "username": "acme_sip_user_01"
                }
              }
            }
          },
          "201": {
            "description": "Endpoint created",
            "content": {
              "application/json": {
                "example": {
                  "alias": "Acme Desktop Phone",
                  "endpoint_id": "193962768711692",
                  "username": "acme_sip_user_01"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-endpoints",
        "summary": "List All Endpoints",
        "description": "Retrieve a paginated list of all SIP endpoints in your account.",
        "tags": [
          "Endpoints"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "username__contains",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username__exact",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username__startswith",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "alias__contains",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "alias__exact",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "application_id__exact",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "application_id__isnull",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sub_account",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of endpoints",
            "content": {
              "application/json": {
                "example": {
                  "api_id": "aabbccdd-1234-5678-90ab-cdef12345678",
                  "meta": {
                    "limit": 20,
                    "offset": 0,
                    "total_count": 4,
                    "next": null,
                    "previous": null
                  },
                  "objects": [
                    {
                      "alias": "Acme Desktop Phone",
                      "application": "/v1/Account/MA_XXXXXXXX/Application/12345678901234567/",
                      "endpoint_id": "147322537258167",
                      "resource_uri": "/v1/Account/MA_XXXXXXXX/Endpoint/147322537258167/",
                      "sip_registered": "false",
                      "sip_uri": "sip:acme_sip_user_01@registrar.vobiz.ai",
                      "sub_account": null,
                      "username": "acme_sip_user_01"
                    },
                    {
                      "alias": "SIP Demo Phone",
                      "application": null,
                      "endpoint_id": "125649946800674",
                      "resource_uri": "/v1/Account/MA_XXXXXXXX/Endpoint/125649946800674/",
                      "sip_registered": "false",
                      "sip_uri": "sip:sipuser_demo@registrar.vobiz.ai",
                      "sub_account": null,
                      "username": "sipuser_demo"
                    }
                  ]
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "api_id": {
                      "type": "string"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "nullable": true
                        },
                        "previous": {
                          "nullable": true
                        }
                      },
                      "required": [
                        "limit",
                        "offset",
                        "total_count",
                        "next",
                        "previous"
                      ]
                    },
                    "objects": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "alias": {
                            "type": "string"
                          },
                          "application": {
                            "type": "string",
                            "nullable": true
                          },
                          "endpoint_id": {
                            "type": "string"
                          },
                          "resource_uri": {
                            "type": "string"
                          },
                          "sip_registered": {
                            "type": "string"
                          },
                          "sip_uri": {
                            "type": "string"
                          },
                          "sub_account": {
                            "nullable": true
                          },
                          "username": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "alias",
                          "application",
                          "endpoint_id",
                          "resource_uri",
                          "sip_registered",
                          "sip_uri",
                          "sub_account",
                          "username"
                        ]
                      }
                    }
                  },
                  "required": [
                    "api_id",
                    "meta",
                    "objects"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/Endpoint/{endpoint_id}/": {
      "get": {
        "operationId": "retrieve-endpoint",
        "summary": "Retrieve an Endpoint",
        "description": "Retrieve the details of an existing endpoint. The response includes\nall endpoint attributes and, if the endpoint is currently registered\non a SIP client, additional registration details.\n",
        "tags": [
          "Endpoints"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "87654321"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Endpoint details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "alias": {
                      "type": "string"
                    },
                    "application": {
                      "type": "string"
                    },
                    "endpoint_id": {
                      "type": "string"
                    },
                    "resource_uri": {
                      "type": "string"
                    },
                    "sip_registered": {
                      "type": "string"
                    },
                    "sip_uri": {
                      "type": "string"
                    },
                    "sub_account": {
                      "nullable": true
                    },
                    "username": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "alias",
                    "application",
                    "endpoint_id",
                    "resource_uri",
                    "sip_registered",
                    "sip_uri",
                    "sub_account",
                    "username"
                  ]
                },
                "example": {
                  "alias": "Acme Desktop Phone",
                  "application": "/v1/Account/MA_XXXXXXXX/Application/12345678901234567/",
                  "endpoint_id": "147322537258167",
                  "resource_uri": "/v1/Account/MA_XXXXXXXX/Endpoint/147322537258167/",
                  "sip_registered": "false",
                  "sip_uri": "sip:acme_sip_user_01@registrar.vobiz.ai",
                  "sub_account": null,
                  "username": "acme_sip_user_01"
                }
              }
            }
          },
          "404": {
            "description": "Endpoint not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "update-endpoint",
        "summary": "Update an Endpoint",
        "description": "Update an existing endpoint's configuration. You can change the\npassword, alias, or attached application. The fields `username`,\n`endpoint_id`, `domain`, `allow_same_domain`, `allow_other_domains`,\n`allow_phones`, and `allow_apps` are locked after creation.\n",
        "tags": [
          "Endpoints"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "87654321"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "alias": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  }
                },
                "required": [
                  "alias",
                  "password"
                ]
              },
              "example": {
                "alias": "John's Updated Desktop Phone",
                "password": "NewSecurePassword456!"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                },
                "example": ""
              }
            }
          },
          "202": {
            "description": "Endpoint updated",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": ""
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Endpoint not found"
          }
        }
      },
      "delete": {
        "operationId": "delete-endpoint",
        "summary": "Delete an Endpoint",
        "description": "Permanently delete an endpoint from your Vobiz account. Once deleted,\nthe SIP URI will no longer be accessible, and any devices registered\nwith this endpoint will be disconnected.\n",
        "tags": [
          "Endpoints"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "87654321"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "204": {
            "description": "Endpoint deleted"
          },
          "404": {
            "description": "Endpoint not found"
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/inventory/numbers": {
      "get": {
        "operationId": "list-inventory-numbers",
        "summary": "List Inventory Numbers",
        "description": "Browse available phone numbers in inventory that are not assigned to\nany account. Only numbers with `status='active'` and `auth_id=NULL`\nare returned. These numbers are ready to be purchased.\n",
        "tags": [
          "Phone Numbers"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "country",
            "in": "query",
            "description": "Filter by country code (e.g., \"US\", \"IN\").",
            "schema": {
              "type": "string",
              "example": "IN"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Substring match against the E.164 number (e.g., \"80\" matches \"+918065...\").",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 25,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Inventory numbers",
            "content": {
              "application/json": {
                "example": {
                  "items": [
                    {
                      "id": "550e8400-e29b-41d4-a716-446655440000",
                      "e164": "+14155551234",
                      "country": "US",
                      "region": "CA",
                      "status": "active",
                      "setup_fee": 0,
                      "monthly_fee": 1,
                      "currency": "INR",
                      "created_at": "2025-01-15T10:00:00Z",
                      "updated_at": "2025-01-15T10:00:00Z"
                    }
                  ],
                  "page": 1,
                  "per_page": 25,
                  "total": 500
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "account_id": {
                            "type": "string"
                          },
                          "e164": {
                            "type": "string"
                          },
                          "country": {
                            "type": "string"
                          },
                          "capabilities": {
                            "type": "object",
                            "properties": {
                              "voice": {
                                "type": "boolean"
                              },
                              "sms": {
                                "type": "boolean"
                              },
                              "mms": {
                                "type": "boolean"
                              },
                              "fax": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "voice",
                              "sms",
                              "mms",
                              "fax"
                            ]
                          },
                          "status": {
                            "type": "string"
                          },
                          "provider": {
                            "type": "string"
                          },
                          "setup_fee": {
                            "type": "integer"
                          },
                          "monthly_fee": {
                            "type": "integer"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "voice_enabled": {
                            "type": "boolean"
                          },
                          "tags": {
                            "nullable": true
                          },
                          "is_blocked": {
                            "type": "boolean"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          },
                          "is_trial_number": {
                            "type": "boolean"
                          },
                          "minimum_commitment_months": {
                            "type": "integer"
                          },
                          "aadhaar_verification_required": {
                            "type": "boolean"
                          },
                          "aadhaar_verified": {
                            "type": "boolean"
                          },
                          "region": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "account_id",
                          "e164",
                          "country",
                          "capabilities",
                          "status",
                          "provider",
                          "setup_fee",
                          "monthly_fee",
                          "currency",
                          "voice_enabled",
                          "tags",
                          "is_blocked",
                          "created_at",
                          "updated_at",
                          "is_trial_number",
                          "minimum_commitment_months",
                          "aadhaar_verification_required",
                          "aadhaar_verified"
                        ]
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "per_page": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items",
                    "page",
                    "per_page",
                    "total"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/numbers/purchase-from-inventory": {
      "post": {
        "operationId": "purchase-from-inventory",
        "summary": "Purchase from Inventory",
        "description": "Purchase a phone number from inventory and assign it to your account.\nDebits your account balance for the setup fee and monthly fee. For\nsub-accounts (SA_), the parent master account (MA_) is charged.\n",
        "tags": [
          "Phone Numbers"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "e164"
                ],
                "properties": {
                  "e164": {
                    "type": "string",
                    "description": "Phone number to purchase in E.164 format.",
                    "example": "+919876543210"
                  },
                  "currency": {
                    "type": "string",
                    "description": "Currency for transaction. Defaults to the number's currency or \"USD\".",
                    "example": "USD"
                  }
                }
              },
              "example": {
                "e164": "+919876543210",
                "currency": "USD"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Number purchased",
            "content": {
              "application/json": {
                "example": {
                  "message": "Number purchased successfully",
                  "number": {
                    "id": "aabbccdd-1234-5678-90ab-cdef12345678",
                    "account_id": "MA_XXXXXXXX",
                    "e164": "+919876543210",
                    "country": "IN",
                    "region": "Karnataka",
                    "capabilities": {
                      "voice": true,
                      "sms": false,
                      "mms": false,
                      "fax": false
                    },
                    "status": "active",
                    "provider": "",
                    "setup_fee": 100,
                    "monthly_fee": 1,
                    "currency": "INR",
                    "voice_enabled": true,
                    "tags": [],
                    "purchased_at": "2026-03-25T10:00:00Z",
                    "is_blocked": false,
                    "created_at": "2026-03-25T10:00:00Z",
                    "updated_at": "2026-03-25T10:00:00Z",
                    "is_trial_number": false,
                    "minimum_commitment_months": 0,
                    "aadhaar_verification_required": false,
                    "aadhaar_verified": false,
                    "source": "inventory"
                  },
                  "items": [
                    {
                      "id": "aabbccdd-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "e164": "+919876543210",
                      "country": "IN",
                      "region": "Karnataka",
                      "capabilities": {
                        "voice": true,
                        "sms": false,
                        "mms": false,
                        "fax": false
                      },
                      "status": "active",
                      "monthly_fee": 1,
                      "currency": "INR"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Number not found in inventory",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed to purchase number",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Account/{auth_id}/numbers/{phone_number}/assign": {
      "post": {
        "operationId": "assign-number-to-trunk",
        "summary": "Assign Number to Trunk",
        "description": "Assign a phone number to a specific SIP trunk. Once assigned, all\ninbound calls to that phone number will be routed through the\ndesignated trunk. The phone number must be URL-encoded; use `%2B`\ninstead of `+` (e.g., `%2B912271264217`).\n",
        "tags": [
          "Phone Numbers"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "phone_number",
            "in": "path",
            "required": true,
            "description": "The phone number to assign, URL-encoded (use %2B instead of +).",
            "schema": {
              "type": "string",
              "example": "%2B912271264217"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "trunk_group_id"
                ],
                "properties": {
                  "trunk_group_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The UUID of the trunk to assign this number to.",
                    "example": "e3e55a78-1234-5678-90ab-cdef12345678"
                  }
                }
              },
              "example": {
                "trunk_group_id": "e3e55a78-1234-5678-90ab-cdef12345678"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Number assigned to trunk"
          },
          "400": {
            "description": "Invalid request (e.g., already assigned)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Number not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "unassign-number-from-trunk",
        "summary": "Unassign Number from Trunk",
        "description": "Remove the assignment between a phone number and a SIP trunk. After\nunassignment, the number remains in your account inventory but will\nno longer route inbound calls through the previously assigned trunk.\nURL-encode the phone number (use `%2B` instead of `+`).\n",
        "tags": [
          "Phone Numbers"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "phone_number",
            "in": "path",
            "required": true,
            "description": "The phone number to unassign, URL-encoded (use %2B instead of +).",
            "schema": {
              "type": "string",
              "example": "%2B912271264217"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Number unassigned"
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Number not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/account/{auth_id}/numbers/{e164}/health": {
      "get": {
        "operationId": "get-number-health",
        "summary": "Get number health dashboard",
        "description": "Returns the health & analytics dashboard for one of your numbers: current\nstatus, spam flag, and call metrics over the selected window (total and\nanswered calls, answer rate, minutes, average duration) plus a per-period\ntime series of snapshots.\n",
        "tags": [
          "Phone Numbers"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "e164",
            "in": "path",
            "required": true,
            "description": "The number in E.164, URL-encoded (use %2B instead of +).",
            "schema": {
              "type": "string",
              "example": "%2B919876543210"
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "description": "Snapshot granularity.",
            "schema": {
              "type": "string",
              "enum": [
                "daily",
                "hourly"
              ],
              "default": "daily"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Size of the window (in days) for the summary and snapshots.",
            "schema": {
              "type": "integer",
              "default": 30,
              "example": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Number health dashboard",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "e164": {
                      "type": "string",
                      "example": "+919876543210"
                    },
                    "status": {
                      "type": "string",
                      "example": "active"
                    },
                    "usage_status": {
                      "type": "string",
                      "description": "Reputation/usage rating for the number.",
                      "example": "unrated"
                    },
                    "is_spam": {
                      "type": "boolean",
                      "example": false
                    },
                    "granularity": {
                      "type": "string",
                      "example": "daily"
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "period_days": {
                          "type": "integer",
                          "example": 30
                        },
                        "total_calls": {
                          "type": "integer",
                          "example": 0
                        },
                        "answered_calls": {
                          "type": "integer",
                          "example": 0
                        },
                        "answer_rate": {
                          "type": "number",
                          "example": 0
                        },
                        "total_minutes": {
                          "type": "number",
                          "example": 0
                        },
                        "avg_duration": {
                          "type": "number",
                          "example": 0
                        }
                      }
                    },
                    "snapshots": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "bd41d44b-7217-4a78-9261-588fb1b41c25"
                          },
                          "ts": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2026-06-04T00:00:00Z"
                          },
                          "total_calls": {
                            "type": "integer",
                            "example": 0
                          },
                          "answered_calls": {
                            "type": "integer",
                            "example": 0
                          },
                          "failed_calls": {
                            "type": "integer",
                            "example": 0
                          },
                          "answer_rate": {
                            "type": "number",
                            "example": 0
                          },
                          "total_duration": {
                            "type": "number",
                            "example": 0
                          },
                          "avg_duration": {
                            "type": "number",
                            "example": 0
                          },
                          "total_minutes": {
                            "type": "number",
                            "example": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Number not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/account/{auth_id}/numbers/{e164}/assign-subaccount": {
      "post": {
        "operationId": "assign-did-to-subaccount",
        "summary": "Assign DID to a sub-account",
        "description": "Assign a parent-pool DID to a sub-account.",
        "tags": [
          "Phone Numbers"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "e164",
            "in": "path",
            "required": true,
            "description": "The number in E.164, URL-encoded (use %2B instead of +).",
            "schema": {
              "type": "string",
              "example": "%2B919876543210"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sub_account_id"
                ],
                "properties": {
                  "sub_account_id": {
                    "type": "string",
                    "example": "SA_XXXXXX"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "DID assigned to the sub-account"
          },
          "204": {
            "description": "DID assigned to the sub-account"
          },
          "404": {
            "description": "Number or sub-account not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "unassign-did-from-subaccount",
        "summary": "Unassign DID (15-day cool-off enforced)",
        "description": "Move the DID back to the parent pool.\n\nA **15-day cool-off** is enforced: if the DID had a call within the last\n15 days, the request is rejected with `409` and a\n`did_cool_off_in_effect` error that includes `cool_off_until` and\n`cool_off_remaining_seconds`. Never-used DIDs (`last_call_at` is `NULL`)\nmove back immediately.\n\nAdmins can bypass the cool-off with `?force=true` (see below); the\nbypass writes a `did_assignment_audit` row and requires an\nadmin-role account.\n",
        "tags": [
          "Phone Numbers"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthId"
          },
          {
            "name": "e164",
            "in": "path",
            "required": true,
            "description": "The number in E.164, URL-encoded (use %2B instead of +).",
            "schema": {
              "type": "string",
              "example": "%2B919876543210"
            }
          },
          {
            "name": "force",
            "in": "query",
            "required": false,
            "description": "Admin-only cool-off bypass. Requires an admin-role account\n(enforced at the gateway) and writes a `did_assignment_audit` row.\n",
            "schema": {
              "type": "boolean",
              "example": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "DID moved back to the parent pool"
          },
          "204": {
            "description": "DID moved back to the parent pool"
          },
          "403": {
            "description": "`force=true` requested without an admin-role account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Cool-off in effect — the DID had a call within the last 15 days",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "did_cool_off_in_effect",
                  "cool_off_until": "2026-06-09T10:00:00Z",
                  "cool_off_remaining_seconds": 1209600
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/partner/me": {
      "get": {
        "operationId": "get-partner-profile",
        "summary": "Get partner profile",
        "description": "Returns the authenticated partner's profile and balance.",
        "tags": [
          "Partner API"
        ],
        "responses": {
          "200": {
            "description": "Partner profile",
            "content": {
              "application/json": {
                "example": {
                  "auth_id": "PA_ABC123",
                  "name": "Acme Reseller",
                  "email": "partner@acme.com",
                  "balance": 50000,
                  "currency": "INR",
                  "country": "IN",
                  "created_at": "2025-01-15T10:00:00Z"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "account_id": {
                      "type": "integer"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "company": {
                      "type": "string"
                    },
                    "auth_id": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "phone": {
                      "type": "string"
                    },
                    "billing_model": {
                      "type": "string"
                    },
                    "is_active": {
                      "type": "boolean"
                    },
                    "is_verified": {
                      "type": "boolean"
                    },
                    "max_accounts": {
                      "type": "integer"
                    },
                    "can_create_accounts": {
                      "type": "boolean"
                    },
                    "can_create_pricing_tiers": {
                      "type": "boolean"
                    },
                    "can_view_cdrs": {
                      "type": "boolean"
                    },
                    "can_transfer_balance": {
                      "type": "boolean"
                    },
                    "default_pricing_tier_id": {
                      "type": "string"
                    },
                    "account_count": {
                      "type": "integer"
                    },
                    "balance": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "account_id",
                    "name",
                    "slug",
                    "company",
                    "auth_id",
                    "email",
                    "phone",
                    "billing_model",
                    "is_active",
                    "is_verified",
                    "max_accounts",
                    "can_create_accounts",
                    "can_create_pricing_tiers",
                    "can_view_cdrs",
                    "can_transfer_balance",
                    "default_pricing_tier_id",
                    "account_count",
                    "balance",
                    "created_at",
                    "updated_at"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/partner/dashboard": {
      "get": {
        "operationId": "get-partner-dashboard",
        "summary": "Get dashboard summary",
        "description": "Aggregated partner metrics - total customers, active accounts, balance\nheld across the partner ecosystem, MTD revenue, etc.\n",
        "tags": [
          "Partner API"
        ],
        "responses": {
          "200": {
            "description": "Dashboard summary",
            "content": {
              "application/json": {
                "example": {
                  "total_customers": 42,
                  "active_customers": 38,
                  "pending_kyc": 4,
                  "total_balance_held": 250000,
                  "currency": "INR",
                  "mtd_revenue": 18450.5
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "partner": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "account_id": {
                          "type": "integer"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "company": {
                          "type": "string"
                        },
                        "auth_id": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "phone": {
                          "type": "string"
                        },
                        "billing_model": {
                          "type": "string"
                        },
                        "is_active": {
                          "type": "boolean"
                        },
                        "is_verified": {
                          "type": "boolean"
                        },
                        "max_accounts": {
                          "type": "integer"
                        },
                        "can_create_accounts": {
                          "type": "boolean"
                        },
                        "can_create_pricing_tiers": {
                          "type": "boolean"
                        },
                        "can_view_cdrs": {
                          "type": "boolean"
                        },
                        "can_transfer_balance": {
                          "type": "boolean"
                        },
                        "default_pricing_tier_id": {
                          "type": "string"
                        },
                        "account_count": {
                          "type": "integer"
                        },
                        "balance": {
                          "nullable": true
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "account_id",
                        "name",
                        "slug",
                        "company",
                        "auth_id",
                        "email",
                        "phone",
                        "billing_model",
                        "is_active",
                        "is_verified",
                        "max_accounts",
                        "can_create_accounts",
                        "can_create_pricing_tiers",
                        "can_view_cdrs",
                        "can_transfer_balance",
                        "default_pricing_tier_id",
                        "account_count",
                        "balance",
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "period": {
                      "type": "object",
                      "properties": {
                        "from": {
                          "type": "string"
                        },
                        "to": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "from",
                        "to"
                      ]
                    },
                    "accounts": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "active": {
                          "type": "integer"
                        },
                        "customers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "auth_id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "email": {
                                "type": "string"
                              },
                              "phone": {
                                "type": "string"
                              },
                              "is_active": {
                                "type": "boolean"
                              },
                              "created_at": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "auth_id",
                              "name",
                              "email",
                              "phone",
                              "is_active",
                              "created_at"
                            ]
                          }
                        }
                      },
                      "required": [
                        "total",
                        "active",
                        "customers"
                      ]
                    },
                    "total_balance": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "calls": {
                      "type": "object",
                      "properties": {
                        "total_calls": {
                          "type": "integer"
                        },
                        "answered_calls": {
                          "type": "integer"
                        },
                        "total_minutes": {
                          "type": "number"
                        },
                        "total_cost": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "total_calls",
                        "answered_calls",
                        "total_minutes",
                        "total_cost"
                      ]
                    },
                    "traffic": {
                      "type": "object",
                      "properties": {
                        "inbound": {
                          "type": "object",
                          "properties": {
                            "total_calls": {
                              "type": "integer"
                            },
                            "answered_calls": {
                              "type": "integer"
                            },
                            "total_minutes": {
                              "type": "number"
                            },
                            "total_cost": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "total_calls",
                            "answered_calls",
                            "total_minutes",
                            "total_cost"
                          ]
                        },
                        "outbound": {
                          "type": "object",
                          "properties": {
                            "total_calls": {
                              "type": "integer"
                            },
                            "answered_calls": {
                              "type": "integer"
                            },
                            "total_minutes": {
                              "type": "number"
                            },
                            "total_cost": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "total_calls",
                            "answered_calls",
                            "total_minutes",
                            "total_cost"
                          ]
                        }
                      },
                      "required": [
                        "inbound",
                        "outbound"
                      ]
                    },
                    "by_product": {
                      "type": "object",
                      "properties": {
                        "sip_trunking": {
                          "type": "object",
                          "properties": {
                            "total_calls": {
                              "type": "integer"
                            },
                            "answered_calls": {
                              "type": "integer"
                            },
                            "total_minutes": {
                              "type": "integer"
                            },
                            "total_cost": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "total_calls",
                            "answered_calls",
                            "total_minutes",
                            "total_cost"
                          ]
                        },
                        "voice_api": {
                          "type": "object",
                          "properties": {
                            "total_calls": {
                              "type": "integer"
                            },
                            "answered_calls": {
                              "type": "integer"
                            },
                            "total_minutes": {
                              "type": "number"
                            },
                            "total_cost": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "total_calls",
                            "answered_calls",
                            "total_minutes",
                            "total_cost"
                          ]
                        }
                      },
                      "required": [
                        "sip_trunking",
                        "voice_api"
                      ]
                    },
                    "time_series": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string"
                          },
                          "total_calls": {
                            "type": "integer"
                          },
                          "answered_calls": {
                            "type": "integer"
                          },
                          "total_minutes": {
                            "type": "number"
                          },
                          "total_cost": {
                            "type": "string"
                          },
                          "inbound": {
                            "type": "object",
                            "properties": {
                              "total_calls": {
                                "type": "integer"
                              },
                              "answered_calls": {
                                "type": "integer"
                              },
                              "total_minutes": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "total_calls",
                              "answered_calls",
                              "total_minutes"
                            ]
                          },
                          "outbound": {
                            "type": "object",
                            "properties": {
                              "total_calls": {
                                "type": "integer"
                              },
                              "answered_calls": {
                                "type": "integer"
                              },
                              "total_minutes": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "total_calls",
                              "answered_calls",
                              "total_minutes"
                            ]
                          }
                        },
                        "required": [
                          "date",
                          "total_calls",
                          "answered_calls",
                          "total_minutes",
                          "total_cost",
                          "inbound",
                          "outbound"
                        ]
                      }
                    }
                  },
                  "required": [
                    "partner",
                    "period",
                    "accounts",
                    "total_balance",
                    "currency",
                    "calls",
                    "traffic",
                    "by_product",
                    "time_series"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/partner/accounts": {
      "get": {
        "operationId": "list-customer-accounts",
        "summary": "List customer accounts",
        "description": "Returns all customer sub-accounts under your partner account.",
        "tags": [
          "Partner API"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Substring match on name or email.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Customer accounts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accounts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "phone": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string",
                            "nullable": true
                          },
                          "gstin": {
                            "type": "string",
                            "nullable": true
                          },
                          "gst_status": {
                            "type": "string",
                            "nullable": true
                          },
                          "tds_enabled": {
                            "type": "boolean"
                          },
                          "tds_percentage": {
                            "type": "integer"
                          },
                          "business_type": {
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "auth_id": {
                            "type": "string"
                          },
                          "api_id": {
                            "type": "string"
                          },
                          "account_type": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string"
                          },
                          "postpaid": {
                            "type": "boolean"
                          },
                          "address": {
                            "type": "string",
                            "nullable": true
                          },
                          "city": {
                            "type": "string",
                            "nullable": true
                          },
                          "state": {
                            "type": "string",
                            "nullable": true
                          },
                          "timezone": {
                            "type": "string",
                            "nullable": true
                          },
                          "country": {
                            "type": "string"
                          },
                          "zip_code": {
                            "type": "string",
                            "nullable": true
                          },
                          "company": {
                            "type": "string"
                          },
                          "billing_mode": {
                            "type": "string"
                          },
                          "auto_recharge": {
                            "type": "boolean"
                          },
                          "cash_credits": {
                            "type": "string"
                          },
                          "cps_limit": {
                            "type": "integer"
                          },
                          "concurrent_calls_limit": {
                            "type": "integer"
                          },
                          "base_cps_limit": {
                            "nullable": true
                          },
                          "base_concurrent_calls_limit": {
                            "nullable": true
                          },
                          "purchased_cps": {
                            "nullable": true
                          },
                          "purchased_concurrent_calls": {
                            "nullable": true
                          },
                          "is_active": {
                            "type": "boolean"
                          },
                          "is_verified": {
                            "type": "boolean"
                          },
                          "is_trial_account": {
                            "type": "boolean"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "kyc_status": {
                            "type": "string"
                          },
                          "google_id": {
                            "nullable": true
                          },
                          "referral_code": {
                            "type": "string",
                            "nullable": true
                          },
                          "referral_disabled": {
                            "type": "boolean"
                          },
                          "custom_referrer_reward_amount": {
                            "nullable": true
                          },
                          "custom_referee_reward_amount": {
                            "nullable": true
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          },
                          "last_login": {
                            "type": "string",
                            "nullable": true
                          },
                          "pricing_tier_id": {
                            "type": "string"
                          },
                          "pricing_tier": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "rate_per_minute": {
                                "type": "number"
                              },
                              "streaming_rate_per_minute": {
                                "type": "number"
                              },
                              "recording_rate_per_minute": {
                                "type": "number"
                              },
                              "whatsapp_voice_rate": {
                                "type": "number"
                              },
                              "transcription_rate_per_minute": {
                                "type": "number"
                              },
                              "pii_redaction_rate_per_minute": {
                                "type": "number"
                              },
                              "charge_non_connected_calls": {
                                "type": "boolean"
                              },
                              "non_connected_call_fee": {
                                "type": "number"
                              },
                              "did_release_fee": {
                                "type": "integer"
                              },
                              "is_active": {
                                "type": "boolean"
                              },
                              "is_default": {
                                "type": "boolean"
                              },
                              "partner_id": {
                                "nullable": true
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "currency",
                              "rate_per_minute",
                              "streaming_rate_per_minute",
                              "recording_rate_per_minute",
                              "whatsapp_voice_rate",
                              "transcription_rate_per_minute",
                              "pii_redaction_rate_per_minute",
                              "charge_non_connected_calls",
                              "non_connected_call_fee",
                              "did_release_fee",
                              "is_active",
                              "is_default",
                              "partner_id"
                            ]
                          },
                          "partner_id": {
                            "type": "string"
                          },
                          "auto_recharge_config": {
                            "nullable": true
                          },
                          "resource_uri": {
                            "type": "string"
                          },
                          "auth_token": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "email",
                          "phone",
                          "description",
                          "gstin",
                          "gst_status",
                          "tds_enabled",
                          "tds_percentage",
                          "business_type",
                          "id",
                          "auth_id",
                          "api_id",
                          "account_type",
                          "role",
                          "postpaid",
                          "address",
                          "city",
                          "state",
                          "timezone",
                          "country",
                          "zip_code",
                          "company",
                          "billing_mode",
                          "auto_recharge",
                          "cash_credits",
                          "cps_limit",
                          "concurrent_calls_limit",
                          "base_cps_limit",
                          "base_concurrent_calls_limit",
                          "purchased_cps",
                          "purchased_concurrent_calls",
                          "is_active",
                          "is_verified",
                          "is_trial_account",
                          "enabled",
                          "kyc_status",
                          "google_id",
                          "referral_code",
                          "referral_disabled",
                          "custom_referrer_reward_amount",
                          "custom_referee_reward_amount",
                          "created_at",
                          "updated_at",
                          "last_login",
                          "pricing_tier_id",
                          "pricing_tier",
                          "partner_id",
                          "auto_recharge_config",
                          "resource_uri",
                          "auth_token"
                        ]
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "size": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "accounts",
                    "total",
                    "page",
                    "size"
                  ]
                },
                "example": {
                  "accounts": [
                    {
                      "name": "Acme Corp",
                      "email": "admin@acme-corp.com",
                      "phone": "+919876543210",
                      "description": null,
                      "gstin": null,
                      "gst_status": null,
                      "tds_enabled": false,
                      "tds_percentage": 2,
                      "business_type": "individual",
                      "id": "500000",
                      "auth_id": "MA_XXXXXXXX",
                      "api_id": "aabbccdd-1234-5678-90ab-cdef12345678",
                      "account_type": "standard",
                      "role": "user",
                      "postpaid": false,
                      "address": "221B Baker Street",
                      "city": "Mumbai",
                      "state": null,
                      "timezone": "Asia/Kolkata",
                      "country": "IN",
                      "zip_code": "400001",
                      "company": "Acme Corp",
                      "billing_mode": "prepaid",
                      "auto_recharge": false,
                      "cash_credits": "1300.00000",
                      "cps_limit": 1,
                      "concurrent_calls_limit": 4,
                      "base_cps_limit": null,
                      "base_concurrent_calls_limit": null,
                      "purchased_cps": null,
                      "purchased_concurrent_calls": null,
                      "is_active": true,
                      "is_verified": false,
                      "is_trial_account": false,
                      "enabled": true,
                      "kyc_status": "pending",
                      "google_id": null,
                      "referral_code": null,
                      "referral_disabled": false,
                      "custom_referrer_reward_amount": null,
                      "custom_referee_reward_amount": null,
                      "created_at": "2026-03-25T10:00:00Z",
                      "updated_at": "2026-03-26T11:54:13Z",
                      "last_login": "2026-03-25T10:16:47Z",
                      "pricing_tier_id": "11223344-1234-5678-90ab-cdef12345678",
                      "pricing_tier": {
                        "id": "11223344-1234-5678-90ab-cdef12345678",
                        "name": "Standard",
                        "currency": "INR",
                        "rate_per_minute": 0.45,
                        "streaming_rate_per_minute": 0.2,
                        "recording_rate_per_minute": 0.1,
                        "whatsapp_voice_rate": 0.45,
                        "transcription_rate_per_minute": 0.1,
                        "pii_redaction_rate_per_minute": 0.3,
                        "charge_non_connected_calls": true,
                        "non_connected_call_fee": 0.02,
                        "did_release_fee": 700,
                        "is_active": true,
                        "is_default": false,
                        "partner_id": null
                      },
                      "partner_id": "99887766-1234-5678-90ab-cdef12345678",
                      "auto_recharge_config": null,
                      "resource_uri": "/v1/Account/MA_XXXXXXXX/",
                      "auth_token": "<redacted>"
                    },
                    {
                      "name": "John Doe",
                      "email": "john@example.com",
                      "phone": "+918012345678",
                      "description": null,
                      "gstin": null,
                      "gst_status": null,
                      "tds_enabled": false,
                      "tds_percentage": 2,
                      "business_type": "individual",
                      "id": "500001",
                      "auth_id": "MA_YYYYYYYY",
                      "api_id": "55667788-1234-5678-90ab-cdef12345678",
                      "account_type": "standard",
                      "role": "user",
                      "postpaid": false,
                      "address": null,
                      "city": null,
                      "state": null,
                      "timezone": null,
                      "country": "IN",
                      "zip_code": null,
                      "company": "Acme Corp",
                      "billing_mode": "prepaid",
                      "auto_recharge": false,
                      "cash_credits": "1107.00000",
                      "cps_limit": 1,
                      "concurrent_calls_limit": 3,
                      "base_cps_limit": null,
                      "base_concurrent_calls_limit": null,
                      "purchased_cps": null,
                      "purchased_concurrent_calls": null,
                      "is_active": true,
                      "is_verified": false,
                      "is_trial_account": false,
                      "enabled": true,
                      "kyc_status": "pending",
                      "google_id": null,
                      "referral_code": null,
                      "referral_disabled": false,
                      "custom_referrer_reward_amount": null,
                      "custom_referee_reward_amount": null,
                      "created_at": "2026-03-20T05:58:46Z",
                      "updated_at": "2026-03-21T05:13:16Z",
                      "last_login": null,
                      "pricing_tier_id": "11223344-1234-5678-90ab-cdef12345678",
                      "pricing_tier": {
                        "id": "11223344-1234-5678-90ab-cdef12345678",
                        "name": "Standard",
                        "currency": "INR",
                        "rate_per_minute": 0.45,
                        "streaming_rate_per_minute": 0.2,
                        "recording_rate_per_minute": 0.1,
                        "whatsapp_voice_rate": 0.45,
                        "transcription_rate_per_minute": 0.1,
                        "pii_redaction_rate_per_minute": 0.3,
                        "charge_non_connected_calls": true,
                        "non_connected_call_fee": 0.02,
                        "did_release_fee": 700,
                        "is_active": true,
                        "is_default": false,
                        "partner_id": null
                      },
                      "partner_id": "99887766-1234-5678-90ab-cdef12345678",
                      "auto_recharge_config": null,
                      "resource_uri": "/v1/Account/MA_YYYYYYYY/",
                      "auth_token": "<redacted>"
                    }
                  ],
                  "total": 2,
                  "page": 1,
                  "size": 20
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-customer-account",
        "summary": "Create customer account",
        "description": "Creates a new customer sub-account under your partner account. VoBiz\nemails the customer their login credentials and (separately) a KYC link\nvia the kyc-sessions endpoint.\n",
        "tags": [
          "Partner API"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email",
                  "phone",
                  "password",
                  "country"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Customer's full name.",
                    "example": "John Doe"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Customer's email. KYC link is sent here.",
                    "example": "john@example.com"
                  },
                  "phone": {
                    "type": "string",
                    "description": "E.164 format.",
                    "example": "+919876543210"
                  },
                  "password": {
                    "type": "string",
                    "description": "Min 8 chars, must include a number and a special character.",
                    "example": "SecurePass123!"
                  },
                  "company": {
                    "type": "string",
                    "description": "Legal company or business name.",
                    "example": "Acme Corp"
                  },
                  "country": {
                    "type": "string",
                    "description": "ISO 2-letter country code.",
                    "example": "IN"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Customer account created",
            "content": {
              "application/json": {
                "example": {
                  "auth_id": "MA_ZKITB8Z2",
                  "auth_token": "your_auth_token_here",
                  "name": "John Doe",
                  "email": "john@example.com",
                  "status": "active",
                  "balance": 0,
                  "currency": "INR",
                  "country": "IN",
                  "created_at": "2026-03-25T10:00:00Z"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/partner/accounts/{customer_auth_id}/transfer-balance": {
      "post": {
        "operationId": "partner-transfer-balance",
        "summary": "Transfer balance to customer",
        "description": "Atomically debits your partner master balance and credits the customer's\nwallet. Both legs are recorded in each account's ledger. Transfers are\n**permanent and cannot be reversed.**\n",
        "tags": [
          "Partner API"
        ],
        "parameters": [
          {
            "name": "customer_auth_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "MA_ZKITB8Z2"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount",
                  "currency"
                ],
                "properties": {
                  "amount": {
                    "type": "number",
                    "description": "Positive decimal. Your master balance must be ≥ this amount.",
                    "example": 500
                  },
                  "currency": {
                    "type": "string",
                    "description": "Must match your partner account currency.",
                    "example": "INR"
                  },
                  "description": {
                    "type": "string",
                    "description": "Note for your records. Appears in both ledgers.",
                    "example": "April recharge - Credresolve"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Transfer completed",
            "content": {
              "application/json": {
                "example": {
                  "transaction_id": "txn_aabbccdd1234",
                  "from_account": "PA_XXXXXXXX",
                  "to_account": "MA_XXXXXXXX",
                  "amount": 500,
                  "currency": "INR",
                  "description": "April recharge",
                  "status": "completed",
                  "partner_balance_after": 47750,
                  "customer_balance_after": 2950,
                  "timestamp": "2026-03-25T11:00:00Z"
                }
              }
            }
          },
          "400": {
            "description": "Insufficient partner balance",
            "content": {
              "application/json": {
                "example": {
                  "error": "insufficient_balance",
                  "message": "Your partner balance (₹200.00) is insufficient for this transfer (₹500.00).",
                  "current_balance": 200,
                  "requested_amount": 500,
                  "currency": "INR"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/partner/accounts/{customer_auth_id}/transactions": {
      "get": {
        "operationId": "list-customer-transactions",
        "summary": "List customer transactions",
        "description": "Returns the customer's transaction ledger. Filter by date range or\ntransaction type. Useful for billing reconciliation.\n",
        "tags": [
          "Partner API"
        ],
        "parameters": [
          {
            "name": "customer_auth_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from_date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-03-01"
            }
          },
          {
            "name": "to_date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-03-31"
            }
          },
          {
            "name": "transaction_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "recharge",
                "debit",
                "refund",
                "transfer"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transactions list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "account_id": {
                            "type": "string"
                          },
                          "balance_id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "amount": {
                            "type": "integer"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "reference": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "processed_at": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "account_id",
                          "balance_id",
                          "type",
                          "amount",
                          "currency",
                          "description",
                          "reference",
                          "status",
                          "processed_at",
                          "created_at",
                          "updated_at"
                        ]
                      }
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "total_transactions": {
                          "type": "integer"
                        },
                        "total_debit": {
                          "type": "integer"
                        },
                        "total_credit": {
                          "type": "integer"
                        },
                        "net_amount": {
                          "type": "integer"
                        },
                        "by_reference_type": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "reference_type": {
                                "type": "string"
                              },
                              "total_debit": {
                                "type": "integer"
                              },
                              "total_credit": {
                                "type": "integer"
                              },
                              "count": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "reference_type",
                              "total_debit",
                              "total_credit",
                              "count"
                            ]
                          }
                        }
                      },
                      "required": [
                        "total_transactions",
                        "total_debit",
                        "total_credit",
                        "net_amount",
                        "by_reference_type"
                      ]
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "per_page": {
                      "type": "integer"
                    },
                    "total_pages": {
                      "type": "integer"
                    },
                    "account_auth_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "transactions",
                    "summary",
                    "total",
                    "page",
                    "per_page",
                    "total_pages",
                    "account_auth_id"
                  ]
                },
                "example": {
                  "transactions": [
                    {
                      "id": "aabbccdd-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "balance_id": "11223344-1234-5678-90ab-cdef12345678",
                      "type": "credit",
                      "amount": 200,
                      "currency": "INR",
                      "description": "Transfer from partner Acme: Balance transfer",
                      "reference": "ptc:99887766-1234-5678-90ab-cdef12345678:MA_XXXXXXXX:1778140310",
                      "status": "completed",
                      "processed_at": "2026-03-25T10:00:00Z",
                      "created_at": "2026-03-25T10:00:00Z",
                      "updated_at": "2026-03-25T10:00:00Z"
                    },
                    {
                      "id": "55667788-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "balance_id": "11223344-1234-5678-90ab-cdef12345678",
                      "type": "credit",
                      "amount": 100,
                      "currency": "INR",
                      "description": "Transfer from partner Acme: Balance transfer",
                      "reference": "ptc:99887766-1234-5678-90ab-cdef12345678:MA_XXXXXXXX:1778051898",
                      "status": "completed",
                      "processed_at": "2026-03-24T07:18:18Z",
                      "created_at": "2026-03-24T07:18:18Z",
                      "updated_at": "2026-03-24T07:18:18Z"
                    },
                    {
                      "id": "aabbccdd-9999-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "balance_id": "11223344-1234-5678-90ab-cdef12345678",
                      "type": "credit",
                      "amount": 1000,
                      "currency": "INR",
                      "description": "Transfer from partner Acme: Balance transfer",
                      "reference": "ptc:99887766-1234-5678-90ab-cdef12345678:MA_XXXXXXXX:1778051770",
                      "status": "completed",
                      "processed_at": "2026-03-24T07:16:10Z",
                      "created_at": "2026-03-24T07:16:10Z",
                      "updated_at": "2026-03-24T07:16:10Z"
                    }
                  ],
                  "summary": {
                    "total_transactions": 3,
                    "total_debit": 0,
                    "total_credit": 1300,
                    "net_amount": 1300,
                    "by_reference_type": [
                      {
                        "reference_type": "unknown",
                        "total_debit": 0,
                        "total_credit": 1300,
                        "count": 3
                      }
                    ]
                  },
                  "total": 3,
                  "page": 1,
                  "per_page": 20,
                  "total_pages": 1,
                  "account_auth_id": "MA_XXXXXXXX"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/partner/accounts/{customer_auth_id}/cdrs": {
      "get": {
        "operationId": "list-customer-cdrs",
        "summary": "List customer CDRs",
        "description": "Look up any customer's call history. Same filter set as the\ncustomer-side CDR endpoint.\n",
        "tags": [
          "Partner API"
        ],
        "parameters": [
          {
            "name": "customer_auth_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "call_direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "answered",
                "failed",
                "busy",
                "no_answer"
              ]
            }
          },
          {
            "name": "min_duration",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "hangup_cause",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "NO_ANSWER"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Customer CDRs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "account_id": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "array"
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        },
                        "pages": {
                          "type": "integer"
                        },
                        "has_next": {
                          "type": "boolean"
                        },
                        "has_prev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "page",
                        "per_page",
                        "total",
                        "pages",
                        "has_next",
                        "has_prev"
                      ]
                    },
                    "success": {
                      "type": "boolean"
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "answerRate": {
                          "type": "integer"
                        },
                        "answeredCalls": {
                          "type": "integer"
                        },
                        "avgCallDuration": {
                          "type": "string"
                        },
                        "last_call_at": {
                          "type": "string"
                        },
                        "totalCalls": {
                          "type": "integer"
                        },
                        "total_billable_seconds": {
                          "type": "integer"
                        },
                        "total_cost": {
                          "type": "integer"
                        },
                        "total_duration_seconds": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "answerRate",
                        "answeredCalls",
                        "avgCallDuration",
                        "last_call_at",
                        "totalCalls",
                        "total_billable_seconds",
                        "total_cost",
                        "total_duration_seconds"
                      ]
                    },
                    "account_auth_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "account_id",
                    "count",
                    "data",
                    "pagination",
                    "success",
                    "summary",
                    "account_auth_id"
                  ]
                },
                "example": {
                  "success": true,
                  "account_id": "MA_XXXXXXXX",
                  "account_auth_id": "MA_XXXXXXXX",
                  "count": 2,
                  "data": [
                    {
                      "account_id": "MA_XXXXXXXX",
                      "answer_time": "2026-03-25T06:59:31Z",
                      "billsec": 1,
                      "bridge_uuid": "aabbccdd-1234-5678-90ab-cdef12345678",
                      "call_direction": "outbound",
                      "caller_id_name": "Acme Corp",
                      "caller_id_number": "+918012345678",
                      "campaign_id": null,
                      "carrier_ip": null,
                      "codec": "PCMU",
                      "context": "voice-api",
                      "cost": 0.3,
                      "created_at": "2026-03-25T06:59:32Z",
                      "currency": "INR",
                      "customer_endpoint": null,
                      "destination_number": "+919876543210",
                      "duration": 6,
                      "end_time": "2026-03-25T06:59:32Z",
                      "failure_code": null,
                      "failure_reason": null,
                      "hangup_cause": "NORMAL_CLEARING",
                      "hangup_cause_code": 4000,
                      "hangup_cause_name": "Normal Hangup",
                      "hangup_disposition": "send_bye",
                      "hangup_source": "Caller",
                      "id": 18600001,
                      "jitter": 0,
                      "mos": 4.5,
                      "network_addr": "3.110.99.6",
                      "origination_region": "mumbai",
                      "packet_loss": 0,
                      "progress_time": "2026-03-25T06:59:26Z",
                      "region": "ap-south-1",
                      "ring_time": 5,
                      "sip_call_id": "11223344-1234-5678-90ab-cdef12345678",
                      "sip_user_agent": "Vobiz",
                      "start_time": "2026-03-25T06:59:26Z",
                      "streaming_cost": 0,
                      "terminated_to": null,
                      "total_cost": 0.3,
                      "trunk_id": null,
                      "updated_at": "2026-03-25T06:59:32Z",
                      "uuid": "55667788-1234-5678-90ab-cdef12345678"
                    },
                    {
                      "account_id": "MA_XXXXXXXX",
                      "answer_time": "2026-03-25T07:10:11Z",
                      "billsec": 4,
                      "bridge_uuid": "99887766-1234-5678-90ab-cdef12345678",
                      "call_direction": "inbound",
                      "caller_id_name": "+919876543210",
                      "caller_id_number": "+919876543210",
                      "campaign_id": null,
                      "carrier_ip": null,
                      "codec": "PCMU",
                      "context": "voice-api",
                      "cost": 0.45,
                      "created_at": "2026-03-25T07:10:15Z",
                      "currency": "INR",
                      "customer_endpoint": null,
                      "destination_number": "+918012345678",
                      "duration": 9,
                      "end_time": "2026-03-25T07:10:15Z",
                      "failure_code": null,
                      "failure_reason": null,
                      "hangup_cause": "NORMAL_CLEARING",
                      "hangup_cause_code": 4010,
                      "hangup_cause_name": "End Of XML Instructions",
                      "hangup_disposition": "send_bye",
                      "hangup_source": "Vobiz",
                      "id": 18600002,
                      "jitter": 0,
                      "mos": 4.5,
                      "network_addr": "13.203.7.132",
                      "origination_region": "mumbai",
                      "packet_loss": 0,
                      "progress_time": "2026-03-25T07:10:06Z",
                      "region": "ap-south-1",
                      "ring_time": 5,
                      "sip_call_id": "aabbccdd-1234-5678-90ab-cdef12345678",
                      "sip_user_agent": "Vobiz",
                      "start_time": "2026-03-25T07:10:06Z",
                      "streaming_cost": 0,
                      "terminated_to": null,
                      "total_cost": 0.45,
                      "trunk_id": null,
                      "updated_at": "2026-03-25T07:10:15Z",
                      "uuid": "aabbccdd-9999-5678-90ab-cdef12345678"
                    }
                  ],
                  "pagination": {
                    "page": 1,
                    "per_page": 20,
                    "total": 2,
                    "pages": 1,
                    "has_next": false,
                    "has_prev": false
                  },
                  "summary": {
                    "answerRate": 100,
                    "answeredCalls": 2,
                    "avgCallDuration": "7s",
                    "last_call_at": "2026-03-25T07:10:15Z",
                    "totalCalls": 2,
                    "total_billable_seconds": 15,
                    "total_cost": 1,
                    "total_duration_seconds": 15
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/partner/accounts/{customer_auth_id}/numbers": {
      "get": {
        "operationId": "list-customer-numbers",
        "summary": "List customer numbers",
        "description": "Phone numbers currently assigned to a customer account.",
        "tags": [
          "Partner API"
        ],
        "parameters": [
          {
            "name": "customer_auth_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Substring match against the E.164 number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Customer numbers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "per_page": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "account_auth_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "items",
                    "page",
                    "per_page",
                    "total",
                    "account_auth_id"
                  ]
                },
                "example": {
                  "items": [
                    {
                      "id": "aabbccdd-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "e164": "+918012345678",
                      "country": "IN",
                      "region": "Karnataka",
                      "capabilities": {
                        "voice": true,
                        "sms": false,
                        "mms": false,
                        "fax": false
                      },
                      "status": "active",
                      "provider": "",
                      "setup_fee": 100,
                      "monthly_fee": 300,
                      "currency": "INR",
                      "application_id": "20577609616603585",
                      "voice_enabled": true,
                      "tags": [],
                      "purchased_at": "2026-03-25T06:58:38Z",
                      "is_blocked": false,
                      "created_at": "2025-03-31T18:30:00Z",
                      "updated_at": "2026-03-25T06:58:54Z",
                      "is_trial_number": false,
                      "last_billing_date": "2026-03-25T06:58:38Z",
                      "next_billing_date": "2026-04-25T06:58:38Z",
                      "minimum_commitment_months": 0,
                      "aadhaar_verification_required": false,
                      "aadhaar_verified": false,
                      "source": "purchased"
                    },
                    {
                      "id": "11223344-1234-5678-90ab-cdef12345678",
                      "account_id": "MA_XXXXXXXX",
                      "e164": "+919876543210",
                      "country": "IN",
                      "region": "Mumbai",
                      "capabilities": {
                        "voice": true,
                        "sms": false,
                        "mms": false,
                        "fax": false
                      },
                      "status": "active",
                      "provider": "",
                      "setup_fee": 100,
                      "monthly_fee": 200,
                      "currency": "INR",
                      "application_id": "31985999331899218",
                      "voice_enabled": true,
                      "tags": [],
                      "purchased_at": "2026-02-17T10:25:30Z",
                      "is_blocked": false,
                      "created_at": "2026-02-14T09:30:04Z",
                      "updated_at": "2026-02-17T10:29:35Z",
                      "is_trial_number": false,
                      "last_billing_date": "2026-02-17T10:25:30Z",
                      "next_billing_date": "2026-03-17T10:25:30Z",
                      "minimum_commitment_months": 0,
                      "aadhaar_verification_required": false,
                      "aadhaar_verified": false,
                      "source": "purchased"
                    }
                  ],
                  "page": 1,
                  "per_page": 20,
                  "total": 2,
                  "account_auth_id": "MA_XXXXXXXX"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/partner/kyc-sessions": {
      "post": {
        "operationId": "create-kyc-session",
        "summary": "Initiate KYC session",
        "description": "Triggers VoBiz to email a KYC link to the customer. KYC is OTP-based\n(PAN + Aadhaar via DigiLocker for individuals, PAN + GSTIN for\ncompanies). No document uploads required.\n",
        "tags": [
          "Partner API"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "account_auth_id"
                ],
                "properties": {
                  "account_auth_id": {
                    "type": "string",
                    "description": "Customer's auth_id (from create-customer-account).",
                    "example": "MA_ZKITB8Z2"
                  },
                  "flow_type": {
                    "type": "string",
                    "enum": [
                      "email",
                      "redirect"
                    ],
                    "default": "email",
                    "description": "Delivery mode. `email` (default) emails the customer the KYC link.\n`redirect` returns a `widget_url` in the response for immediate redirect.\n"
                  },
                  "customer_email": {
                    "type": "string",
                    "format": "email",
                    "description": "Required when `flow_type` is `email`. Ignored otherwise.",
                    "example": "customer@example.com"
                  },
                  "redirect_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "Required when `flow_type` is `redirect`. After verification the customer's\nbrowser is sent to this URL with query params `session_id`, `status`, `auth_id`.\n",
                    "example": "https://yourapp.com/kyc-complete"
                  },
                  "webhook_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "VoBiz POSTs the KYC result here.",
                    "example": "https://yourapp.com/kyc-webhook"
                  },
                  "expires_in_days": {
                    "type": "integer",
                    "default": 7,
                    "description": "Days before the KYC link expires.",
                    "example": 14
                  },
                  "reminder_schedule": {
                    "type": "array",
                    "description": "Auto reminder emails before expiry. Email flow only.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "trigger": {
                          "type": "string",
                          "enum": [
                            "days_before_expiry"
                          ]
                        },
                        "value": {
                          "type": "integer"
                        }
                      }
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "description": "Free-form key/value object echoed back on GET and webhooks.",
                    "additionalProperties": true,
                    "example": {
                      "customer_ref": "TEST_001",
                      "plan": "starter"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "KYC session created",
            "content": {
              "application/json": {
                "examples": {
                  "email-flow": {
                    "summary": "Email-flow response",
                    "value": {
                      "session_id": "a5f8da3c-b47f-40c3-a3e6-d2c9a0f27065",
                      "account_auth_id": "MA_E31MAU98",
                      "customer_email": "customer@example.com",
                      "email_dispatched_to": "c***@example.com",
                      "kyc_type": null,
                      "status": "email_sent",
                      "expires_at": "2026-05-15T19:37:01.316686Z",
                      "widget_url": null,
                      "kyc_link": null,
                      "message": "KYC email dispatched successfully"
                    }
                  },
                  "redirect-flow": {
                    "summary": "Redirect-flow response",
                    "value": {
                      "session_id": "1a0f7da5-2abb-47bf-a6c3-eb5cff7feda5",
                      "account_auth_id": "MA_E31MAU98",
                      "customer_email": null,
                      "email_dispatched_to": null,
                      "kyc_type": null,
                      "status": "link_ready",
                      "expires_at": "2026-05-15T19:37:01.841263Z",
                      "widget_url": "https://kyc.vobiz.ai/verify?token=kst_cb1b3fda15c0df5cf58a283e47e9eee148ce0b2b87d7c6693f77296612f58f07",
                      "kyc_link": null,
                      "message": "KYC session created - redirect your customer to widget_url to begin."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`account_auth_id` not found, or belongs to a different partner"
          },
          "422": {
            "description": "Validation error (e.g. email flow missing `customer_email`, redirect flow missing `redirect_url`)"
          }
        }
      },
      "get": {
        "operationId": "list-kyc-sessions",
        "summary": "List KYC sessions",
        "tags": [
          "Partner API"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "email_sent",
                "link_ready",
                "opened",
                "in_progress",
                "kyc_completed",
                "revoked"
              ]
            }
          },
          {
            "name": "account_auth_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "size",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sessions list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sessions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "account_auth_id": {
                            "type": "string"
                          },
                          "customer_email": {
                            "type": "string",
                            "nullable": true
                          },
                          "kyc_type": {
                            "type": "string",
                            "nullable": true
                          },
                          "status": {
                            "type": "string"
                          },
                          "expires_at": {
                            "type": "string"
                          },
                          "first_opened_at": {
                            "type": "string",
                            "nullable": true
                          },
                          "completed_at": {
                            "type": "string",
                            "nullable": true
                          },
                          "webhook_url": {
                            "type": "string",
                            "nullable": true
                          },
                          "redirect_url": {
                            "type": "string",
                            "nullable": true
                          },
                          "reminder_schedule": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "integer"
                                },
                                "trigger": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "value",
                                "trigger"
                              ]
                            }
                          },
                          "metadata": {
                            "anyOf": [
                              {
                                "nullable": true
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "plan": {
                                    "type": "string"
                                  },
                                  "customer_ref": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "plan",
                                  "customer_ref"
                                ]
                              }
                            ]
                          },
                          "verified_data": {
                            "anyOf": [
                              {
                                "nullable": true
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "pan_type": {
                                    "type": "string"
                                  },
                                  "pan_number": {
                                    "type": "string"
                                  },
                                  "pan_name_match": {
                                    "type": "boolean"
                                  },
                                  "completed_steps": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  },
                                  "pan_registered_name": {
                                    "type": "string"
                                  },
                                  "gender": {
                                    "type": "string"
                                  },
                                  "address": {
                                    "type": "string"
                                  },
                                  "aadhaar_dob": {
                                    "type": "string"
                                  },
                                  "aadhaar_name": {
                                    "type": "string"
                                  },
                                  "masked_aadhaar": {
                                    "type": "string"
                                  },
                                  "pan_name": {
                                    "type": "string"
                                  }
                                }
                              }
                            ]
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "account_auth_id",
                          "customer_email",
                          "kyc_type",
                          "status",
                          "expires_at",
                          "first_opened_at",
                          "completed_at",
                          "webhook_url",
                          "redirect_url",
                          "reminder_schedule",
                          "metadata",
                          "verified_data",
                          "created_at",
                          "updated_at"
                        ]
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "size": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "sessions",
                    "total",
                    "page",
                    "size"
                  ]
                },
                "example": {
                  "sessions": [
                    {
                      "id": "kycs_aabbccdd1234",
                      "account_auth_id": "MA_XXXXXXXX",
                      "customer_email": null,
                      "kyc_type": null,
                      "status": "opened",
                      "expires_at": "2026-04-08T08:32:48Z",
                      "first_opened_at": "2026-03-25T08:33:01Z",
                      "completed_at": null,
                      "webhook_url": null,
                      "redirect_url": "https://console.vobiz.ai/kyc-complete",
                      "reminder_schedule": [],
                      "metadata": null,
                      "verified_data": null,
                      "created_at": "2026-03-25T08:32:48Z",
                      "updated_at": "2026-03-25T08:33:01Z"
                    },
                    {
                      "id": "kycs_11223344abcd",
                      "account_auth_id": "MA_XXXXXXXX",
                      "customer_email": "admin@example.com",
                      "kyc_type": null,
                      "status": "revoked",
                      "expires_at": "2026-04-24T07:12:48Z",
                      "first_opened_at": null,
                      "completed_at": null,
                      "webhook_url": null,
                      "redirect_url": null,
                      "reminder_schedule": [],
                      "metadata": null,
                      "verified_data": null,
                      "created_at": "2026-03-25T07:12:48Z",
                      "updated_at": "2026-03-25T08:32:48Z"
                    },
                    {
                      "id": "kycs_55667788ef01",
                      "account_auth_id": "MA_YYYYYYYY",
                      "customer_email": "sarah@acme-corp.com",
                      "kyc_type": null,
                      "status": "opened",
                      "expires_at": "2026-04-24T07:07:38Z",
                      "first_opened_at": "2026-03-25T07:07:59Z",
                      "completed_at": null,
                      "webhook_url": null,
                      "redirect_url": null,
                      "reminder_schedule": [],
                      "metadata": null,
                      "verified_data": null,
                      "created_at": "2026-03-25T07:07:38Z",
                      "updated_at": "2026-03-25T07:07:59Z"
                    },
                    {
                      "id": "kycs_99887766abcd",
                      "account_auth_id": "MA_YYYYYYYY",
                      "customer_email": "sarah@acme-corp.com",
                      "kyc_type": "individual",
                      "status": "revoked",
                      "expires_at": "2026-04-23T06:00:52Z",
                      "first_opened_at": "2026-03-24T06:02:17Z",
                      "completed_at": null,
                      "webhook_url": null,
                      "redirect_url": null,
                      "reminder_schedule": [],
                      "metadata": null,
                      "verified_data": {
                        "pan_type": "individual",
                        "pan_number": "GTBPDXXXXX",
                        "pan_name_match": true,
                        "completed_steps": [
                          "pan"
                        ],
                        "pan_registered_name": "Sarah Smith"
                      },
                      "created_at": "2026-03-24T06:00:52Z",
                      "updated_at": "2026-03-25T07:07:38Z"
                    },
                    {
                      "id": "kycs_aabbcc998877",
                      "account_auth_id": "MA_ZZZZZZZZ",
                      "customer_email": "john@example.com",
                      "kyc_type": "individual",
                      "status": "kyc_completed",
                      "expires_at": "2026-04-23T05:45:48Z",
                      "first_opened_at": "2026-03-24T05:46:23Z",
                      "completed_at": "2026-03-24T06:19:52Z",
                      "webhook_url": null,
                      "redirect_url": null,
                      "reminder_schedule": [],
                      "metadata": null,
                      "verified_data": {
                        "gender": "MALE",
                        "address": "221B Baker Street, Mumbai, Maharashtra, 400001, India",
                        "aadhaar_dob": "2001-02-05",
                        "aadhaar_name": "John Doe",
                        "masked_aadhaar": "9942"
                      },
                      "created_at": "2026-03-24T05:45:48Z",
                      "updated_at": "2026-03-24T06:19:52Z"
                    },
                    {
                      "id": "kycs_5566778899aa",
                      "account_auth_id": "MA_WWWWWWWW",
                      "customer_email": "demo@example.com",
                      "kyc_type": null,
                      "status": "email_sent",
                      "expires_at": "2026-04-22T04:11:19Z",
                      "first_opened_at": null,
                      "completed_at": null,
                      "webhook_url": null,
                      "redirect_url": null,
                      "reminder_schedule": [],
                      "metadata": null,
                      "verified_data": null,
                      "created_at": "2026-03-23T04:11:19Z",
                      "updated_at": "2026-03-23T04:11:19Z"
                    },
                    {
                      "id": "kycs_99aabbccdd11",
                      "account_auth_id": "MA_VVVVVVVV",
                      "customer_email": "demo@example.com",
                      "kyc_type": "individual",
                      "status": "in_progress",
                      "expires_at": "2026-04-19T12:12:58Z",
                      "first_opened_at": "2026-03-20T12:13:18Z",
                      "completed_at": null,
                      "webhook_url": null,
                      "redirect_url": null,
                      "reminder_schedule": [],
                      "metadata": null,
                      "verified_data": {
                        "pan_type": "individual",
                        "pan_number": "IMBPKXXXXX",
                        "pan_name_match": true,
                        "completed_steps": [
                          "pan"
                        ],
                        "pan_registered_name": "John Doe"
                      },
                      "created_at": "2026-03-20T12:12:58Z",
                      "updated_at": "2026-03-20T12:52:21Z"
                    }
                  ],
                  "total": 7,
                  "page": 1,
                  "size": 20
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/partner/kyc-sessions/{session_id}": {
      "get": {
        "operationId": "get-kyc-session",
        "summary": "Get KYC session",
        "tags": [
          "Partner API"
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Session detail"
          }
        }
      },
      "delete": {
        "operationId": "revoke-kyc-session",
        "summary": "Revoke KYC session",
        "description": "Cancels an outstanding KYC session. Customer can no longer use the link.",
        "tags": [
          "Partner API"
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "example": "Wrong email - creating new session"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Session revoked",
            "content": {
              "application/json": {
                "example": {
                  "message": "Session revoked",
                  "session_id": "1a0f7da5-2abb-47bf-a6c3-eb5cff7feda5"
                }
              }
            }
          },
          "409": {
            "description": "Session already in a terminal status (`revoked` or `kyc_completed`)"
          }
        }
      }
    },
    "/api/v1/partner/kyc-sessions/{session_id}/resend": {
      "post": {
        "operationId": "resend-kyc-session",
        "summary": "Resend KYC email",
        "description": "Re-dispatches the KYC link to the customer. Rate-limited to once per 30 minutes.",
        "tags": [
          "Partner API"
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Email resent (only available 30 minutes after the previous send)"
          },
          "400": {
            "description": "Session is a redirect-flow session - resend does not apply"
          },
          "409": {
            "description": "Session is in a terminal status (`revoked` or `kyc_completed`)"
          },
          "429": {
            "description": "Rate limit hit. The initial `POST /kyc-sessions` itself starts the 30-minute\ncooldown clock - calling `/resend` immediately after creation returns 429.\nThe message includes the precise remaining seconds.\n",
            "content": {
              "application/json": {
                "example": {
                  "error": "HTTPError",
                  "message": "Email was sent recently. Please wait 1799 seconds before resending.",
                  "status_code": 429
                }
              }
            }
          }
        }
      }
    }
  }
}