{
  "openapi": "3.0.3",
  "info": {
    "title": "Authevo API",
    "version": "1.0.0",
    "description": "WhatsApp OTP verification API — the /v1 contract. Generated from the Fastify route schemas by `npm run gen:openapi`; do not hand-edit openapi.json."
  },
  "components": {
    "schemas": {}
  },
  "paths": {
    "/health": {
      "get": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/health/channels": {
      "get": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/register": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9._%+\\-]+@[a-zA-Z0-9.\\-]+\\.[a-zA-Z]{2,}$"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 8
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "phone": {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{6,14}$"
                  },
                  "company": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "turnstile_token": {
                    "type": "string",
                    "maxLength": 4096
                  }
                },
                "required": [
                  "email",
                  "password",
                  "name",
                  "phone"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/login": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "password"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9._%+\\-]+@[a-zA-Z0-9.\\-]+\\.[a-zA-Z]{2,}$"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 8
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/logout": {
      "post": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/profile": {
      "patch": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "minProperties": 1,
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "phone": {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{6,14}$"
                  },
                  "company": {
                    "type": "string",
                    "maxLength": 120
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/signup-secret": {
      "post": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/session/refresh": {
      "post": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/keys/rotate": {
      "post": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/keys": {
      "get": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "live",
                      "test"
                    ],
                    "default": "live"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/keys/{id}": {
      "delete": {
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/webhook-secret/rotate": {
      "post": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/connect-whatsapp": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "phone_number_id",
                  "access_token"
                ],
                "properties": {
                  "phone_number_id": {
                    "type": "string",
                    "pattern": "^[0-9]{1,20}$"
                  },
                  "access_token": {
                    "type": "string",
                    "minLength": 1
                  },
                  "waba_id": {
                    "type": "string",
                    "pattern": "^[0-9]{1,20}$"
                  },
                  "display_name": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/waba/embedded-signup": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code",
                  "waba_id",
                  "phone_number_id"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  },
                  "waba_id": {
                    "type": "string",
                    "pattern": "^[0-9]{1,20}$"
                  },
                  "phone_number_id": {
                    "type": "string",
                    "pattern": "^[0-9]{1,20}$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/waba/details": {
      "get": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/waba/template/check": {
      "post": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/waba/template/create": {
      "post": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/waba/disconnect": {
      "post": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/me": {
      "get": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/settings": {
      "patch": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "minProperties": 1,
                "properties": {
                  "webhook_url": {
                    "type": "string",
                    "pattern": "^https://[^\\s]+$"
                  },
                  "spend_cap_hourly": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/analytics": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "default": 30
            },
            "in": "query",
            "name": "period",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/analytics/timeseries": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "default": 30
            },
            "in": "query",
            "name": "period",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/analytics/funnel": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "default": 30
            },
            "in": "query",
            "name": "period",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/analytics/channels": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "default": 30
            },
            "in": "query",
            "name": "period",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/otps/recent": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            },
            "in": "query",
            "name": "limit",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/otps": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "in": "query",
            "name": "before",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "sent",
                "verified",
                "failed",
                "expired"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "whatsapp",
                "telegram"
              ]
            },
            "in": "query",
            "name": "channel",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "live",
                "test"
              ]
            },
            "in": "query",
            "name": "mode",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "in": "query",
            "name": "from",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "in": "query",
            "name": "to",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/totp/log": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "in": "query",
            "name": "before",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "verified",
                "failed"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "live",
                "test"
              ]
            },
            "in": "query",
            "name": "mode",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/transactions": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "in": "query",
            "name": "before",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/{provider}/start": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "provider",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/{provider}/callback": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "provider",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/magic-link": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9._%+\\-]+@[a-zA-Z0-9.\\-]+\\.[a-zA-Z]{2,}$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/magic-link/verify": {
      "get": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/password/forgot": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9._%+\\-]+@[a-zA-Z0-9.\\-]+\\.[a-zA-Z]{2,}$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/password/reset": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "password"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "password": {
                    "type": "string",
                    "minLength": 8
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/verify-email": {
      "get": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/verify-email/resend": {
      "post": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/otp/send": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "phone"
                ],
                "properties": {
                  "phone": {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{6,14}$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "message_id": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "expires_in": {
                          "type": "number"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/otp/telegram-link": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "phone"
                ],
                "properties": {
                  "phone": {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{6,14}$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "telegram_bot_url": {
                          "type": "string"
                        },
                        "expires_in": {
                          "type": "number"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/otp/deliver": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "phone",
                  "code"
                ],
                "properties": {
                  "phone": {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{6,14}$"
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^\\d{6}$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/otp/verify": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "phone",
                  "code"
                ],
                "properties": {
                  "phone": {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{6,14}$"
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^\\d{6}$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/otp/status/{message_id}": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "message_id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/totp/enroll": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "phone"
                ],
                "properties": {
                  "phone": {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{6,14}$"
                  },
                  "replace": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "secret": {
                          "type": "string"
                        },
                        "otpauth_url": {
                          "type": "string"
                        },
                        "qr_code": {
                          "type": "string"
                        },
                        "already_enrolled": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/totp/disable": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "phone"
                ],
                "properties": {
                  "phone": {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{6,14}$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "disabled": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/totp/verify": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "phone",
                  "code"
                ],
                "properties": {
                  "phone": {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{6,14}$"
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^\\d{6}$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "verified": {
                          "type": "boolean"
                        },
                        "attempts_remaining": {
                          "type": "integer"
                        },
                        "first_confirm": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/meta": {
      "get": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/telegram": {
      "post": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/payment": {
      "post": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/payment/polar": {
      "post": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/admin/safety-floor-check": {
      "post": {
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-secret",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-actor",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/admin/webhooks/retry-deliveries": {
      "post": {
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-secret",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-actor",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/admin/stats": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-secret",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-actor",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/admin/credits/grant": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount_usd",
                  "reference"
                ],
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "client_id"
                    ]
                  },
                  {
                    "required": [
                      "email"
                    ]
                  }
                ],
                "properties": {
                  "client_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "email": {
                    "type": "string",
                    "minLength": 3
                  },
                  "amount_usd": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 10000
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "reference": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-secret",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-actor",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/admin/reconciliation": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10080,
              "default": 60
            },
            "in": "query",
            "name": "stale_minutes",
            "required": false
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-secret",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-actor",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/admin/central-waba/killswitch": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-secret",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-actor",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "engaged"
                ],
                "additionalProperties": false,
                "properties": {
                  "engaged": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-secret",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-actor",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/admin/free-trial/killswitch": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-secret",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-actor",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "engaged"
                ],
                "additionalProperties": false,
                "properties": {
                  "engaged": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-secret",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-actor",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/admin/playground/killswitch": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-secret",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-actor",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "engaged"
                ],
                "additionalProperties": false,
                "properties": {
                  "engaged": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-secret",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-actor",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/admin/manual-topups": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "pending",
                "submitted",
                "approved",
                "rejected"
              ],
              "default": "open"
            },
            "in": "query",
            "name": "status",
            "required": false
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "in": "query",
            "name": "q",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "in": "query",
            "name": "after_created_at",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
            },
            "in": "query",
            "name": "after_id",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-secret",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-actor",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/admin/manual-topups/{id}/approve": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "reason": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-secret",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-actor",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/admin/manual-topups/{id}/reject": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reason"
                ],
                "additionalProperties": false,
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-secret",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-admin-actor",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/topup": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount_usd"
                ],
                "additionalProperties": false,
                "properties": {
                  "amount_usd": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string"
                        },
                        "provider_ref": {
                          "type": "string"
                        },
                        "amount_usd": {
                          "type": "number"
                        },
                        "surcharge_usd": {
                          "type": "number"
                        },
                        "charge_usd": {
                          "type": "number"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/topup/polar": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount_usd"
                ],
                "additionalProperties": false,
                "properties": {
                  "amount_usd": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string"
                        },
                        "provider_ref": {
                          "type": "string"
                        },
                        "amount_usd": {
                          "type": "number"
                        },
                        "surcharge_usd": {
                          "type": "number"
                        },
                        "charge_usd": {
                          "type": "number"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/manual-topup": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount_usd"
                ],
                "additionalProperties": false,
                "properties": {
                  "amount_usd": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/manual-topup/quote": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "in": "query",
            "name": "amount_usd",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/manual-topup/{id}/cancel": {
      "post": {
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/manual-topup/{id}/proof-url": {
      "post": {
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/manual-topup/{id}/submit": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "txn_id": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "proof_uploaded": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/manual-topups": {
      "get": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/playground/otp/send": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "phone"
                ],
                "properties": {
                  "phone": {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{6,14}$"
                  },
                  "turnstile_token": {
                    "type": "string",
                    "maxLength": 4096
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/playground/otp/verify": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "phone",
                  "code"
                ],
                "properties": {
                  "phone": {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{6,14}$"
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^\\d{6}$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/playground/totp/enroll": {
      "get": {
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/playground/totp/verify": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "pattern": "^\\d{6}$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "default": {
            "description": "Error response (standard envelope). `code` is a stable machine-readable string — e.g. VALIDATION_ERROR (400), UNAUTHORIZED / INVALID_API_KEY (401), RATE_LIMIT_EXCEEDED (429), INTERNAL_ERROR (500); `message` is human-readable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable, machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable description."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.authevo.dev"
    }
  ]
}
