{
  "openapi": "3.0.0",
  "info": {
    "description": "Wholesale telecom platform API — SIP trunking, numbers, porting, messaging, and billing. All customer endpoints accept an API key (Bearer rk_...) or a session cookie; responses use the {success, data} / {success:false, error:{code,message}} envelope.",
    "title": "WARP Customer API",
    "contact": {},
    "version": "1.0.0"
  },
  "paths": {
    "/v1/account/capacity": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the authenticated customer's per-class × per-direction CPS and channel capacity ceilings. Errors: NO_ACTIVE_CUSTOMER, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Account"
        ],
        "summary": "Get my account capacity",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.AccountCapacityResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/balance": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the current balance snapshot for the authenticated customer (current balance, credit limit, available, suspension flag, currency). Errors: NO_ACTIVE_CUSTOMER, INTERNAL_ERROR.",
        "tags": [
          "Customer/Billing"
        ],
        "summary": "Get your account balance",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.Balance"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/ledger": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns your ledger journal (most recent first). limit defaults to 100; values outside (0, 500] are ignored. Errors: NO_ACTIVE_CUSTOMER, INTERNAL_ERROR.",
        "tags": [
          "Customer/Billing"
        ],
        "summary": "List your ledger transactions",
        "parameters": [
          {
            "description": "Max rows (1-500)",
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.LedgerTransaction"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/cdr/details": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns paginated call detail records for a date range with optional filters. Errors: INVALID_DATE, CDR_QUERY_FAILED.",
        "tags": [
          "Customer/Analytics"
        ],
        "summary": "List call detail records",
        "parameters": [
          {
            "description": "Start date (YYYY-MM-DD)",
            "name": "start_date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "End date (YYYY-MM-DD, inclusive)",
            "name": "end_date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Operator TZ offset (JS getTimezoneOffset())",
            "name": "tz_offset_minutes",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Page (1-based)",
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "description": "Page size (1-500)",
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50
            }
          },
          {
            "description": "inbound | outbound",
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by disposition",
            "name": "disposition",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by ANI",
            "name": "ani",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by DNI",
            "name": "dni",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.ListResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.CallDetail"
                                  }
                                }
                              }
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/cdr/export": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Streams up to 10,000 call detail records for a date range as a CSV download. Failure responses (before the stream starts) are JSON. Errors: INVALID_DATE, CDR_EXPORT_FAILED.",
        "tags": [
          "Customer/Analytics"
        ],
        "summary": "Export call detail records as CSV",
        "parameters": [
          {
            "description": "Start date (YYYY-MM-DD)",
            "name": "start_date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "End date (YYYY-MM-DD, inclusive)",
            "name": "end_date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Operator TZ offset (JS getTimezoneOffset())",
            "name": "tz_offset_minutes",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "inbound | outbound",
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by disposition",
            "name": "disposition",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by ANI",
            "name": "ani",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by DNI",
            "name": "dni",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CSV export",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/csv": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/csv": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/csv": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/cdr/statistics": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns aggregated CDR metrics for a date range. Errors: INVALID_DATE, CDR_QUERY_FAILED.",
        "tags": [
          "Customer/Analytics"
        ],
        "summary": "Get call statistics",
        "parameters": [
          {
            "description": "Start date (YYYY-MM-DD)",
            "name": "start_date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "End date (YYYY-MM-DD, inclusive)",
            "name": "end_date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Operator TZ offset (JS getTimezoneOffset())",
            "name": "tz_offset_minutes",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.CallStatistics"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/cdr/trends": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns time-bucketed CDR aggregates for charts. Errors: INVALID_DATE, INVALID_GRANULARITY, CDR_QUERY_FAILED.",
        "tags": [
          "Customer/Analytics"
        ],
        "summary": "Get call trend data",
        "parameters": [
          {
            "description": "Start date (YYYY-MM-DD)",
            "name": "start_date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "End date (YYYY-MM-DD, inclusive)",
            "name": "end_date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Operator TZ offset (JS getTimezoneOffset())",
            "name": "tz_offset_minutes",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "hour | day | week",
            "name": "granularity",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "day"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.TrendDataPoint"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/me/balance": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns your prepaid balance and currency. 404 when no active customer is bound to the session. POSTPAID customers see prepaid_balance=0. Errors: NO_ACTIVE_CUSTOMER, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Account"
        ],
        "summary": "Get your prepaid balance",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.balancePayload"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/me/utilization": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns your aggregate CPS/channel capacity and current concurrent usage across trunk groups. counters_available is false (and the current_* fields null) when live counters cannot be read. Errors: NO_ACTIVE_CUSTOMER, INTERNAL_ERROR.",
        "tags": [
          "Customer/Account"
        ],
        "summary": "Get your capacity utilization",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.utilizationPayload"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{id}/api-keys": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Lists this customer's API keys with their scopes (secrets are never returned — only prefixes). Requires the api_keys:read scope. Errors: FORBIDDEN, INTERNAL_ERROR.",
        "tags": [
          "Customer/ApiKeys"
        ],
        "summary": "List API keys",
        "parameters": [
          {
            "description": "Customer UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Include revoked keys",
            "name": "include_revoked",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIKey"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{id}/api-keys/audit": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the most recent 100 audit events across ALL of this customer's API keys. Requires the api_keys:read scope. Errors: FORBIDDEN, INTERNAL_ERROR.",
        "tags": [
          "Customer/ApiKeys"
        ],
        "summary": "Customer-wide API key audit trail",
        "parameters": [
          {
            "description": "Customer UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIKeyAudit"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{id}/api-keys/{keyId}": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns one API key's metadata and scopes (never the secret). Requires the api_keys:read scope. Errors: INVALID_ID, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/ApiKeys"
        ],
        "summary": "Get an API key",
        "parameters": [
          {
            "description": "Customer UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "API key UUID",
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.APIKeyWithScopesResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{id}/api-keys/{keyId}/audit": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the most recent 100 audit events (create/rotate/revoke/auth activity) for one API key. Requires the api_keys:read scope. Errors: INVALID_ID, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/ApiKeys"
        ],
        "summary": "API key audit trail",
        "parameters": [
          {
            "description": "Customer UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "API key UUID",
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIKeyAudit"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{id}/members": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Lists every user holding a role in this customer, alphabetical by email. Requires the team:read scope. Errors: FORBIDDEN, INTERNAL_ERROR.",
        "tags": [
          "Customer/Team"
        ],
        "summary": "List team members",
        "parameters": [
          {
            "description": "Customer UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.MemberEntry"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{id}/members/{userId}": {
      "delete": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Removes a user's membership (role assignment) from this customer and invalidates their sessions. You cannot remove yourself. Requires the team:write scope. Errors: INVALID_USER_ID, VALIDATION_ERROR, INTERNAL_ERROR.",
        "tags": [
          "Customer/Team"
        ],
        "summary": "Remove a team member",
        "parameters": [
          {
            "description": "Customer UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "User UUID",
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "*/*": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "*/*": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "*/*": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{id}/members/{userId}/role": {
      "put": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Assigns a role (system or customer-owned, never superadmin) to a member of this customer. The caller must hold every scope the role grants (no privilege escalation). Requires the team:write scope. Errors: INVALID_USER_ID, INVALID_PAYLOAD, NOT_FOUND, ROLE_MISMATCH, SCOPE_NOT_GRANTABLE, INTERNAL_ERROR.",
        "tags": [
          "Customer/Team"
        ],
        "summary": "Set a member's role",
        "parameters": [
          {
            "description": "Customer UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "User UUID",
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.setMemberRoleRequest"
              }
            }
          },
          "description": "Role to assign",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.MemberRoleSetResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{id}/roles": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Lists the system roles plus this customer's custom roles. Requires the team:read scope. Errors: FORBIDDEN, INTERNAL_ERROR.",
        "tags": [
          "Customer/Team"
        ],
        "summary": "List roles",
        "parameters": [
          {
            "description": "Customer UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.Role"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Creates a customer-owned role with the given scope set. Scopes must be in the registry, non-superadmin, and held by the caller (no privilege escalation). Requires the team:write scope. Errors: INVALID_PAYLOAD, SCOPE_NOT_GRANTABLE, CONFLICT, INTERNAL_ERROR.",
        "tags": [
          "Customer/Team"
        ],
        "summary": "Create a custom role",
        "parameters": [
          {
            "description": "Customer UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.createRoleRequest"
              }
            }
          },
          "description": "Role definition",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.RoleCreatedResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{id}/roles/{roleId}": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns one role (system or customer-owned) with its scope list. Requires the team:read scope. Errors: INVALID_ID, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Team"
        ],
        "summary": "Get a role",
        "parameters": [
          {
            "description": "Customer UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Role UUID",
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.RoleWithScopes"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Deletes a customer-owned role. Fails when the role is still assigned to any user or is a system role. Requires the team:write scope. Errors: INVALID_ID, FORBIDDEN, NOT_FOUND, CONFLICT, INTERNAL_ERROR.",
        "tags": [
          "Customer/Team"
        ],
        "summary": "Delete a custom role",
        "parameters": [
          {
            "description": "Customer UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Role UUID",
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "*/*": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "*/*": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "*/*": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "*/*": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Updates display name, description, and/or the scope set of a customer-owned role. System roles are immutable. Scope changes fan out session invalidation to affected users. Requires the team:write scope. Errors: INVALID_ID, INVALID_PAYLOAD, FORBIDDEN, NOT_FOUND, SCOPE_NOT_GRANTABLE, INTERNAL_ERROR.",
        "tags": [
          "Customer/Team"
        ],
        "summary": "Update a custom role",
        "parameters": [
          {
            "description": "Customer UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Role UUID",
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.updateRoleRequest"
              }
            }
          },
          "description": "Fields to update",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.RoleUpdatedResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{id}/roles/{roleId}/duplicate": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Creates a new customer-owned role copying the source role's scope set (source may be a system role). The caller must hold every copied scope. Requires the team:write scope. Errors: INVALID_ID, INVALID_PAYLOAD, NOT_FOUND, SCOPE_NOT_GRANTABLE, CONFLICT, INTERNAL_ERROR.",
        "tags": [
          "Customer/Team"
        ],
        "summary": "Duplicate a role",
        "parameters": [
          {
            "description": "Customer UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Source role UUID",
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.duplicateRoleRequest"
              }
            }
          },
          "description": "New role identity",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.RoleCreatedResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/dashboard/stats": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns key dashboard metrics (customer counts, revenue, growth), scoped to the caller's accessible customers.",
        "tags": [
          "Customer/Analytics"
        ],
        "summary": "Get dashboard statistics",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.DashboardStats"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/invoices": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Lists your invoices, newest period first. Errors: NO_ACTIVE_CUSTOMER, INTERNAL_ERROR.",
        "tags": [
          "Customer/Billing"
        ],
        "summary": "List invoices",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.InvoiceListItem"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/invoices/{id}": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns one of your invoices in full (header, lines, tax lines, applications). 404 when the invoice is not found or not owned by you. Errors: NO_ACTIVE_CUSTOMER, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Billing"
        ],
        "summary": "Get an invoice",
        "parameters": [
          {
            "description": "Invoice id",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.InvoiceDetail"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/invoices/{id}/html": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns one of your invoices as a branded HTML document. Failure responses are JSON. 404 when not found or not owned. Errors: NO_ACTIVE_CUSTOMER, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Billing"
        ],
        "summary": "Render your invoice as HTML",
        "parameters": [
          {
            "description": "Invoice id",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Branded invoice HTML",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/html": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/html": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/html": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/invoices/{id}/pdf": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Renders one of your invoices to PDF on demand. Failure responses are JSON. 503 when the PDF render service is unconfigured or fails. Errors: NO_ACTIVE_CUSTOMER, NOT_FOUND, GATEWAY_UNAVAILABLE.",
        "tags": [
          "Customer/Billing"
        ],
        "summary": "Render your invoice as PDF",
        "parameters": [
          {
            "description": "Invoice id",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invoice PDF",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/pdf": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/pdf": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/pdf": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messages": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Lists the active customer's messages (inbound and outbound), most\nrecent first. Filter by direction and status.\n\nErrors: NO_ACTIVE_CUSTOMER, UNAUTHORIZED (401); INTERNAL_ERROR (500).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "List messages",
        "parameters": [
          {
            "description": "Page (1-based)",
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "description": "Page size (max 100)",
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "description": "Filter by direction",
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "INBOUND",
                "OUTBOUND"
              ]
            }
          },
          {
            "description": "Filter by delivery status (e.g. queued, sent, delivered, failed)",
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.ListResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.Message"
                                  }
                                }
                              }
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Sends an outbound SMS from one of your assigned numbers. The\n`from` number must be assigned to your account and enrolled in an\napproved 10DLC campaign, otherwise the request is rejected.\n\nSupply an `Idempotency-Key` header to make retries safe: a repeated\nrequest with the same key returns the original message with HTTP 200\ninstead of creating a duplicate (a first successful create returns 201).\n\nErrors: NO_ACTIVE_CUSTOMER, UNAUTHORIZED (401); INVALID_PAYLOAD,\nMISSING_PARAM, INVALID_TO (400); FROM_NOT_OWNED (403, the `from`\nnumber is not assigned to your account); CAMPAIGN_NOT_APPROVED (403,\nthe `from` number is not enrolled in an approved 10DLC campaign);\nINTERNAL_ERROR (500).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Send an SMS message",
        "parameters": [
          {
            "description": "Client-supplied key that makes retries idempotent",
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.createMessageRequest"
              }
            }
          },
          "description": "Message to send",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Idempotent replay — the message for this Idempotency-Key already exists",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.Message"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "201": {
            "description": "Message created and handed off to the messaging gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.Message"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "FROM_NOT_OWNED or CAMPAIGN_NOT_APPROVED",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messages/stats": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns aggregate message counts for the active customer: overall\ntotals (total, inbound, outbound, delivered, failed) plus a\nper-campaign breakdown.\n\nErrors: NO_ACTIVE_CUSTOMER, UNAUTHORIZED (401); INTERNAL_ERROR (500).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Get message statistics",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.MessageStats"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messages/{id}": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Retrieves a single message owned by the active customer by its\nWARP message UUID.\n\nErrors: NO_ACTIVE_CUSTOMER, UNAUTHORIZED (401); INVALID_ID (400);\nNOT_FOUND (404); INTERNAL_ERROR (500).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Get a message",
        "parameters": [
          {
            "description": "Message UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.Message"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/brands": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Lists the active customer's registered 10DLC brands. Each item in\n`data.items` is a snake_case TCR brand object proxied from the\nmessaging backend (fields are normalized from the upstream\ncamelCase); shape follows the TCR brand model.",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "List 10DLC brands",
        "parameters": [
          {
            "description": "Page (1-based)",
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "description": "Page size (max 100)",
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data.items is an array of snake_case TCR brand objects",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.ListResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "TNIQ_ERROR — messaging backend unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Registers a new 10DLC brand for the active customer and records\nWARP ownership. `data` is the created snake_case TCR brand object.\n\nErrors: INVALID_PAYLOAD, TNIQ_VALIDATION (400); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Create 10DLC brand",
        "requestBody": {
          "$ref": "#/components/requestBodies/github_com_ringer-warp_api-gateway_internal_tniq.BrandPayload"
        },
        "responses": {
          "201": {
            "description": "data is the created snake_case TCR brand object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/brands/link": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Links a brand that already exists at TCR into the active customer's\naccount. `data` is the linked snake_case TCR brand object.\n\nErrors: INVALID_PAYLOAD (400); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Link an existing TCR brand into this account",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.linkBrandRequest"
              }
            }
          },
          "description": "TCR brand ID",
          "required": true
        },
        "responses": {
          "200": {
            "description": "data is the linked snake_case TCR brand object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/brands/lookup/{tcrBrandId}": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Reads brand details from TCR by TCR brand ID, without requiring the\nbrand to be registered in this account. `data` is a snake_case TCR\nbrand object.\n\nErrors: NOT_FOUND (404); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Look up a TCR brand directly",
        "parameters": [
          {
            "description": "TCR brand ID",
            "name": "tcrBrandId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data is a snake_case TCR brand object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/brands/{id}": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Retrieves a single 10DLC brand owned by the active customer. `data`\nis a snake_case TCR brand object proxied from the messaging backend.\n\nErrors: NOT_FOUND (404, includes cross-tenant access); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Get brand by ID",
        "parameters": [
          {
            "description": "Brand ID (messaging-backend UUID)",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data is a snake_case TCR brand object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Full replace of a 10DLC brand owned by the active customer (PUT\nsemantics). `data` is the updated snake_case TCR brand object.\n\nErrors: INVALID_PAYLOAD (400); NOT_FOUND (404); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Update 10DLC brand",
        "parameters": [
          {
            "description": "Brand ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/github_com_ringer-warp_api-gateway_internal_tniq.BrandPayload"
        },
        "responses": {
          "200": {
            "description": "data is the updated snake_case TCR brand object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Deletes a 10DLC brand owned by the active customer.\n\nErrors: NOT_FOUND (404); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Delete 10DLC brand",
        "parameters": [
          {
            "description": "Brand ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Brand deleted"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/campaigns": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Lists the active customer's 10DLC campaigns, optionally filtered by\nparent brand. Each item in `data.items` is a snake_case TCR campaign\nobject proxied from the messaging backend.",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "List 10DLC campaigns",
        "parameters": [
          {
            "description": "Page (1-based)",
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "description": "Page size (max 100)",
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "description": "Filter by parent brand ID",
            "name": "brand_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data.items is an array of snake_case TCR campaign objects",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.ListResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Registers a new 10DLC campaign for the active customer and records\nWARP ownership of the campaign and its parent brand. `data` is the\ncreated snake_case TCR campaign object.\n\nErrors: INVALID_PAYLOAD, TNIQ_VALIDATION (400); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Create 10DLC campaign",
        "requestBody": {
          "$ref": "#/components/requestBodies/github_com_ringer-warp_api-gateway_internal_tniq.CampaignPayload"
        },
        "responses": {
          "201": {
            "description": "data is the created snake_case TCR campaign object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/campaigns/link": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Links a campaign that already exists at TCR into the active\ncustomer's account. `data` is the linked snake_case TCR campaign\nobject.\n\nErrors: INVALID_PAYLOAD (400); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Link an existing TCR campaign into this account",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.linkCampaignRequest"
              }
            }
          },
          "description": "TCR campaign ID",
          "required": true
        },
        "responses": {
          "200": {
            "description": "data is the linked snake_case TCR campaign object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/campaigns/lookup/{tcrCampaignId}": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Reads campaign details from TCR by TCR campaign ID, without\nrequiring the campaign to be registered in this account. `data` is a\nsnake_case TCR campaign object.\n\nErrors: NOT_FOUND (404); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Look up a TCR campaign directly",
        "parameters": [
          {
            "description": "TCR campaign ID",
            "name": "tcrCampaignId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data is a snake_case TCR campaign object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/campaigns/{id}": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Retrieves a single 10DLC campaign owned by the active customer.\n`data` is a snake_case TCR campaign object.\n\nErrors: NOT_FOUND (404, includes cross-tenant access); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Get campaign by ID",
        "parameters": [
          {
            "description": "Campaign ID (messaging-backend UUID)",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data is a snake_case TCR campaign object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Updates a 10DLC campaign owned by the active customer. `data` is the\nupdated snake_case TCR campaign object.\n\nErrors: INVALID_PAYLOAD (400); NOT_FOUND (404); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Update 10DLC campaign",
        "parameters": [
          {
            "description": "Campaign ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/github_com_ringer-warp_api-gateway_internal_tniq.CampaignPayload"
        },
        "responses": {
          "200": {
            "description": "data is the updated snake_case TCR campaign object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/campaigns/{id}/cnp": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Elects a Connectivity Partner / DCA for a campaign owned by the\nactive customer. The request body is a free-form JSON object passed\nthrough to the messaging backend; `data` is the resulting snake_case\nTCR campaign object.\n\nErrors: INVALID_PAYLOAD (400); NOT_FOUND (404); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Elect a connectivity partner (CNP) for a campaign",
        "parameters": [
          {
            "description": "Campaign ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          },
          "description": "CNP election payload (backend-defined)",
          "required": true
        },
        "responses": {
          "200": {
            "description": "data is a snake_case TCR campaign object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/campaigns/{id}/mno-status": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns per-MNO (mobile carrier) registration status for a campaign\nowned by the active customer. `data` is a snake_case object proxied\nfrom the messaging backend.\n\nErrors: NOT_FOUND (404); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Get campaign MNO status",
        "parameters": [
          {
            "description": "Campaign ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data is a snake_case per-MNO status object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/campaigns/{id}/nudge": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Prompts the elected Connectivity Partner to re-review a campaign\nowned by the active customer. The request body is optional. Returns\n202 Accepted with no body.\n\nErrors: NOT_FOUND (404); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Nudge the connectivity partner (CNP) for a campaign",
        "parameters": [
          {
            "description": "Campaign ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          },
          "description": "Optional nudge payload"
        },
        "responses": {
          "202": {
            "description": "Nudge accepted"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "*/*": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "*/*": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/campaigns/{id}/numbers": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Lists telephone numbers attached to a campaign owned by the active\ncustomer. Each item in `data.items` is a snake_case object proxied\nfrom the messaging backend.\n\nErrors: NOT_FOUND (404); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "List numbers attached to a campaign",
        "parameters": [
          {
            "description": "Campaign ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page (1-based)",
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "description": "Page size (max 500)",
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data.items is an array of snake_case campaign-number objects",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.ListResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Attaches telephone numbers to a campaign owned by the active\ncustomer. Best-effort proxies to the messaging backend, then writes\nthe WARP-authoritative association for each TN the customer owns.\nReturns 200 with per-TN assigned/failed lists (this response is NOT\nwrapped in the standard envelope).\n\nErrors: INVALID_PAYLOAD (400); NOT_FOUND (404, campaign not owned);\nTNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Attach numbers to a campaign",
        "parameters": [
          {
            "description": "Campaign ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.campaignNumbersRequest"
              }
            }
          },
          "description": "Phone numbers to attach",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal_handlers.assignCampaignNumbersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Detaches telephone numbers from a campaign owned by the active\ncustomer. Best-effort proxies to the messaging backend, then clears\nthe WARP-authoritative association for each owned TN. Returns 200\nwith per-TN removed/failed lists (this response is NOT wrapped in the\nstandard envelope).\n\nErrors: INVALID_PAYLOAD (400); NOT_FOUND (404, campaign not owned);\nTNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Detach numbers from a campaign",
        "parameters": [
          {
            "description": "Campaign ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.campaignNumbersRequest"
              }
            }
          },
          "description": "Phone numbers to detach",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal_handlers.removeCampaignNumbersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/campaigns/{id}/resubmit": {
      "put": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Resubmits a 10DLC campaign owned by the active customer for review.\n`data` is the resulting snake_case TCR campaign object.\n\nErrors: NOT_FOUND (404); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Resubmit a 10DLC campaign",
        "parameters": [
          {
            "description": "Campaign ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data is a snake_case TCR campaign object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/campaigns/{id}/sharing": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the connectivity-partner (CNP) sharing status for a campaign\nowned by the active customer. `data` is a snake_case object proxied\nfrom the messaging backend.\n\nErrors: NOT_FOUND (404); TNIQ_ERROR (502).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Get campaign sharing status",
        "parameters": [
          {
            "description": "Campaign ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data is a snake_case sharing-status object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/carriers": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the mobile network operators (MNOs) relevant to 10DLC.\nServed from the messaging backend when available, otherwise from a\nstatic WARP-maintained fallback.",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Get mobile carriers (MNOs)",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.MNOInfo"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/dcas": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the connectivity partners (DCA/CNPs) WARP elects against.\nThis surfaces only the common ones rather than the full upstream\npartner list.",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Get Direct Connect Aggregators (CNPs)",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.DCAInfo"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/entity-types": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the valid brand entity types (e.g. PRIVATE_PROFIT,\nNON_PROFIT). Served from the messaging backend when available,\notherwise from a static WARP-maintained fallback.",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Get brand entity types",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.EntityTypeInfo"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/numbers": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Lists every active DID owned by the active customer joined to its\nmessaging association: attached campaign/brand, messaging status,\nMMS enablement, and whether a per-TN inbound webhook is configured\n(`has_webhook` — true when `numbers.sms_usages.inbound_webhook_url`\nis set for that number).\n\nErrors: NO_ACTIVE_CUSTOMER, UNAUTHORIZED (401); INTERNAL_ERROR (500).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "List messaging-enabled numbers",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.ListResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.MessagingNumber"
                                  }
                                }
                              }
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/throughput-estimate": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Estimates messaging throughput (messages/sec, daily cap) and a\nrecommendation for a brand given its trust score and vetting status.\n`data` contains trust_score, vetted, messages_per_second, daily_cap,\nand recommendation.\n\nErrors: MISSING_PARAM, INVALID_PARAM (400).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Get throughput estimate based on trust score",
        "parameters": [
          {
            "description": "Brand trust score (0-100)",
            "name": "trust_score",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Is the brand externally vetted",
            "name": "vetted",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data is a throughput-estimate object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/use-case-requirements": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the submission requirements (sample count, opt-in rules,\napproval difficulty, notes) for a given campaign use case. `data` is\na free-form object whose keys depend on the use case.\n\nErrors: MISSING_PARAM, INVALID_USE_CASE (400).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Get use case submission requirements",
        "parameters": [
          {
            "description": "Use case code (e.g. MARKETING, 2FA)",
            "name": "use_case",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "data is a use-case-requirements object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/use-cases": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the list of valid 10DLC campaign use cases (served from a\nstatic WARP-maintained list; the upstream enum is not currently\nexposed).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Get campaign use cases",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.UseCaseInfo"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/messaging/verticals": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the valid brand industry verticals (served from a static\nWARP-maintained list; the upstream enum is not currently exposed).",
        "tags": [
          "Customer/Messaging"
        ],
        "summary": "Get industry verticals",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.VerticalInfo"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/network/ingress-ips": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the customer-facing SIP edge servers (UDP/TCP/TLS hosts, IPs, and ports) to configure a trunk against.",
        "tags": [
          "Customer/Network"
        ],
        "summary": "WARP ingress SIP servers",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.CustomerIngressIPs"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/network/vendor-ips": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the WARP egress/origination IPs a customer must whitelist for symmetric SIP signaling.",
        "tags": [
          "Customer/Network"
        ],
        "summary": "WARP origination IPs",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.VendorOriginationIPsResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/numbers": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Lists the customer's telephone numbers with voice/SMS configuration state. Filterable by status, type, and configuration flags.",
        "tags": [
          "Customer/Numbers"
        ],
        "summary": "List numbers",
        "parameters": [
          {
            "description": "Page (1-based)",
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "description": "Page size",
            "name": "size",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50
            }
          },
          {
            "description": "active | held | released | all",
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "did | tfn",
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "TN or metadata search",
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by voice configuration",
            "name": "voice_configured",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Filter by SMS configuration",
            "name": "sms_configured",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.NumbersPage"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/numbers/bulk-assign": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Procures and assigns up to 200 numbers in one idempotent batch. Requires a UUID Idempotency-Key header (reused as procurement_request_id). Per-TN failures do not abort the batch. Errors: INVALID_REQUEST, MISSING_IDEMPOTENCY_KEY, INVALID_IDEMPOTENCY_KEY, TRUNK_UNOWNED (whole-request 403 on default_trunk_id).",
        "tags": [
          "Customer/Numbers"
        ],
        "summary": "Bulk assign numbers",
        "parameters": [
          {
            "description": "Batch idempotency key (UUID)",
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.BulkAssignRequest"
              }
            }
          },
          "description": "Batch assignment request",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_services.BulkAssignResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/numbers/bulk-route": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Assigns up to 200 held numbers to a single voice trunk-group in one request. Idempotent at the SQL level. Errors: INVALID_REQUEST, TRUNK_UNOWNED (whole-request 403).",
        "tags": [
          "Customer/Numbers"
        ],
        "summary": "Bulk route numbers to a trunk",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.BulkRouteRequest"
              }
            }
          },
          "description": "Numbers and target trunk",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_services.BulkAssignResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/numbers/search": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Searches the upstream inventory for purchasable telephone numbers by area code, rate center, locality, or pattern. Returns a paginated list of candidates. Errors: TNIQ_UPSTREAM_ERROR.",
        "tags": [
          "Customer/Numbers"
        ],
        "summary": "Search available numbers",
        "parameters": [
          {
            "description": "Number type",
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "did"
            }
          },
          {
            "description": "Area code (NPA)",
            "name": "npa",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exchange (NXX)",
            "name": "nxx",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "State (2-letter)",
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "City",
            "name": "city",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Locality",
            "name": "locality",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Rate center",
            "name": "rate_center",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Digit pattern",
            "name": "pattern",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Last-4 prefix",
            "name": "last_4_prefix",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page (1-based)",
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "description": "Page size",
            "name": "size",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_services.SearchResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/numbers/{tn}": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns one telephone number with its voice and SMS usage configuration.",
        "tags": [
          "Customer/Numbers"
        ],
        "summary": "Get a number",
        "parameters": [
          {
            "description": "Telephone number (10 or 11 digit)",
            "name": "tn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.AssignmentWithUsages"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Updates the friendly name and/or description on an owned number. Errors: INVALID_REQUEST, TN_NOT_OWNED.",
        "tags": [
          "Customer/Numbers"
        ],
        "summary": "Update number metadata",
        "parameters": [
          {
            "description": "Telephone number",
            "name": "tn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.UpdateMetadataRequest"
              }
            }
          },
          "description": "Metadata fields",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.Assignment"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/numbers/{tn}/assign": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Procures a telephone number from inventory and assigns it to the active customer. Idempotent via the Idempotency-Key header. Errors: TN_ALREADY_ASSIGNED, TN_UNAVAILABLE, TNIQ_UPSTREAM_ERROR.",
        "tags": [
          "Customer/Numbers"
        ],
        "summary": "Assign a number",
        "parameters": [
          {
            "description": "Telephone number (10 or 11 digit)",
            "name": "tn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.AssignNumberRequest"
              }
            }
          },
          "description": "Optional friendly name / description"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.AssignmentWithUsages"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "410": {
            "description": "Gone",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/numbers/{tn}/port-out-pin": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Reports whether a port-out PIN is set on the number and, when locked out after failed verify attempts, the lock-expiry timestamp. The PIN hash is never returned. Response is bare (no success/data envelope). Errors: TN_NOT_OWNED.",
        "tags": [
          "Customer/Numbers"
        ],
        "summary": "Get port-out PIN status",
        "parameters": [
          {
            "description": "Telephone number",
            "name": "tn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal_handlers.PortOutPINStatusResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Sets the customer-chosen 4–10 digit port-out PIN on an owned number (hashed at rest; resets the failed-attempt lock). Requires step-up MFA. Response is bare (no envelope). Errors: INVALID_REQUEST, INVALID_PIN, TN_NOT_OWNED.",
        "tags": [
          "Customer/Numbers"
        ],
        "summary": "Set port-out PIN",
        "parameters": [
          {
            "description": "Telephone number",
            "name": "tn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.setPINReq"
              }
            }
          },
          "description": "PIN (4–10 digits)",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal_handlers.PortOutPINSetResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Clears the port-out PIN on an owned number (idempotent). Requires step-up MFA. Returns 204 No Content on success. Errors: TN_NOT_OWNED.",
        "tags": [
          "Customer/Numbers"
        ],
        "summary": "Clear port-out PIN",
        "parameters": [
          {
            "description": "Telephone number",
            "name": "tn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "PIN cleared"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "*/*": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "*/*": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/numbers/{tn}/release": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Releases a telephone number back to inventory. Errors: TN_NOT_OWNED, POI_LOCKED (number is a POI fallback ANI), TNIQ_UPSTREAM_ERROR.",
        "tags": [
          "Customer/Numbers"
        ],
        "summary": "Release a number",
        "parameters": [
          {
            "description": "Telephone number",
            "name": "tn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.ReleaseNumberRequest"
              }
            }
          },
          "description": "Optional release reason"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.ReleaseNumberResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/numbers/{tn}/sms": {
      "delete": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Removes the SMS usage row for an owned number. Errors: TN_NOT_OWNED.",
        "tags": [
          "Customer/Numbers"
        ],
        "summary": "Clear SMS configuration",
        "parameters": [
          {
            "description": "Telephone number",
            "name": "tn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.SmsClearedResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Updates the customer-owned SMS fields (inbound webhook URL/secret, fallback URL, MMS toggle) on an owned number. Requests containing tniq-owned fields are rejected. Errors: INVALID_REQUEST, TN_NOT_OWNED.",
        "tags": [
          "Customer/Numbers"
        ],
        "summary": "Update SMS configuration",
        "parameters": [
          {
            "description": "Telephone number",
            "name": "tn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.UpdateSmsUsageRequest"
              }
            }
          },
          "description": "SMS configuration",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.SmsUsage"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/numbers/{tn}/voice": {
      "delete": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Removes the voice usage row for an owned number, disabling voice routing. Errors: TN_NOT_OWNED.",
        "tags": [
          "Customer/Numbers"
        ],
        "summary": "Clear voice configuration",
        "parameters": [
          {
            "description": "Telephone number",
            "name": "tn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.VoiceClearedResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Sets or updates the voice routing, E911, and CNAM configuration for an owned number. Errors: INVALID_REQUEST, TN_NOT_OWNED.",
        "tags": [
          "Customer/Numbers"
        ],
        "summary": "Update voice configuration",
        "parameters": [
          {
            "description": "Telephone number",
            "name": "tn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.UpdateVoiceUsageRequest"
              }
            }
          },
          "description": "Voice configuration",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.VoiceUsage"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/preview": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Runs an instant Telique-backed portability preview for a free-form list of TNs and groups them by current SPID. No project is created. Errors: NO_ACTIVE_CUSTOMER, INVALID_PAYLOAD, VALIDATION_ERROR, GATEWAY_UNAVAILABLE.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Preview a port-in",
        "requestBody": {
          "$ref": "#/components/requestBodies/internal_handlers.PortingTNsRequest"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.PortingPreviewResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the active customer's port-in requests, most-recent first. Errors: NO_ACTIVE_CUSTOMER, INTERNAL_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "List port-in requests",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.PortRequest"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Creates a draft port-in request (TNIQ project + WARP mirror row). Errors: NO_ACTIVE_CUSTOMER, INVALID_PAYLOAD, TNIQ_ERROR, INTERNAL_ERROR, GATEWAY_UNAVAILABLE.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Create a port-in draft",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.PortingCreateDraftRequest"
              }
            }
          },
          "description": "Draft name + desired due date",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.PortingCreateDraftResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the mirror row, the live TNIQ project, and per-SPID grouped TN details. Reconciles any ACTIVATED TNs into inventory (idempotent). Errors: NO_ACTIVE_CUSTOMER, INVALID_ID, NOT_FOUND, CONFLICT.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Get a port-in request",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.PortingDetailResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Deletes a pre-submission draft (TNIQ project + WARP mirror row). Gated to states with zero submitted TNs. Requires step-up MFA. Errors: NOT_FOUND, CONFLICT, TNIQ_ERROR, INTERNAL_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Delete a port-in draft",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.PortingDeletedResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/activate": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Activates numbers that have reached FOC. Gated on the project being activatable. Requires step-up MFA. Errors: NOT_FOUND, CONFLICT, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Activate ported numbers",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/internal_handlers.PortingTNSelectionRequest"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tniq.BulkActionResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/auto-activation": {
      "put": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Updates the project's auto-activation mode (DISABLED | ASAP | SCHEDULED; scheduled_at required for SCHEDULED). Errors: INVALID_PAYLOAD, NOT_FOUND, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Set auto-activation policy",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.PortingAutoActivationRequest"
              }
            }
          },
          "description": "Auto-activation policy",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.PortingMessageResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/auto-fix": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Applies TNIQ auto-fixes to the project, optionally scoped to an error group or TN subset. Errors: NOT_FOUND, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Auto-fix port-in errors",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.PortingAutoFixRequest"
              }
            }
          },
          "description": "Optional error-group / TN scope"
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.PortingMessageResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/cancel": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Cancels the port. Gated on the project being cancellable. Requires step-up MFA. Errors: NOT_FOUND, CONFLICT, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Cancel a port-in request",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/internal_handlers.PortingTNSelectionRequest"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tniq.BulkActionResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/documents": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Lists the project's documents, optionally filtered by doc_type or tn. signer_ip is present only for operator callers. Errors: NOT_FOUND, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "List port documents",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by document type",
            "name": "doc_type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by TN",
            "name": "tn",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/internal_handlers.PortingDocument"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Uploads a supporting document (LOA | BILL | CSR | OTHER; max 25MB) to the TNIQ project. Errors: INVALID_PAYLOAD, NOT_FOUND, TNIQ_VALIDATION, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Upload a port document",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "doc_type": {
                    "description": "Document type: LOA | BILL | CSR | OTHER",
                    "type": "string"
                  },
                  "file": {
                    "description": "Document file (max 25MB)",
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "doc_type",
                  "file"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.PortingDocument"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/documents/{docId}": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Streams the raw document bytes as an attachment (Content-Type mirrors the stored document). Errors (JSON): NOT_FOUND, TNIQ_VALIDATION, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Download a port document",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Document ID",
            "name": "docId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Document stream",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              },
              "application/pdf": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              },
              "application/pdf": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Deletes a document from the project. Errors: NOT_FOUND, TNIQ_VALIDATION, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Delete a port document",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Document ID",
            "name": "docId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.PortingDeletedResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/error-groups": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the TNIQ validation/port error groups for the project. Errors: NOT_FOUND, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Get port-in error groups",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tniq.ErrorGroup"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/groups/{spid}/details": {
      "put": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Applies losing-carrier account details to every TN in the given SPID group (membership recomputed from live TNIQ details, not client-supplied). Errors: INVALID_PAYLOAD, INVALID_PARAM, NOT_FOUND, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Apply carrier-group details",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Losing-carrier SPID",
            "name": "spid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.PortingGroupDetailsRequest"
              }
            }
          },
          "description": "Carrier-group details",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.PortingUpdatedResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/groups/{spid}/loa": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Renders a WARP-branded LOA PDF for one off-net SPID group and uploads it to the project (superseding prior LOAs for that group). Valid only before the port is submitted; requires attestation=true and all authorizing-party / losing-carrier / signer fields. Requires step-up MFA. Errors: INVALID_PAYLOAD (error.details.fields lists missing fields), INVALID_PARAM, CONFLICT, TNIQ_ERROR, INTERNAL_ERROR, GATEWAY_UNAVAILABLE.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Generate a Letter of Authorization",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Losing-carrier SPID",
            "name": "spid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.loaRequest"
              }
            }
          },
          "description": "LOA fields + attestation",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.PortingDocument"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/history": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the audit timeline for the port request (tenant-scoped, newest-first). Errors: NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Get audit history",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.PortAuditEntry"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/notes": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the port request's notes. Operators see internal notes too; customers see only customer-visibility notes. Errors: NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "List notes",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.Note"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Adds a note to the port request. visibility \"internal\" is operator-only; customers may only post \"customer\" notes. Errors: INVALID_PAYLOAD, FORBIDDEN, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Add a note",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.PortingNoteRequest"
              }
            }
          },
          "description": "Note body + visibility",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.PortingMessageResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/progress": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the live TNIQ progress snapshot for the project. Errors: NOT_FOUND, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Get port-in progress",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tniq.ProjectProgress"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/resubmit": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Resubmits the port; valid only from an error/rejection/exception state. Errors: NOT_FOUND, CONFLICT, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Resubmit a port-in request",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/internal_handlers.PortingTNSelectionRequest"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tniq.BulkActionResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/revalidate": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Sends a REVALIDATE bulk action for selected (or all) TNs. Errors: NOT_FOUND, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Revalidate port-in TNs",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/internal_handlers.PortingTNSelectionRequest"
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tniq.BulkActionResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/statistics": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the live TNIQ statistics for the project and opportunistically refreshes the WARP snapshot. Errors: NOT_FOUND, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Get port-in statistics",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tniq.ProjectStatistics"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/submit": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Submits the port to NPAC. Gated on (1) every off-net SPID group having a current LOA and (2) the project being submittable. Requires step-up MFA. On the LOA gate a 409 is returned whose error.details discriminates the failure: `reason` = \"loa_required\" and `groups` = the array of uncovered {spid, tn_count, reason} entries (reason \"missing\" | \"stale\"). Other 409s carry error.details.reason from the submit blocker. Errors: NOT_FOUND, CONFLICT, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Submit a port-in request",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.PortingMessageResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/supplement": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Changes the desired due date (SUP_DDD); valid only before activation. Errors: INVALID_PAYLOAD, NOT_FOUND, CONFLICT, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Supplement the due date",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.PortingSupplementRequest"
              }
            }
          },
          "description": "New desired due date + optional TN subset",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tniq.BulkActionResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/tns": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Normalises a free-form TN list and uploads it to the TNIQ project. Errors: INVALID_PAYLOAD, VALIDATION_ERROR, NOT_FOUND, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Add TNs to a port-in request",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/internal_handlers.PortingTNsRequest"
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.PortingAddTNsResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/requests/{id}/validate": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Triggers a TNIQ-side re-validation of all TNs in the project. Errors: NOT_FOUND, TNIQ_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Validate a port-in request",
        "parameters": [
          {
            "description": "Port request UUID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.PortingMessageResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/transfer": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Transfers on-net numbers between WARP tenants. Each item authorizes with the owner's port-out PIN; items succeed or fail independently at HTTP 200. Per-TN reasons: not_in_warp_inventory, already_yours, poi_locked, invalid_pin, pin_locked, lookup_failed, transfer_failed, invalid_tn. Requires step-up MFA. Errors: NO_ACTIVE_CUSTOMER, INVALID_PAYLOAD.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Execute an on-net transfer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.PortingTransferRequest"
              }
            }
          },
          "description": "TN + PIN items",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/internal_handlers.transferResult"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/porting/transfer/preview": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "For a free-form TN list, reports which numbers are on-net (an active WARP assignment) and eligible for on-net transfer. The owning customer's BAN is masked. Per-TN reasons: not_in_warp_inventory, already_yours, poi_locked, lookup_failed. Errors: NO_ACTIVE_CUSTOMER, INVALID_PAYLOAD, VALIDATION_ERROR.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Preview an on-net transfer",
        "requestBody": {
          "$ref": "#/components/requestBodies/internal_handlers.PortingTNsRequest"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/internal_handlers.previewItem"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/scopes": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns every scope in the platform registry, grouped by category, for role and API-key editors. Requires the team:read scope. Errors: INTERNAL_ERROR.",
        "tags": [
          "Customer/Account"
        ],
        "summary": "List the scope catalog",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/internal_handlers.scopeCategoryDTO"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/tincomply/lookup-company-details": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Retrieves detailed company information by company name and optional address. Used during the port-in flow. Errors: INVALID_REQUEST, COMPANY_NAME_REQUIRED, TINCOMPLY_ERROR, LOOKUP_FAILED.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Lookup company details by name and address",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tincomply.CompanyDetailsRequest"
              }
            }
          },
          "description": "Company name and address",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tincomply.CompanyDetailsResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/tincomply/lookup-ein": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Retrieves company information from TinComply by EIN/Tax ID. Used during the port-in flow for entity verification. Errors: EIN_REQUIRED, INVALID_EIN, TINCOMPLY_ERROR, LOOKUP_FAILED.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Lookup company by EIN",
        "parameters": [
          {
            "description": "EIN/Tax ID (9 digits, with or without hyphen)",
            "name": "ein",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tincomply.EINLookupResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/tincomply/validate-ein-format": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Checks whether an EIN is well-formed (9 digits) without calling the external API. Errors: EIN_REQUIRED.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Validate EIN format",
        "parameters": [
          {
            "description": "EIN to validate",
            "name": "ein",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.EINFormatResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/tincomply/verify-tin-name": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Verifies that a TIN matches the provided company name via IRS TIN-Name matching. Used during the port-in flow. Errors: INVALID_REQUEST, INVALID_TIN, COMPANY_NAME_REQUIRED, TINCOMPLY_ERROR, VERIFICATION_FAILED.",
        "tags": [
          "Customer/Porting"
        ],
        "summary": "Verify TIN and company name match",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tincomply.TINNameMatchRequest"
              }
            }
          },
          "description": "TIN and company name",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tincomply.TINNameMatchResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/trunks": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Lists the authenticated customer's trunk groups with their IP ACL entries. Errors: UNAUTHORIZED, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "List my trunks",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.TrunkGroupWithIPs"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Creates a trunk on the authenticated customer, enforcing the account's allowed number-classes and per-direction capacity ceilings. Errors: NO_ACTIVE_CUSTOMER, INVALID_PAYLOAD, VALIDATION_ERROR, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Create a trunk",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.CreateTrunkGroupRequest"
              }
            }
          },
          "description": "Trunk definition",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.TrunkGroup"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/trunks/{trunk_id}": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns one trunk group (with IP ACL entries) owned by the authenticated customer. Errors: UNAUTHORIZED, INVALID_ID, NOT_FOUND.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Get one of my trunks",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.TrunkGroupWithIPs"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Updates an owned trunk. The trunk being updated is excluded from the capacity-sum check. POI assignment is silently ignored (admin-only). Step-up MFA required. Errors: NO_ACTIVE_CUSTOMER, INVALID_ID, NOT_FOUND, INVALID_PAYLOAD, VALIDATION_ERROR, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Update a trunk",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/github_com_ringer-warp_api-gateway_internal_models.UpdateTrunkGroupRequest"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.TrunkGroup"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Deletes an owned trunk. Rejected with CONFLICT when the trunk has live calls (drain first) or is referenced by CDRs (disable instead). Step-up MFA required. Errors: NO_ACTIVE_CUSTOMER, INVALID_ID, NOT_FOUND, CONFLICT, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Delete a trunk",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Trunk deleted"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/trunks/{trunk_id}/cascade-preview": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns per-trunk cascade-preview counts (src_ips, tns_routed_here, active_calls, cdr_count) for an owned trunk. active_calls is read live from Redis. Errors: NO_ACTIVE_CUSTOMER, INVALID_ID, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Preview a trunk's deletion cascade",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.CustomerTrunkCascade"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/trunks/{trunk_id}/credentials": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Lists SIP Digest credentials for an owned trunk (no HA1, no password), each enriched with live registration_count and active_call_count. Errors: INVALID_ID, NO_ACTIVE_CUSTOMER, TRUNK_UNOWNED, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "List SIP credentials",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/internal_handlers.CredentialListItem"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Creates a SIP Digest credential on an owned trunk (auth_type must be DIGEST, EITHER, or BOTH). The plaintext password is returned exactly once. Step-up MFA required. Errors: INVALID_ID, NO_ACTIVE_CUSTOMER, TRUNK_UNOWNED, VALIDATION_ERROR, INVALID_PAYLOAD, CONFLICT, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Create a SIP credential",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.createCredReq"
              }
            }
          },
          "description": "Username for the credential",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.CredentialShowOnce"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/trunks/{trunk_id}/credentials/{cred_id}": {
      "delete": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Deletes a credential and cascades removal from Redis + Kamailio usrloc. Idempotent (204 when already gone). Step-up MFA required. Errors: INVALID_ID, NO_ACTIVE_CUSTOMER, TRUNK_UNOWNED, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Delete a SIP credential",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Credential UUID",
            "name": "cred_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Credential deleted"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Toggles a credential's enabled flag. Disable drops the Redis HA1 + AOR and tears down active registrations (dialogs are not terminated); enable restores them. Step-up MFA required. Errors: INVALID_ID, NO_ACTIVE_CUSTOMER, TRUNK_UNOWNED, INVALID_PAYLOAD, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Enable or disable a SIP credential",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Credential UUID",
            "name": "cred_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_handlers.patchCredReq"
              }
            }
          },
          "description": "Enabled flag",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.CredentialInfo"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/trunks/{trunk_id}/credentials/{cred_id}/calls": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns active SIP dialogs for a credential's AOR. The dialog-tracking store is not yet live, so this currently returns an empty array. Errors: INVALID_ID, NO_ACTIVE_CUSTOMER, TRUNK_UNOWNED, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "List a credential's active calls",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Credential UUID",
            "name": "cred_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/internal_handlers.CredentialActiveCall"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/trunks/{trunk_id}/credentials/{cred_id}/registrations": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the current Kamailio usrloc bindings for a credential's AOR. Errors: INVALID_ID, NO_ACTIVE_CUSTOMER, TRUNK_UNOWNED, NOT_FOUND, GATEWAY_UNAVAILABLE.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "List a credential's live registrations",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Credential UUID",
            "name": "cred_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/internal_handlers.CredentialRegistration"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/trunks/{trunk_id}/credentials/{cred_id}/registrations/{contact_id}": {
      "delete": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Evicts one SIP contact binding from Kamailio usrloc for a credential's AOR. Step-up MFA required. Errors: INVALID_ID, MISSING_ID, NO_ACTIVE_CUSTOMER, TRUNK_UNOWNED, NOT_FOUND, GATEWAY_UNAVAILABLE.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Revoke a single registration",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Credential UUID",
            "name": "cred_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "usrloc contact ID",
            "name": "contact_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Registration revoked"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/trunks/{trunk_id}/credentials/{cred_id}/rotate": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Generates a new password + HA1 for a credential (username and realm unchanged). The new plaintext password is returned exactly once. Step-up MFA required. Errors: INVALID_ID, NO_ACTIVE_CUSTOMER, TRUNK_UNOWNED, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Rotate a SIP credential's password",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Credential UUID",
            "name": "cred_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.CredentialShowOnce"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/trunks/{trunk_id}/endpoints": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Lists the dispatcher endpoints (SIP destinations) for an owned trunk. Errors: NO_ACTIVE_CUSTOMER, INVALID_ID, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "List trunk endpoints",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.TrunkEndpoint"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Adds a dispatcher endpoint to an owned trunk (structured host/port/transport or a raw_uri). Returns 207 with a warning when the Kamailio sync is deferred. Step-up MFA required. Errors: NO_ACTIVE_CUSTOMER, INVALID_ID, NOT_FOUND, INVALID_PAYLOAD, VALIDATION_ERROR, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Create a trunk endpoint",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.CreateTrunkEndpointRequest"
              }
            }
          },
          "description": "Endpoint definition",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.TrunkEndpointResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "207": {
            "description": "Multi-Status",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.TrunkEndpointResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/trunks/{trunk_id}/endpoints/{endpoint_id}": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns one dispatcher endpoint for an owned trunk. Errors: NO_ACTIVE_CUSTOMER, INVALID_ID, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Get a trunk endpoint",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Endpoint ID",
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.TrunkEndpoint"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Removes a dispatcher endpoint from an owned trunk and drops it from Kamailio. Step-up MFA required. Errors: NO_ACTIVE_CUSTOMER, INVALID_ID, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Delete a trunk endpoint",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Endpoint ID",
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Endpoint deleted"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Updates a dispatcher endpoint on an owned trunk (structured fields or a raw_uri). Returns 207 with a warning when the Kamailio sync is deferred. Step-up MFA required. Errors: NO_ACTIVE_CUSTOMER, INVALID_ID, NOT_FOUND, INVALID_PAYLOAD, VALIDATION_ERROR, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Update a trunk endpoint",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Endpoint ID",
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.UpdateTrunkEndpointRequest"
              }
            }
          },
          "description": "Fields to update",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.TrunkEndpointResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "207": {
            "description": "Multi-Status",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.TrunkEndpointResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/trunks/{trunk_id}/ips": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Lists all IP ACL entries for an owned trunk. Errors: NO_ACTIVE_CUSTOMER, INVALID_ID, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "List a trunk's IP ACL entries",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.CustomerTrunkIPList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Adds an IP/netmask to an owned trunk's ACL and syncs it to Kamailio. Step-up MFA required. Errors: NO_ACTIVE_CUSTOMER, INVALID_ID, NOT_FOUND, INVALID_PAYLOAD, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Add an IP ACL entry to a trunk",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/github_com_ringer-warp_api-gateway_internal_models.AddTrunkIPRequest"
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.TrunkIP"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/trunks/{trunk_id}/ips/{ip_id}": {
      "delete": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Removes an IP ACL entry from an owned trunk. Step-up MFA required. Errors: NO_ACTIVE_CUSTOMER, INVALID_ID, NOT_FOUND, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Delete a trunk IP ACL entry",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "IP ACL entry UUID",
            "name": "ip_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "IP ACL entry deleted"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Updates the description and/or enabled flag of an owned trunk's IP ACL entry. Step-up MFA required. Errors: NO_ACTIVE_CUSTOMER, INVALID_ID, NOT_FOUND, INVALID_PAYLOAD, INTERNAL_ERROR.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Update a trunk IP ACL entry",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "IP ACL entry UUID",
            "name": "ip_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/github_com_ringer-warp_api-gateway_internal_models.UpdateTrunkIPRequest"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.MessageResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/trunks/{trunk_id}/throttle-state": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Returns the configured capacity plus live CPS/channel counters for an owned trunk. On a Redis read failure the counters are null and counters_available is false (still 200). Errors: INVALID_ID, NO_ACTIVE_CUSTOMER, NOT_FOUND.",
        "tags": [
          "Customer/Trunks"
        ],
        "summary": "Get a trunk's live throttle state",
        "parameters": [
          {
            "description": "Trunk group UUID",
            "name": "trunk_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/internal_handlers.throttleStatePayload"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "//api.warp.ringer.tel"
    }
  ],
  "components": {
    "requestBodies": {
      "internal_handlers.PortingTNSelectionRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/internal_handlers.PortingTNSelectionRequest"
            }
          }
        },
        "description": "Optional TN subset"
      },
      "github_com_ringer-warp_api-gateway_internal_models.UpdateTrunkIPRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.UpdateTrunkIPRequest"
            }
          }
        },
        "description": "Fields to update",
        "required": true
      },
      "internal_handlers.generateDomesticReq": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/internal_handlers.generateDomesticReq"
            }
          }
        },
        "description": "Rate template",
        "required": true
      },
      "github_com_ringer-warp_api-gateway_internal_tniq.CampaignPayload": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tniq.CampaignPayload"
            }
          }
        },
        "description": "Campaign payload",
        "required": true
      },
      "github_com_ringer-warp_api-gateway_internal_models.UpdateTrunkGroupRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.UpdateTrunkGroupRequest"
            }
          }
        },
        "description": "Fields to update",
        "required": true
      },
      "github_com_ringer-warp_api-gateway_internal_models.AddTrunkIPRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.AddTrunkIPRequest"
            }
          }
        },
        "description": "IP ACL entry",
        "required": true
      },
      "postV1AdminRateDecks_id_tfOutboundRatesUpload": {
        "content": {
          "multipart/form-data": {
            "schema": {
              "type": "object",
              "properties": {
                "file": {
                  "description": "TF-outbound rate CSV",
                  "type": "string",
                  "format": "binary"
                }
              },
              "required": [
                "file"
              ]
            }
          }
        },
        "required": true
      },
      "internal_handlers.askRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/internal_handlers.askRequest"
            }
          }
        },
        "description": "Question plus page context; session_id empty = find-or-create session by context",
        "required": true
      },
      "github_com_ringer-warp_api-gateway_internal_tniq.BrandPayload": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tniq.BrandPayload"
            }
          }
        },
        "description": "Brand payload",
        "required": true
      },
      "internal_handlers.PortingTNsRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/internal_handlers.PortingTNsRequest"
            }
          }
        },
        "description": "Free-form TN list",
        "required": true
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "description": "API key auth: \"Authorization: Bearer rk_...\" (live) or \"Bearer rk_test_...\" (test label). Mint keys in the portal under Settings → API Keys.",
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    },
    "schemas": {
      "github_com_ringer-warp_api-gateway_internal_buzz.FormField": {
        "type": "object",
        "properties": {
          "current": {
            "description": "current value as display string (optional)",
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "options": {
            "description": "for select/multiselect",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "type": {
            "description": "\"text\",\"number\",\"boolean\",\"select\",\"multiselect\",\"textarea\"",
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_buzz.FormSchema": {
        "type": "object",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_buzz.FormField"
            }
          },
          "form_id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.APIError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "details": {
            "type": "object",
            "additionalProperties": true
          },
          "message": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.APIKey": {
        "type": "object",
        "properties": {
          "allowed_ips": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/net.IPNet"
            }
          },
          "created_at": {
            "type": "string"
          },
          "created_by_user_id": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "environment": {
            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.KeyEnvironment"
          },
          "expires_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "key_prefix": {
            "type": "string"
          },
          "last_used_at": {
            "type": "string"
          },
          "last_used_ip": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "name": {
            "type": "string"
          },
          "rate_limit_per_min": {
            "type": "integer"
          },
          "revoke_reason": {
            "type": "string"
          },
          "revoked_at": {
            "type": "string"
          },
          "revoked_by": {
            "type": "string"
          },
          "scopes": {
            "description": "Scopes is a transient field (not a column) populated from auth.role/scope\njoins by the list handler so the API contract always carries the key's\ngranted scopes. No omitempty: an empty grant must serialize as [].",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.APIKeyAudit": {
        "type": "object",
        "properties": {
          "api_key_id": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "scope_checked": {
            "type": "string"
          },
          "source_ip": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "status_code": {
            "type": "integer"
          },
          "ts": {
            "type": "string"
          },
          "user_agent": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.APIResponse": {
        "type": "object",
        "properties": {
          "data": {},
          "error": {
            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIError"
          },
          "meta": {
            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.Meta"
          },
          "success": {
            "type": "boolean"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.AddTrunkIPRequest": {
        "type": "object",
        "required": [
          "ip_address"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "ip_address": {
            "type": "string"
          },
          "netmask": {
            "type": "integer",
            "maximum": 32,
            "minimum": 0
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.Assignment": {
        "type": "object",
        "properties": {
          "acquired_at": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "friendly_name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "locality": {
            "type": "string"
          },
          "monthly_rate_at_assignment": {
            "description": "SP10.6.2 — procurement snapshot fields (migration 48):",
            "type": "number"
          },
          "npa": {
            "type": "string"
          },
          "number_type": {
            "description": "did | tfn",
            "type": "string"
          },
          "nxx": {
            "type": "string"
          },
          "procurement_note": {
            "type": "string"
          },
          "procurement_request_id": {
            "type": "string"
          },
          "release_reason": {
            "type": "string"
          },
          "released_at": {
            "type": "string"
          },
          "sms_usage": {
            "description": "SMS summary — populated ONLY by ListByCustomer's LEFT JOIN onto\nnumbers.sms_usages so the Numbers list SMS column reflects reality\n(previously always nil on list rows → every row rendered\n\"unconfigured\"). Detail reads use AssignmentWithUsages.SmsUsage,\nwhose depth-0 field shadows this one in the marshaled JSON.",
            "allOf": [
              {
                "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.SmsUsage"
              }
            ]
          },
          "source": {
            "description": "procure | port_in | claim",
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "status": {
            "description": "active | released",
            "type": "string"
          },
          "tn": {
            "type": "string"
          },
          "tniq_application_id": {
            "type": "string"
          },
          "tniq_last_sync_at": {
            "type": "string"
          },
          "trunk_id": {
            "type": "string"
          },
          "trunk_name": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "voice_routing_type": {
            "description": "Voice-routing summary — populated ONLY by ListByCustomer's LEFT JOIN onto\nnumbers.voice_usages + accounts.trunk_groups so the Numbers list VOICE\ncolumn can show the assigned trunk's name. Nil on single-row reads (the\ndetail path uses the embedded VoiceUsage on AssignmentWithUsages instead).",
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.AssignmentWithUsages": {
        "type": "object",
        "properties": {
          "acquired_at": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "friendly_name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "locality": {
            "type": "string"
          },
          "monthly_rate_at_assignment": {
            "description": "SP10.6.2 — procurement snapshot fields (migration 48):",
            "type": "number"
          },
          "npa": {
            "type": "string"
          },
          "number_type": {
            "description": "did | tfn",
            "type": "string"
          },
          "nxx": {
            "type": "string"
          },
          "poi_lock": {
            "description": "POILock is set only when the number is POI-locked; omitted otherwise.",
            "allOf": [
              {
                "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.POILock"
              }
            ]
          },
          "procurement_note": {
            "type": "string"
          },
          "procurement_request_id": {
            "type": "string"
          },
          "release_reason": {
            "type": "string"
          },
          "released_at": {
            "type": "string"
          },
          "sms_usage": {
            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.SmsUsage"
          },
          "source": {
            "description": "procure | port_in | claim",
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "status": {
            "description": "active | released",
            "type": "string"
          },
          "tn": {
            "type": "string"
          },
          "tniq_application_id": {
            "type": "string"
          },
          "tniq_last_sync_at": {
            "type": "string"
          },
          "trunk_id": {
            "type": "string"
          },
          "trunk_name": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "voice_routing_type": {
            "description": "Voice-routing summary — populated ONLY by ListByCustomer's LEFT JOIN onto\nnumbers.voice_usages + accounts.trunk_groups so the Numbers list VOICE\ncolumn can show the assigned trunk's name. Nil on single-row reads (the\ndetail path uses the embedded VoiceUsage on AssignmentWithUsages instead).",
            "type": "string"
          },
          "voice_usage": {
            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.VoiceUsage"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.Balance": {
        "type": "object",
        "properties": {
          "available": {
            "type": "number"
          },
          "billing_suspended": {
            "type": "boolean"
          },
          "credit_limit": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "current_balance": {
            "type": "number"
          },
          "customer_id": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.CallDetail": {
        "type": "object",
        "properties": {
          "ani": {
            "type": "string"
          },
          "answer_stamp": {
            "type": "string"
          },
          "billed_seconds": {
            "type": "integer"
          },
          "call_type": {
            "description": "CallType is a vestigial pre-Phase-A field; the writer chain stopped\npopulating it. Kept on the model for legacy consumers but the\nfrontend renders the \"Zone\" column from the Zone field below.",
            "type": "string"
          },
          "customer_rate": {
            "type": "number"
          },
          "direction": {
            "type": "string"
          },
          "disposition": {
            "type": "string"
          },
          "dni": {
            "type": "string"
          },
          "end_stamp": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "jitter_ms": {
            "type": "integer"
          },
          "jurisdiction": {
            "type": "string"
          },
          "margin": {
            "type": "number"
          },
          "margin_pct": {
            "type": "number"
          },
          "mos_score": {
            "type": "number"
          },
          "packet_loss_pct": {
            "type": "number"
          },
          "pdd_ms": {
            "type": "integer"
          },
          "product_type": {
            "type": "string"
          },
          "raw_seconds": {
            "type": "integer"
          },
          "selected_vendor": {
            "type": "string"
          },
          "sip_response_code": {
            "type": "integer"
          },
          "ss_attestation": {
            "description": "STIR/SHAKEN provenance. Outbound signing (migration 107): NULL on\nunsigned/legacy rows. Inbound verify (migration 116): NULL on\noutbound/legacy rows. omitempty keeps NULL off the wire.",
            "type": "string"
          },
          "ss_origid": {
            "type": "string"
          },
          "ss_signed": {
            "type": "boolean"
          },
          "ss_verify_attestation": {
            "type": "string"
          },
          "ss_verify_origid": {
            "type": "string"
          },
          "ss_verify_reason": {
            "type": "string"
          },
          "ss_verstat": {
            "type": "string"
          },
          "start_stamp": {
            "type": "string"
          },
          "tf_cic": {
            "description": "TF outbound specific — migration 75. NULL for non-TF_OUTBOUND_8YY rows.",
            "type": "string"
          },
          "tf_key_type": {
            "type": "string"
          },
          "tf_ror": {
            "type": "string"
          },
          "total_charge": {
            "type": "number"
          },
          "vendor_cost": {
            "type": "number"
          },
          "zone": {
            "description": "Zone is the legacy zone classification (TOLLFREE / INTERSTATE /\nINTRASTATE / LOCAL / INTERNATIONAL / etc.) populated by Kamailio +\ncdr-drainer. Surfaced to the customer-side CDR table as the Zone\ncolumn.",
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.CallStatistics": {
        "type": "object",
        "properties": {
          "acd": {
            "type": "number"
          },
          "answered_calls": {
            "type": "integer"
          },
          "asr": {
            "type": "number"
          },
          "avg_margin_pct": {
            "type": "number"
          },
          "call_type_breakdown": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            }
          },
          "disposition_breakdown": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            }
          },
          "inbound_calls": {
            "type": "integer"
          },
          "outbound_calls": {
            "type": "integer"
          },
          "period_end": {
            "type": "string"
          },
          "period_start": {
            "type": "string"
          },
          "total_calls": {
            "type": "integer"
          },
          "total_charge": {
            "type": "number"
          },
          "total_cost": {
            "type": "number"
          },
          "total_margin": {
            "type": "number"
          },
          "total_minutes": {
            "type": "number"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.CreateTrunkEndpointRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "host": {
            "type": "string"
          },
          "port": {
            "type": "integer",
            "maximum": 65535,
            "minimum": 1
          },
          "priority": {
            "type": "integer",
            "maximum": 10,
            "minimum": 1
          },
          "raw_uri": {
            "type": "string"
          },
          "transport": {
            "type": "string",
            "enum": [
              "UDP",
              "TCP",
              "TLS"
            ]
          },
          "weight": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.CreateTrunkGroupRequest": {
        "type": "object",
        "required": [
          "auth_type",
          "name"
        ],
        "properties": {
          "allowed_number_classes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "auth_type": {
            "type": "string",
            "enum": [
              "IP_ACL",
              "DIGEST",
              "EITHER",
              "BOTH"
            ]
          },
          "capacity_channels_inbound": {
            "type": "integer",
            "maximum": 100000,
            "minimum": 0
          },
          "capacity_channels_outbound": {
            "type": "integer",
            "maximum": 100000,
            "minimum": 0
          },
          "capacity_cps_inbound": {
            "description": "0 is a valid value: \"direction disabled\" semantics. Kamailio's per-trunk\nruntime gate (warp:tg_cap:<tg_id>:<dir>) treats cap=0 as 503 + Retry-After.\n`required` is dropped because validator/v10's `required` rejects zero\nvalues for ints; with this contract a missing field defaults to 0 (a\ndisabled direction), which is the desired UX for inbound-only trunks.",
            "type": "integer",
            "maximum": 10000,
            "minimum": 0
          },
          "capacity_cps_outbound": {
            "type": "integer",
            "maximum": 10000,
            "minimum": 0
          },
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 3
          },
          "sip_config": {
            "description": "Persisted as JSONB on accounts.trunk_groups.sip_config. Customer-portal\nonly writes codecs + dtmf_mode today; admin surfaces use the rest.",
            "allOf": [
              {
                "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.SIPConfig"
              }
            ]
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.DCAInfo": {
        "type": "object",
        "properties": {
          "dca_id": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.EntityTypeInfo": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.KeyEnvironment": {
        "type": "string",
        "enum": [
          "live",
          "test"
        ],
        "x-enum-varnames": [
          "KeyEnvironmentLive",
          "KeyEnvironmentTest"
        ]
      },
      "github_com_ringer-warp_api-gateway_internal_models.LedgerTransaction": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number"
          },
          "balance_after": {
            "type": "number"
          },
          "created_at": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "external_ref": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "txn_type": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.ListResponse": {
        "type": "object",
        "properties": {
          "items": {},
          "pagination": {
            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.Meta"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.MNOInfo": {
        "type": "object",
        "properties": {
          "mno_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.Meta": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer"
          },
          "per_page": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "total_pages": {
            "type": "integer"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.POILock": {
        "type": "object",
        "properties": {
          "account": {
            "description": "referenced at the account level",
            "type": "boolean"
          },
          "locked": {
            "type": "boolean"
          },
          "trunk_groups": {
            "description": "always non-nil so it marshals as [] not null",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.POITrunkRef"
            }
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.POITrunkRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.PoiNumberSummary": {
        "type": "object",
        "properties": {
          "friendly_name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "npa": {
            "type": "string"
          },
          "nxx": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "tn": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.Role": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "customer_id": {
            "description": "nil for system roles",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_superadmin": {
            "type": "boolean"
          },
          "is_system": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.RoleWithScopes": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "customer_id": {
            "description": "nil for system roles",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_superadmin": {
            "type": "boolean"
          },
          "is_system": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "updated_at": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.SIPConfig": {
        "type": "object",
        "properties": {
          "caller_id_mode": {
            "description": "passthrough, block, rewrite",
            "type": "string"
          },
          "caller_id_number": {
            "description": "Override number (if rewrite)",
            "type": "string"
          },
          "codecs": {
            "description": "Codecs (ordered preference list)",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cps_limit": {
            "type": "integer"
          },
          "custom_headers": {
            "description": "Additional SIP headers",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "diversion_header": {
            "description": "SIP headers",
            "type": "boolean"
          },
          "dtmf_mode": {
            "description": "rfc2833, inband — empty inherits/system default",
            "type": "string"
          },
          "early_media": {
            "description": "Allow 183 early media",
            "type": "boolean"
          },
          "fax_mode": {
            "description": "Media",
            "type": "string"
          },
          "from_mode": {
            "description": "passthrough, rewrite_caller, rewrite_trunk",
            "type": "string"
          },
          "max_call_duration": {
            "description": "Limits",
            "type": "integer"
          },
          "max_concurrent_calls": {
            "description": "Capacity (overrides trunk_groups columns if set)",
            "type": "integer"
          },
          "min_se": {
            "description": "Min-SE header value (seconds)",
            "type": "integer"
          },
          "number_format": {
            "description": "Number handling",
            "type": "string"
          },
          "p_charge_info": {
            "description": "Include P-Charge-Info",
            "type": "boolean"
          },
          "pai_mode": {
            "description": "Header handling",
            "type": "string"
          },
          "prepend_prefix": {
            "description": "Prefix to prepend (e.g., \"1\")",
            "type": "string"
          },
          "recording": {
            "description": "Enable call recording",
            "type": "boolean"
          },
          "rpid_mode": {
            "description": "passthrough, strip, generate",
            "type": "string"
          },
          "session_expires": {
            "description": "Session timers",
            "type": "integer"
          },
          "strip_plus": {
            "description": "Strip leading + before sending",
            "type": "boolean"
          },
          "tech_prefix": {
            "description": "Tech prefix for LCR",
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.SmsUsage": {
        "type": "object",
        "properties": {
          "assignment_id": {
            "type": "string"
          },
          "campaign_source": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "fallback_inbound_url": {
            "type": "string"
          },
          "inbound_webhook_secret": {
            "type": "string"
          },
          "inbound_webhook_url": {
            "type": "string"
          },
          "messaging_last_sync_at": {
            "type": "string"
          },
          "messaging_status": {
            "type": "string"
          },
          "mms_enabled": {
            "type": "boolean"
          },
          "tniq_brand_id": {
            "type": "string"
          },
          "tniq_campaign_id": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.TrendDataPoint": {
        "type": "object",
        "properties": {
          "answered_calls": {
            "type": "integer"
          },
          "asr": {
            "type": "number"
          },
          "period": {
            "type": "string"
          },
          "total_calls": {
            "type": "integer"
          },
          "total_charge": {
            "type": "number"
          },
          "total_margin": {
            "type": "number"
          },
          "total_minutes": {
            "type": "number"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.TrunkEndpoint": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "host": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "port": {
            "type": "integer"
          },
          "priority": {
            "type": "integer"
          },
          "raw_uri": {
            "type": "string"
          },
          "transport": {
            "type": "string"
          },
          "trunk_group_id": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "weight": {
            "type": "integer"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.TrunkGroup": {
        "type": "object",
        "properties": {
          "allowed_number_classes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "auth_type": {
            "description": "IP_ACL, DIGEST, BOTH",
            "type": "string"
          },
          "capacity_channels_inbound": {
            "type": "integer"
          },
          "capacity_channels_outbound": {
            "type": "integer"
          },
          "capacity_cps_inbound": {
            "description": "SP10.7.0: split into directional capacity. Inbound = WARP→Customer;\noutbound = Customer→WARP.",
            "type": "integer"
          },
          "capacity_cps_outbound": {
            "type": "integer"
          },
          "created_at": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "partition_id": {
            "type": "string"
          },
          "poi_assignment_id": {
            "description": "PoiAssignmentID is the FK to numbers.assignments backing the\ntrunk-level POI override. Engine reads PoiTN (transient, populated\nby repo LEFT JOIN). NULL = inherit customer-level POI. Admin-only —\ncustomer-facing handlers nil this field before persistence.\nMigration 81. Replaces the free-form poi_tn VARCHAR from M80.",
            "type": "string"
          },
          "poi_number": {
            "description": "PoiNumber is the transient resolved summary of the linked assignment.\nPopulated by repo LEFT JOIN; never written to DB.",
            "allOf": [
              {
                "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.PoiNumberSummary"
              }
            ]
          },
          "sip_config": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "ss_attest_fallback": {
            "type": "string"
          },
          "ss_existing_header_policy": {
            "type": "string"
          },
          "ss_signing_mode": {
            "description": "STIR/SHAKEN per-trunk signing policy. Migration 107. Admin-only — the\nengine reads these columns directly via GetSigningConfig; the fields here\nare the admin read/write surface. NULL values mean the engine applies its\nschema defaults at runtime (sign / B / validate).",
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.TrunkGroupWithIPs": {
        "type": "object",
        "properties": {
          "allowed_number_classes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "auth_type": {
            "description": "IP_ACL, DIGEST, BOTH",
            "type": "string"
          },
          "capacity_channels_inbound": {
            "type": "integer"
          },
          "capacity_channels_outbound": {
            "type": "integer"
          },
          "capacity_cps_inbound": {
            "description": "SP10.7.0: split into directional capacity. Inbound = WARP→Customer;\noutbound = Customer→WARP.",
            "type": "integer"
          },
          "capacity_cps_outbound": {
            "type": "integer"
          },
          "created_at": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "ips": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.TrunkIP"
            }
          },
          "name": {
            "type": "string"
          },
          "partition_id": {
            "type": "string"
          },
          "poi_assignment_id": {
            "description": "PoiAssignmentID is the FK to numbers.assignments backing the\ntrunk-level POI override. Engine reads PoiTN (transient, populated\nby repo LEFT JOIN). NULL = inherit customer-level POI. Admin-only —\ncustomer-facing handlers nil this field before persistence.\nMigration 81. Replaces the free-form poi_tn VARCHAR from M80.",
            "type": "string"
          },
          "poi_number": {
            "description": "PoiNumber is the transient resolved summary of the linked assignment.\nPopulated by repo LEFT JOIN; never written to DB.",
            "allOf": [
              {
                "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.PoiNumberSummary"
              }
            ]
          },
          "sip_config": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "ss_attest_fallback": {
            "type": "string"
          },
          "ss_existing_header_policy": {
            "type": "string"
          },
          "ss_signing_mode": {
            "description": "STIR/SHAKEN per-trunk signing policy. Migration 107. Admin-only — the\nengine reads these columns directly via GetSigningConfig; the fields here\nare the admin read/write surface. NULL values mean the engine applies its\nschema defaults at runtime (sign / B / validate).",
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.TrunkIP": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "ip_address": {
            "description": "INET type from PostgreSQL",
            "type": "string"
          },
          "netmask": {
            "type": "integer"
          },
          "trunk_group_id": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.UpdateTrunkEndpointRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "host": {
            "type": "string"
          },
          "port": {
            "type": "integer",
            "maximum": 65535,
            "minimum": 1
          },
          "priority": {
            "type": "integer",
            "maximum": 10,
            "minimum": 1
          },
          "raw_uri": {
            "type": "string"
          },
          "transport": {
            "type": "string",
            "enum": [
              "UDP",
              "TCP",
              "TLS"
            ]
          },
          "weight": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.UpdateTrunkGroupRequest": {
        "type": "object",
        "properties": {
          "allowed_number_classes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "auth_type": {
            "type": "string",
            "enum": [
              "IP_ACL",
              "DIGEST",
              "EITHER",
              "BOTH"
            ]
          },
          "capacity_channels_inbound": {
            "type": "integer",
            "maximum": 100000,
            "minimum": 0
          },
          "capacity_channels_outbound": {
            "type": "integer",
            "maximum": 100000,
            "minimum": 0
          },
          "capacity_cps_inbound": {
            "description": "0 = direction disabled. See CreateTrunkGroupRequest for runtime semantics.",
            "type": "integer",
            "maximum": 10000,
            "minimum": 0
          },
          "capacity_cps_outbound": {
            "type": "integer",
            "maximum": 10000,
            "minimum": 0
          },
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 3
          },
          "poi_assignment_id": {
            "description": "PoiAssignmentID: trunk-level POI fallback FK override. Admin-only —\ncustomer handler nils this before reaching the repo. Pointer-to-pointer\nsemantics: nil = field absent (no change); pointer-to-uuid.Nil = clear\n(write NULL); pointer-to-real-uuid = set FK. Validator runs in the\nhandler after bind (cross-tenant + active + did checks).",
            "type": "string"
          },
          "sip_config": {
            "description": "Replaces sip_config wholesale when present. Use a separate patch endpoint\nfor finer-grained edits if/when needed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.SIPConfig"
              }
            ]
          },
          "ss_attest_fallback": {
            "type": "string"
          },
          "ss_existing_header_policy": {
            "type": "string"
          },
          "ss_signing_mode": {
            "description": "STIR/SHAKEN per-trunk signing policy. Admin-only. Migration 107.\nAllowed values: SSSigningMode∈{off,sign}, SSAttestFallback∈{B,C},\nSSExistingHeaderPolicy∈{validate,passthrough,override}.\nnil = absent (no change). Handler validates before repo write.",
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.UpdateTrunkIPRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.UseCaseInfo": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "difficulty": {
            "description": "Difficulty is a WARP-side EASY/MEDIUM/HARD rating reflecting TCR\napproval friction.",
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "min_samples": {
            "description": "MinSamples is the WARP-recommended minimum number of sample\nmessages for this use case, tuned to maximize approval chance.",
            "type": "integer"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.VendorOriginationIPsResponse": {
        "type": "object",
        "properties": {
          "ips": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "note": {
            "type": "string"
          },
          "region": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.VerticalInfo": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_models.VoiceUsage": {
        "type": "object",
        "properties": {
          "assignment_id": {
            "type": "string"
          },
          "cnam_display_name": {
            "type": "string"
          },
          "cnam_enabled": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string"
          },
          "e911_address_id": {
            "type": "string"
          },
          "e911_enabled": {
            "type": "boolean"
          },
          "forward_preserve_ani": {
            "type": "boolean"
          },
          "forward_to_number": {
            "description": "SP4 Phase 2b — routing-type metadata (migration 35):",
            "type": "string"
          },
          "reject_reason_phrase": {
            "type": "string"
          },
          "reject_response_code": {
            "type": "integer"
          },
          "trunk_id": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "voice_destination": {
            "type": "string"
          },
          "voice_failover_destination": {
            "type": "string"
          },
          "voice_routing_type": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_porting.PreviewGroup": {
        "type": "object",
        "properties": {
          "carrier": {
            "type": "string"
          },
          "on_net": {
            "type": "boolean"
          },
          "portable": {
            "type": "boolean"
          },
          "portable_unknown": {
            "type": "boolean"
          },
          "spid": {
            "type": "string"
          },
          "tns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_repository.CustomerTrunkCascade": {
        "type": "object",
        "properties": {
          "active_calls": {
            "description": "handler-populated from Redis",
            "type": "integer"
          },
          "cdr_count": {
            "type": "integer"
          },
          "src_ips": {
            "type": "integer"
          },
          "tns_routed_here": {
            "type": "integer"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_repository.InvoiceApplicationItem": {
        "type": "object",
        "properties": {
          "amount_applied": {
            "type": "number"
          },
          "applied_at": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "ledger_txn_id": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_repository.InvoiceDetail": {
        "type": "object",
        "properties": {
          "amount_paid": {
            "type": "number"
          },
          "applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.InvoiceApplicationItem"
            }
          },
          "balance_due": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "due_date": {
            "type": "string"
          },
          "fee_total": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "invoice_number": {
            "type": "string"
          },
          "issued_at": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.InvoiceLineDetail"
            }
          },
          "period_end": {
            "type": "string"
          },
          "period_start": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "subtotal": {
            "type": "number"
          },
          "tax_lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.InvoiceTaxLineDetail"
            }
          },
          "tax_total": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_repository.InvoiceLineDetail": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "extended_amount": {
            "type": "number"
          },
          "quantity": {
            "type": "number"
          },
          "section": {
            "type": "string"
          },
          "sku_code": {
            "type": "string"
          },
          "tax_code": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "unit_price": {
            "type": "number"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_repository.InvoiceListItem": {
        "type": "object",
        "properties": {
          "amount_paid": {
            "type": "number"
          },
          "balance_due": {
            "type": "number"
          },
          "due_date": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "invoice_number": {
            "type": "string"
          },
          "issued_at": {
            "type": "string"
          },
          "period_end": {
            "type": "string"
          },
          "period_start": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "total": {
            "type": "number"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_repository.InvoiceTaxLineDetail": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number"
          },
          "is_fee": {
            "type": "boolean"
          },
          "jurisdiction_code": {
            "type": "string"
          },
          "jurisdiction_name": {
            "type": "string"
          },
          "tax_type": {
            "type": "string"
          },
          "taxable_base": {
            "type": "number"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_repository.MemberEntry": {
        "type": "object",
        "properties": {
          "assigned_at": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "is_ringer_staff": {
            "type": "boolean"
          },
          "role_id": {
            "type": "string"
          },
          "role_name": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_repository.Message": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "direction": {
            "type": "string"
          },
          "encoding": {
            "type": "string"
          },
          "error_code": {
            "type": "string"
          },
          "from": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "segments": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "status_callback_url": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "vendor_message_id": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_repository.MessageCampaignStats": {
        "type": "object",
        "properties": {
          "campaign_id": {
            "type": "string"
          },
          "delivered": {
            "type": "integer"
          },
          "outbound": {
            "type": "integer"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_repository.MessageStats": {
        "type": "object",
        "properties": {
          "by_campaign": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.MessageCampaignStats"
            }
          },
          "delivered": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          },
          "inbound": {
            "type": "integer"
          },
          "outbound": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_repository.MessagingNumber": {
        "type": "object",
        "properties": {
          "brand_id": {
            "type": "string"
          },
          "campaign_id": {
            "type": "string"
          },
          "campaign_source": {
            "type": "string"
          },
          "has_webhook": {
            "type": "boolean"
          },
          "last_sync_at": {
            "type": "string"
          },
          "messaging_status": {
            "type": "string"
          },
          "mms_enabled": {
            "type": "boolean"
          },
          "tn": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_repository.Note": {
        "type": "object",
        "properties": {
          "author_id": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "visibility": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_repository.PortAuditEntry": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string"
          },
          "actor_type": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "override_reason": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_repository.PortRequest": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "derived_status": {
            "type": "string"
          },
          "desired_due_date": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "next_step": {
            "type": "string"
          },
          "tniq_project_id": {
            "type": "string"
          },
          "tniq_spid": {
            "type": "string"
          },
          "warp_customer_id": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_services.BulkAssignResult": {
        "type": "object",
        "properties": {
          "failed": {
            "type": "integer"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_services.BulkAssignTNResult"
            }
          },
          "succeeded": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_services.BulkAssignTNResult": {
        "type": "object",
        "properties": {
          "assignment_id": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "status": {
            "description": "\"ok\" | \"failed\"",
            "type": "string"
          },
          "tn": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_services.SearchResponse": {
        "type": "object",
        "properties": {
          "numbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_services.SearchResult"
            }
          },
          "page": {
            "type": "integer"
          },
          "size": {
            "type": "integer"
          },
          "total_elements": {
            "type": "integer"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_services.SearchResult": {
        "type": "object",
        "properties": {
          "locality": {
            "type": "string"
          },
          "monthly_rate": {
            "type": "number"
          },
          "npa": {
            "type": "string"
          },
          "number_type": {
            "type": "string"
          },
          "nxx": {
            "type": "string"
          },
          "reservation_expires_at": {
            "type": "string"
          },
          "reservation_status": {
            "description": "\"spare\" | \"reserved_by_somos_lookup\"",
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "tn": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_tincomply.CompanyDetails": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string"
          },
          "company_name": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "ein": {
            "type": "string"
          },
          "entity_type": {
            "type": "string"
          },
          "incorporated_at": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "legal_name": {
            "type": "string"
          },
          "match_score": {
            "type": "number"
          },
          "naics_code": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "sic_code": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "street": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "zip_code": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_tincomply.CompanyDetailsRequest": {
        "type": "object",
        "required": [
          "company_name"
        ],
        "properties": {
          "city": {
            "type": "string"
          },
          "company_name": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "street": {
            "type": "string"
          },
          "zip_code": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_tincomply.CompanyDetailsResponse": {
        "type": "object",
        "properties": {
          "completed_at": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "original_params": {
            "type": "object",
            "additionalProperties": true
          },
          "request_id": {
            "type": "string"
          },
          "result": {
            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tincomply.CompanyDetails"
          },
          "service_type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_tincomply.CompanyNameLookupByEinResult": {
        "type": "object",
        "properties": {
          "completed": {
            "description": "true if lookup completed",
            "type": "boolean"
          },
          "found": {
            "description": "true if match found",
            "type": "boolean"
          },
          "message": {
            "description": "\"EIN lookup match found\" or \"No match found\"",
            "type": "string"
          },
          "name": {
            "description": "Official registered company name",
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_tincomply.EINLookupResponse": {
        "type": "object",
        "properties": {
          "companyNameLookupByEinResult": {
            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tincomply.CompanyNameLookupByEinResult"
          },
          "id": {
            "type": "string"
          },
          "request": {
            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tincomply.TinComplyRequestInfo"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_tincomply.TINNameMatchRequest": {
        "type": "object",
        "required": [
          "company_name",
          "tin"
        ],
        "properties": {
          "company_name": {
            "type": "string"
          },
          "tin": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_tincomply.TINNameMatchResponse": {
        "type": "object",
        "properties": {
          "completed_at": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "original_params": {
            "type": "object",
            "additionalProperties": true
          },
          "request_id": {
            "type": "string"
          },
          "result": {
            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tincomply.TINNameMatchResult"
          },
          "service_type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_tincomply.TINNameMatchResult": {
        "type": "object",
        "properties": {
          "company_name": {
            "type": "string"
          },
          "confidence": {
            "description": "\"high\", \"medium\", \"low\"",
            "type": "string"
          },
          "exact_match": {
            "type": "boolean"
          },
          "fuzzy_match": {
            "type": "boolean"
          },
          "irs_verified": {
            "type": "boolean"
          },
          "match_details": {
            "type": "string"
          },
          "match_score": {
            "type": "number"
          },
          "matched": {
            "type": "boolean"
          },
          "tin": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_tincomply.TinComplyRequestInfo": {
        "type": "object",
        "properties": {
          "enabledServices": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "requestDate": {
            "type": "string"
          },
          "requestedServices": {
            "type": "string"
          },
          "tin": {
            "description": "Masked as XXXXX9949",
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_tniq.BrandPayload": {
        "type": "object",
        "properties": {
          "altBusinessId": {
            "type": "string"
          },
          "altBusinessIdType": {
            "type": "string"
          },
          "brandRelationship": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "companyName": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "entityType": {
            "type": "string"
          },
          "legalName": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "primaryContactEmail": {
            "type": "string"
          },
          "primaryContactName": {
            "type": "string"
          },
          "primaryContactPhone": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "stockExchange": {
            "type": "string"
          },
          "stockSymbol": {
            "type": "string"
          },
          "street": {
            "type": "string"
          },
          "taxId": {
            "type": "string"
          },
          "vertical": {
            "type": "string"
          },
          "website": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_tniq.BulkActionResult": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string"
          },
          "failed": {
            "type": "integer"
          },
          "results": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "succeeded": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_tniq.CampaignPayload": {
        "type": "object",
        "properties": {
          "affiliateMarketing": {
            "type": "boolean"
          },
          "ageGated": {
            "type": "boolean"
          },
          "autoRenewal": {
            "type": "boolean"
          },
          "brandId": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "directLending": {
            "type": "boolean"
          },
          "embeddedLink": {
            "type": "boolean"
          },
          "embeddedPhone": {
            "type": "boolean"
          },
          "helpKeywords": {
            "type": "string"
          },
          "helpMessage": {
            "type": "string"
          },
          "messageFlow": {
            "type": "string"
          },
          "numberPool": {
            "type": "boolean"
          },
          "optinKeywords": {
            "type": "string"
          },
          "optinMessage": {
            "type": "string"
          },
          "optoutKeywords": {
            "type": "string"
          },
          "optoutMessage": {
            "type": "string"
          },
          "privacyPolicyUrl": {
            "type": "string"
          },
          "resellerId": {
            "type": "string"
          },
          "sampleMessages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "subUseCases": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "subscriberHelp": {
            "type": "boolean"
          },
          "subscriberOptin": {
            "type": "boolean"
          },
          "subscriberOptout": {
            "type": "boolean"
          },
          "termsUrl": {
            "type": "string"
          },
          "useCase": {
            "type": "string"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_tniq.ErrorGroup": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer"
          },
          "errorGroupId": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          },
          "tns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_tniq.PortProjectResponse": {
        "type": "object",
        "properties": {
          "activated_tns": {
            "type": "integer"
          },
          "can_activate": {
            "type": "boolean"
          },
          "can_cancel": {
            "type": "boolean"
          },
          "can_submit": {
            "type": "boolean"
          },
          "cancelled_tns": {
            "type": "integer"
          },
          "customer_id": {
            "type": "string"
          },
          "derived_status": {
            "type": "string"
          },
          "derived_status_display": {
            "type": "string"
          },
          "desired_due_date": {
            "type": "string"
          },
          "error_tns": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "spid": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "submit_blocker_reason": {
            "type": "string"
          },
          "submitted_tns": {
            "type": "integer"
          },
          "total_tns": {
            "type": "integer"
          },
          "valid_tns": {
            "type": "integer"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_tniq.ProjectProgress": {
        "type": "object",
        "properties": {
          "errorTns": {
            "type": "integer"
          },
          "isComplete": {
            "type": "boolean"
          },
          "pendingTns": {
            "type": "integer"
          },
          "progressPercentage": {
            "type": "integer"
          },
          "projectId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "totalTns": {
            "type": "integer"
          },
          "validTns": {
            "type": "integer"
          }
        }
      },
      "github_com_ringer-warp_api-gateway_internal_tniq.ProjectStatistics": {
        "type": "object",
        "properties": {
          "cancelledTns": {
            "type": "integer"
          },
          "completedTns": {
            "type": "integer"
          },
          "errorTns": {
            "type": "integer"
          },
          "focReceivedTns": {
            "type": "integer"
          },
          "pendingFocTns": {
            "type": "integer"
          },
          "progressPercentage": {
            "type": "integer"
          },
          "projectId": {
            "type": "string"
          },
          "readyForActivationTns": {
            "type": "integer"
          },
          "stage": {
            "type": "string"
          },
          "stageMessage": {
            "type": "string"
          },
          "submittedTns": {
            "type": "integer"
          },
          "totalTns": {
            "type": "integer"
          },
          "validTns": {
            "type": "integer"
          }
        }
      },
      "internal_handlers.APIKeyWithScopesResponse": {
        "type": "object",
        "properties": {
          "key": {
            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.APIKey"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "internal_handlers.AccountCapacityResponse": {
        "type": "object",
        "properties": {
          "ch_in_international": {
            "type": "integer"
          },
          "ch_in_interstate": {
            "type": "integer"
          },
          "ch_in_intrastate": {
            "type": "integer"
          },
          "ch_in_local": {
            "type": "integer"
          },
          "ch_in_tollfree": {
            "type": "integer"
          },
          "ch_in_zone1": {
            "type": "integer"
          },
          "ch_out_international": {
            "type": "integer"
          },
          "ch_out_interstate": {
            "type": "integer"
          },
          "ch_out_intrastate": {
            "type": "integer"
          },
          "ch_out_local": {
            "type": "integer"
          },
          "ch_out_tollfree": {
            "type": "integer"
          },
          "ch_out_zone1": {
            "type": "integer"
          },
          "cps_in_international": {
            "type": "integer"
          },
          "cps_in_interstate": {
            "type": "integer"
          },
          "cps_in_intrastate": {
            "type": "integer"
          },
          "cps_in_local": {
            "type": "integer"
          },
          "cps_in_tollfree": {
            "type": "integer"
          },
          "cps_in_zone1": {
            "type": "integer"
          },
          "cps_out_international": {
            "type": "integer"
          },
          "cps_out_interstate": {
            "type": "integer"
          },
          "cps_out_intrastate": {
            "type": "integer"
          },
          "cps_out_local": {
            "type": "integer"
          },
          "cps_out_tollfree": {
            "type": "integer"
          },
          "cps_out_zone1": {
            "type": "integer"
          }
        }
      },
      "internal_handlers.AssignNumberRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "friendly_name": {
            "type": "string"
          }
        }
      },
      "internal_handlers.BulkAssignRequest": {
        "type": "object",
        "properties": {
          "default_trunk_id": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "per_tn_overrides": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "tn_metadata": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/internal_handlers.BulkAssignTNMetadata"
            }
          },
          "tns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "internal_handlers.BulkAssignTNMetadata": {
        "type": "object",
        "properties": {
          "locality": {
            "type": "string"
          },
          "state": {
            "type": "string"
          }
        }
      },
      "internal_handlers.BulkRouteRequest": {
        "type": "object",
        "properties": {
          "tns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "trunk_id": {
            "type": "string"
          }
        }
      },
      "internal_handlers.CredentialActiveCall": {
        "type": "object"
      },
      "internal_handlers.CredentialInfo": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "last_rotated_at": {
            "type": "string"
          },
          "realm": {
            "type": "string"
          },
          "trunk_group_id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        }
      },
      "internal_handlers.CredentialListItem": {
        "type": "object",
        "properties": {
          "active_call_count": {
            "type": "integer"
          },
          "created_at": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "last_rotated_at": {
            "type": "string"
          },
          "realm": {
            "type": "string"
          },
          "registration_count": {
            "type": "integer"
          },
          "username": {
            "type": "string"
          }
        }
      },
      "internal_handlers.CredentialRegistration": {
        "type": "object",
        "properties": {
          "contact": {
            "type": "string"
          },
          "contact_id": {
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          },
          "last_keepalive": {
            "type": "string"
          },
          "registered_at": {
            "type": "string"
          },
          "source_ip": {
            "type": "string"
          },
          "transport": {
            "type": "string"
          },
          "user_agent": {
            "type": "string"
          }
        }
      },
      "internal_handlers.CredentialShowOnce": {
        "type": "object",
        "properties": {
          "credential": {
            "$ref": "#/components/schemas/internal_handlers.CredentialInfo"
          },
          "password": {
            "type": "string"
          },
          "sip_config": {
            "$ref": "#/components/schemas/internal_handlers.CredentialSipConfig"
          }
        }
      },
      "internal_handlers.CredentialSipConfig": {
        "type": "object",
        "properties": {
          "auth_realm": {
            "type": "string"
          },
          "registrar": {
            "type": "string"
          },
          "sip_domain": {
            "type": "string"
          }
        }
      },
      "internal_handlers.CustomerGrowthPoint": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer"
          },
          "month": {
            "type": "string"
          }
        }
      },
      "internal_handlers.CustomerIngressIPs": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "servers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/internal_handlers.IngressServer"
            }
          }
        }
      },
      "internal_handlers.CustomerTrunkIPList": {
        "type": "object",
        "properties": {
          "ips": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.TrunkIP"
            }
          },
          "trunk_group_id": {
            "type": "string"
          }
        }
      },
      "internal_handlers.DashboardStats": {
        "type": "object",
        "properties": {
          "active_customers": {
            "type": "integer"
          },
          "active_vendors": {
            "type": "integer"
          },
          "customer_growth": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/internal_handlers.CustomerGrowthPoint"
            }
          },
          "monthly_growth": {
            "type": "number"
          },
          "support_tickets": {
            "type": "integer"
          },
          "total_customers": {
            "type": "integer"
          },
          "total_revenue": {
            "type": "number"
          }
        }
      },
      "internal_handlers.EINFormatResult": {
        "type": "object",
        "properties": {
          "formatted": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "valid": {
            "type": "boolean"
          }
        }
      },
      "internal_handlers.IngressServer": {
        "type": "object",
        "properties": {
          "hostname": {
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "port": {
            "type": "string"
          },
          "primary": {
            "type": "string"
          },
          "protocol": {
            "type": "string"
          }
        }
      },
      "internal_handlers.MemberRoleSetResponse": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "string"
          },
          "role_id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "internal_handlers.MessageResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "internal_handlers.NumbersPage": {
        "type": "object",
        "properties": {
          "numbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.Assignment"
            }
          },
          "page": {
            "type": "integer"
          },
          "size": {
            "type": "integer"
          },
          "total_elements": {
            "type": "integer"
          }
        }
      },
      "internal_handlers.PortOutPINSetResponse": {
        "type": "object",
        "properties": {
          "set": {
            "type": "boolean"
          }
        }
      },
      "internal_handlers.PortOutPINStatusResponse": {
        "type": "object",
        "properties": {
          "locked_until": {
            "type": "string"
          },
          "set": {
            "type": "boolean"
          }
        }
      },
      "internal_handlers.PortingAddTNsResponse": {
        "type": "object",
        "properties": {
          "added": {
            "type": "integer"
          }
        }
      },
      "internal_handlers.PortingAutoActivationRequest": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          },
          "scheduled_at": {
            "type": "string"
          }
        }
      },
      "internal_handlers.PortingAutoFixRequest": {
        "type": "object",
        "properties": {
          "error_group_id": {
            "type": "string"
          },
          "tns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "internal_handlers.PortingCreateDraftRequest": {
        "type": "object",
        "properties": {
          "desired_due_date": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "internal_handlers.PortingCreateDraftResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tniq_project_id": {
            "type": "string"
          }
        }
      },
      "internal_handlers.PortingDeletedResponse": {
        "type": "object",
        "properties": {
          "deleted": {
            "type": "boolean"
          }
        }
      },
      "internal_handlers.PortingDetailResponse": {
        "type": "object",
        "properties": {
          "groups": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "project": {
            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_tniq.PortProjectResponse"
          },
          "request": {
            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_repository.PortRequest"
          }
        }
      },
      "internal_handlers.PortingDocument": {
        "type": "object",
        "properties": {
          "content_type": {
            "type": "string"
          },
          "document_type": {
            "type": "string"
          },
          "file_name": {
            "type": "string"
          },
          "file_size_bytes": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "signed_at": {
            "type": "string"
          },
          "signer_ip": {
            "type": "string"
          },
          "signer_name": {
            "type": "string"
          },
          "tn": {
            "type": "string"
          },
          "uploaded_at": {
            "type": "string"
          }
        }
      },
      "internal_handlers.PortingGroupDetailsRequest": {
        "type": "object",
        "properties": {
          "account_number": {
            "type": "string"
          },
          "btn": {
            "type": "string"
          },
          "business_name": {
            "type": "string"
          },
          "end_user_name": {
            "type": "string"
          },
          "pin": {
            "type": "string"
          },
          "service_address": {
            "type": "string"
          }
        }
      },
      "internal_handlers.PortingMessageResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "internal_handlers.PortingNoteRequest": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          },
          "visibility": {
            "type": "string"
          }
        }
      },
      "internal_handlers.PortingPreviewResponse": {
        "type": "object",
        "properties": {
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_porting.PreviewGroup"
            }
          },
          "tn_count": {
            "type": "integer"
          }
        }
      },
      "internal_handlers.PortingSupplementRequest": {
        "type": "object",
        "properties": {
          "new_ddd": {
            "type": "string"
          },
          "tns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "internal_handlers.PortingTNSelectionRequest": {
        "type": "object",
        "properties": {
          "tns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "internal_handlers.PortingTNsRequest": {
        "type": "object",
        "properties": {
          "tns": {
            "type": "string"
          }
        }
      },
      "internal_handlers.PortingTransferRequest": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/internal_handlers.transferItemReq"
            }
          }
        }
      },
      "internal_handlers.PortingUpdatedResponse": {
        "type": "object",
        "properties": {
          "updated": {
            "type": "integer"
          }
        }
      },
      "internal_handlers.ReleaseNumberRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "internal_handlers.ReleaseNumberResponse": {
        "type": "object",
        "properties": {
          "released": {
            "type": "boolean"
          }
        }
      },
      "internal_handlers.RoleCreatedResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "internal_handlers.RoleUpdatedResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        }
      },
      "internal_handlers.SmsClearedResponse": {
        "type": "object",
        "properties": {
          "sms_cleared": {
            "type": "boolean"
          }
        }
      },
      "internal_handlers.TrunkEndpointResult": {
        "type": "object",
        "properties": {
          "endpoint": {
            "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.TrunkEndpoint"
          },
          "warning": {
            "type": "string"
          }
        }
      },
      "internal_handlers.UpdateMetadataRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "friendly_name": {
            "type": "string"
          }
        }
      },
      "internal_handlers.UpdateSmsUsageRequest": {
        "type": "object",
        "properties": {
          "fallback_inbound_url": {
            "type": "string"
          },
          "inbound_webhook_secret": {
            "type": "string"
          },
          "inbound_webhook_url": {
            "type": "string"
          },
          "mms_enabled": {
            "type": "boolean"
          }
        }
      },
      "internal_handlers.UpdateVoiceUsageRequest": {
        "type": "object",
        "properties": {
          "cnam_display_name": {
            "type": "string"
          },
          "cnam_enabled": {
            "type": "boolean"
          },
          "e911_address_id": {
            "type": "string"
          },
          "e911_enabled": {
            "type": "boolean"
          },
          "trunk_id": {
            "type": "string"
          },
          "voice_destination": {
            "type": "string"
          },
          "voice_failover_destination": {
            "type": "string"
          },
          "voice_routing_type": {
            "type": "string"
          }
        }
      },
      "internal_handlers.VoiceClearedResponse": {
        "type": "object",
        "properties": {
          "voice_cleared": {
            "type": "boolean"
          }
        }
      },
      "internal_handlers.askRequest": {
        "type": "object",
        "properties": {
          "available_forms": {
            "description": "AvailableForms carries the fillable form schema(s) the frontend declares for\nthe current page so the fill_page_form tool can validate the model's proposed\nvalues. Capped server-side (buzz.ClampForms) before it reaches the engine.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/github_com_ringer-warp_api-gateway_internal_buzz.FormSchema"
            }
          },
          "context_entity_id": {
            "type": "string"
          },
          "context_tn": {
            "type": "string"
          },
          "page_label": {
            "type": "string"
          },
          "page_path": {
            "type": "string"
          },
          "page_type": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "session_id": {
            "type": "string"
          }
        }
      },
      "internal_handlers.assignCampaignNumbersResponse": {
        "type": "object",
        "properties": {
          "assigned": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "failed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/internal_handlers.campaignNumberResult"
            }
          }
        }
      },
      "internal_handlers.balancePayload": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string"
          },
          "fetched_at": {
            "type": "string"
          },
          "prepaid_balance": {
            "type": "number"
          }
        }
      },
      "internal_handlers.campaignNumberResult": {
        "type": "object",
        "properties": {
          "reason": {
            "description": "Reason is the per-TN failure reason: not_found, not_owned, lookup_error,\nor write_error.",
            "type": "string"
          },
          "tn": {
            "type": "string"
          }
        }
      },
      "internal_handlers.campaignNumbersRequest": {
        "type": "object",
        "required": [
          "phone_numbers"
        ],
        "properties": {
          "phone_numbers": {
            "description": "PhoneNumbers is the list of telephone numbers to attach or detach.",
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            }
          }
        }
      },
      "internal_handlers.createCredReq": {
        "type": "object",
        "required": [
          "username"
        ],
        "properties": {
          "username": {
            "type": "string"
          }
        }
      },
      "internal_handlers.createMessageRequest": {
        "type": "object",
        "properties": {
          "body": {
            "description": "Body is the message text. Encoding (GSM-7 vs UCS-2) and segment count are\ncomputed automatically from the content.",
            "type": "string",
            "example": "Your verification code is 123456"
          },
          "from": {
            "description": "From is the sending telephone number. Must be a number assigned to your\naccount AND enrolled in an approved 10DLC campaign. NANP format, e.g.\n\"13039813633\".",
            "type": "string",
            "example": "13039813633"
          },
          "status_callback": {
            "description": "StatusCallback is an optional URL that receives message-status webhooks\n(queued → sent → delivered/failed) for this message.",
            "type": "string",
            "example": "https://example.com/webhooks/sms"
          },
          "to": {
            "description": "To is the destination telephone number in E.164 / NANP format, e.g.\n\"13125551212\".",
            "type": "string",
            "example": "13125551212"
          }
        }
      },
      "internal_handlers.createRoleRequest": {
        "type": "object",
        "required": [
          "display_name",
          "name",
          "scopes"
        ],
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 512
          },
          "display_name": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          },
          "name": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1
          },
          "scopes": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            }
          }
        }
      },
      "internal_handlers.duplicateRoleRequest": {
        "type": "object",
        "required": [
          "display_name",
          "name"
        ],
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 512
          },
          "display_name": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          },
          "name": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1
          }
        }
      },
      "internal_handlers.generateDomesticReq": {
        "type": "object",
        "required": [
          "default_rate",
          "dur_incr",
          "dur_min",
          "effective_date"
        ],
        "properties": {
          "default_rate": {
            "type": "number"
          },
          "dur_incr": {
            "type": "integer",
            "minimum": 1
          },
          "dur_min": {
            "type": "integer",
            "minimum": 1
          },
          "effective_date": {
            "description": "YYYY-MM-DD",
            "type": "string"
          },
          "ij_policy": {
            "type": "string",
            "enum": [
              "INTERSTATE",
              "INTRASTATE"
            ]
          },
          "interstate_rate": {
            "type": "number"
          },
          "intrastate_rate": {
            "type": "number"
          },
          "local_rate": {
            "type": "number"
          }
        }
      },
      "internal_handlers.linkBrandRequest": {
        "type": "object",
        "required": [
          "tcr_brand_id"
        ],
        "properties": {
          "tcr_brand_id": {
            "description": "TCRBrandID is the TCR brand ID to link into this account.",
            "type": "string"
          }
        }
      },
      "internal_handlers.linkCampaignRequest": {
        "type": "object",
        "required": [
          "tcr_campaign_id"
        ],
        "properties": {
          "tcr_campaign_id": {
            "description": "TCRCampaignID is the TCR campaign ID to link into this account.",
            "type": "string"
          }
        }
      },
      "internal_handlers.loaRequest": {
        "type": "object",
        "properties": {
          "attestation": {
            "type": "boolean"
          },
          "authorizing_party": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string"
              },
              "company": {
                "type": "string"
              },
              "contact": {
                "type": "string"
              }
            }
          },
          "losing_carrier": {
            "type": "object",
            "properties": {
              "account_number": {
                "type": "string"
              },
              "btn": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "signer": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            }
          }
        }
      },
      "internal_handlers.patchCredReq": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "internal_handlers.previewItem": {
        "type": "object",
        "properties": {
          "eligible": {
            "type": "boolean"
          },
          "on_net": {
            "type": "boolean"
          },
          "owning_customer_ban": {
            "description": "MASKED",
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "tn": {
            "type": "string"
          }
        }
      },
      "internal_handlers.removeCampaignNumbersResponse": {
        "type": "object",
        "properties": {
          "failed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/internal_handlers.campaignNumberResult"
            }
          },
          "removed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "internal_handlers.scopeCategoryDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/internal_handlers.scopeEntryDTO"
            }
          }
        }
      },
      "internal_handlers.scopeEntryDTO": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "display_order": {
            "type": "integer"
          },
          "is_superadmin_only": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "resource_patterns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "internal_handlers.setMemberRoleRequest": {
        "type": "object",
        "required": [
          "role_id"
        ],
        "properties": {
          "role_id": {
            "type": "string"
          }
        }
      },
      "internal_handlers.setPINReq": {
        "type": "object",
        "properties": {
          "pin": {
            "type": "string"
          }
        }
      },
      "internal_handlers.throttleStatePayload": {
        "type": "object",
        "properties": {
          "capacity_channels_inbound": {
            "type": "integer"
          },
          "capacity_channels_outbound": {
            "type": "integer"
          },
          "capacity_cps_inbound": {
            "type": "integer"
          },
          "capacity_cps_outbound": {
            "type": "integer"
          },
          "counters_available": {
            "type": "boolean"
          },
          "current_channels_inbound": {
            "type": "integer"
          },
          "current_channels_outbound": {
            "type": "integer"
          },
          "current_cps_inbound": {
            "type": "integer"
          },
          "current_cps_outbound": {
            "type": "integer"
          },
          "fetched_at": {
            "type": "string"
          },
          "trunk_group_id": {
            "type": "string"
          }
        }
      },
      "internal_handlers.transferItemReq": {
        "type": "object",
        "properties": {
          "pin": {
            "type": "string"
          },
          "tn": {
            "type": "string"
          }
        }
      },
      "internal_handlers.transferResult": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          },
          "tn": {
            "type": "string"
          },
          "transferred": {
            "type": "boolean"
          }
        }
      },
      "internal_handlers.updateRoleRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 512
          },
          "display_name": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "internal_handlers.utilizationPayload": {
        "type": "object",
        "properties": {
          "counters_available": {
            "type": "boolean"
          },
          "current_channels_inbound": {
            "type": "integer"
          },
          "current_channels_outbound": {
            "type": "integer"
          },
          "current_cps_inbound": {
            "type": "integer"
          },
          "current_cps_outbound": {
            "type": "integer"
          },
          "fetched_at": {
            "type": "string"
          },
          "total_capacity_channels_inbound": {
            "type": "integer"
          },
          "total_capacity_channels_outbound": {
            "type": "integer"
          },
          "total_capacity_cps_inbound": {
            "type": "integer"
          },
          "total_capacity_cps_outbound": {
            "type": "integer"
          }
        }
      },
      "net.IPNet": {
        "type": "object",
        "properties": {
          "ip": {
            "description": "network number",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "mask": {
            "description": "network mask",
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          }
        }
      }
    }
  }
}
