{
  "openapi": "3.0.0",
  "info": {
    "title": "Donutwork API",
    "version": "2026-02-01",
    "description": "Automatically generated API specification from Donutwork documentation."
  },
  "servers": [
    {
      "url": "https://api.hub.donutwork.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/2026-02-01/ping.json": {
      "get": {
        "summary": "Authorization Header",
        "responses": {
          "200": {
            "description": "API is operational and responding.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "success",
                    "env": "production",
                    "RRT": "0.08 ms"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Invalid token"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "ping:read",
        "x-required-permission-constant": "PING_READ"
      }
    },
    "/2026-02-01/connection.json": {
      "get": {
        "summary": "Authorization Header",
        "responses": {
          "200": {
            "description": "Connection metadata retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "client": {
                      "userAgent": "axios/1.6.0",
                      "ips": {
                        "ipv4": "192.168.1.1"
                      }
                    },
                    "endpoint": {
                      "apiVersion": "2026-02-01",
                      "env": "production",
                      "protocol": "HTTP3"
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "connection:read",
        "x-required-permission-constant": "CONNECTION_READ"
      }
    },
    "/2026-02-01/company.json": {
      "get": {
        "summary": "Get Company Profile",
        "responses": {
          "200": {
            "description": "Company profile retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "668ea32f5485467fd7149f48",
                    "name": "Acme Corp"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "company:read",
        "x-required-permission-constant": "COMPANY_READ"
      }
    },
    "/2026-02-01/company/modules.json": {
      "get": {
        "summary": "Get Company Profile",
        "responses": {
          "200": {
            "description": "List of organizational modules.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": [
                    {
                      "id": "recurring-payments",
                      "description": "Automated subscription billing and payment orchestration.",
                      "price": 0,
                      "active": true
                    },
                    {
                      "id": "email-gateway",
                      "description": "Transactional email delivery via unified REST interface.",
                      "price": 0,
                      "active": true
                    },
                    {
                      "id": "geoip",
                      "description": "IPv4 geolocation and regional metadata resolution.",
                      "price": 0,
                      "active": true
                    }
                  ]
                }
              }
            }
          }
        },
        "x-required-scope": "company_modules:read",
        "x-required-permission-constant": "COMPANY_MODULES_READ"
      }
    },
    "/2026-02-01/company/stats/intelligence.json": {
      "get": {
        "summary": "Get Company Profile",
        "responses": {
          "200": {
            "description": "Company intelligence payload retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "kpi": {
                      "mrr_growth": {
                        "raw_percent": 12.3,
                        "display_label": "12.30%"
                      },
                      "total_customers": 120,
                      "active_subscriptions": 93
                    },
                    "usage": {
                      "banner": {
                        "show": false,
                        "status": null,
                        "upgrade_url": null
                      },
                      "widgets": []
                    },
                    "recent_activity": [],
                    "revenue_chart": {
                      "graph": [],
                      "stats": {
                        "one_shot": 0,
                        "subscriptions": 0,
                        "total": 0
                      }
                    },
                    "revenue_insights": {
                      "visible": false,
                      "net_revenue": 0,
                      "tax_total": 0,
                      "discounts_total": 0,
                      "services": [],
                      "top_services": []
                    },
                    "meta": {
                      "company_id": "668ea32f5485467fd7149f48",
                      "year": 2026,
                      "month": 4,
                      "generated_at": "2026-04-15T10:00:00+00:00"
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "company_stats:read",
        "x-required-permission-constant": "COMPANY_STATS_READ"
      }
    },
    "/2026-02-01/company/{vatNumber}.json": {
      "get": {
        "summary": "Get Company Profile",
        "responses": {
          "200": {
            "description": "Public company data found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "vatNumber": "IT12345678901",
                    "name": "Example Solutions S.r.l.",
                    "address": "Corso Vittorio Emanuele II, 1, 00186 Roma RM, Italy",
                    "vies_interrogation": {
                      "valid": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No data available for the specified VAT number.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Company not found"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "companies_open_data:read",
        "x-required-permission-constant": "COMPANIES_OPEN_DATA_READ"
      }
    },
    "/2026-02-01/currencies.json": {
      "get": {
        "summary": "List Enabled Currencies",
        "responses": {
          "200": {
            "description": "List of supported ISO 4217 currency codes (uppercase).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": [
                    "EUR",
                    "USD",
                    "GBP"
                  ]
                }
              }
            }
          }
        },
        "x-required-scope": "currencies:read",
        "x-required-permission-constant": "CURRENCIES_READ"
      }
    },
    "/2026-02-01/currencies/{fromCurrency}/{toCurrency}.json": {
      "post": {
        "summary": "List Enabled Currencies",
        "responses": {
          "200": {
            "description": "Conversion successfully processed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "from": "EUR",
                    "to": "USD",
                    "rate": 1.085,
                    "amount": 108.5
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unsupported base or destination currency code.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Invalid currency passed"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "currencies:write",
        "x-required-permission-constant": "CURRENCIES_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "amount": 100
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/customers.json": {
      "get": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "A paginated list of customers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "Customer",
                    "count": 150,
                    "per_page": 100,
                    "pages": {
                      "current": 1,
                      "max": 2
                    },
                    "elements": [
                      {
                        "id": "67248941cbe2b1ff8b099a6c",
                        "external_id": "CRM-UID-9921",
                        "company_name": "Global Logistics S.A.",
                        "email": "billing@globallogistics.com"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customers:read",
        "x-required-permission-constant": "CUSTOMERS_READ"
      },
      "post": {
        "summary": "List All Customers",
        "responses": {
          "201": {
            "description": "Customer profile successfully created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "customer": {
                      "id": "67c9...",
                      "partner": null
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "A profile with this email or externalId already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "A customer already exists with this email"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customers:write",
        "x-required-permission-constant": "CUSTOMERS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "customer": {
                    "company_name": "Acme Corporation",
                    "first_name": "Jane",
                    "last_name": "Doe",
                    "email": "jane.doe@acme.com",
                    "externalId": "CRM-UID-9921",
                    "address": {
                      "country": "US",
                      "city": "San Francisco",
                      "address": "123 Market St"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/customers/{customerId}.json": {
      "get": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Complete customer profile retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "672489...",
                    "email": "jane.doe@acme.com",
                    "company_name": "Acme Corporation",
                    "externalId": "CRM-UID-9921"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customers:read",
        "x-required-permission-constant": "CUSTOMERS_READ"
      },
      "put": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Customer profile successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "customer": {
                      "id": "6724..."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customers:write",
        "x-required-permission-constant": "CUSTOMERS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "customer": {
                    "email": "updated.contact@acme.com",
                    "tags": [
                      "enterprise",
                      "priority-support"
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "List All Customers",
        "responses": {
          "202": {
            "description": "Deletion request accepted and queued for processing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "67c9...",
                    "deleted": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customers:write",
        "x-required-permission-constant": "CUSTOMERS_WRITE"
      }
    },
    "/2026-02-01/customers/customer.json": {
      "get": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Customer profile found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "672489...",
                    "email": "jane.doe@acme.com",
                    "externalId": "CRM-UID-9921"
                  }
                }
              }
            }
          },
          "404": {
            "description": "No customer matches the provided externalId.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "This customer does not exist"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customers:read",
        "x-required-permission-constant": "CUSTOMERS_READ"
      }
    },
    "/2026-02-01/customers/{customerId}/properties.json": {
      "get": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Collection of customer-specific properties retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "count": 2,
                    "type": "CustomerProperties",
                    "elements": {
                      "crm_segment": "enterprise",
                      "onboarding_status": "completed"
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_properties:read",
        "x-required-permission-constant": "CUSTOMER_PROPERTIES_READ"
      },
      "put": {
        "summary": "List All Customers",
        "responses": {
          "202": {
            "description": "Properties successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "customer": {
                      "id": "6724..."
                    },
                    "CustomerProperties": {
                      "support_tier": "platinum",
                      "preferred_language": "en"
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_properties:write",
        "x-required-permission-constant": "CUSTOMER_PROPERTIES_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "CustomerProperties": {
                    "support_tier": "platinum",
                    "preferred_language": "en"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/customers/{customerId}/payment_link.json": {
      "get": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Secure payment link generated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "url": "https://pay.donutwork.com/l/xxxxxxxxxx"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customers:read",
        "x-required-permission-constant": "CUSTOMERS_READ"
      }
    },
    "/2026-02-01/customers/{customerId}/subscriptions.json": {
      "get": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "A list of customer subscriptions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "type": "CustomerSubscriptions",
                    "elements": [
                      {
                        "id": "sub_123",
                        "name": "Enterprise SaaS Plan",
                        "status": "success",
                        "next_renew": "2026-04-01",
                        "price": {
                          "amount": 499,
                          "vat": {
                            "percentage": 22,
                            "name": "IVA"
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:read",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_READ"
      },
      "post": {
        "summary": "List All Customers",
        "responses": {
          "201": {
            "description": "Subscription successfully provisioned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "sub_67c9...",
                    "status": "active"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:write",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "subscription": {
                    "id": "PLAN_PREMIUM_V2",
                    "taxes": "TAX_STANDARD_22",
                    "global_discount": {
                      "value": 15,
                      "type": "percentage"
                    },
                    "addons": [
                      {
                        "element": "api_quota",
                        "quantity": 10000
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/customers/{customerId}/subscriptions/{subscriptionId}.json": {
      "delete": {
        "summary": "List All Customers",
        "responses": {
          "202": {
            "description": "Subscription detached from customer profile.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "sub_67c9...",
                    "deleted": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:write",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_WRITE"
      },
      "post": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Usage successfully recorded.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "usage_67c9...",
                    "amount": 10.5
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:write",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "usage": {
                    "amount": 10.5,
                    "value": 100,
                    "value_type": "api_requests",
                    "externalId": "evt_unique_uuid_123"
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Paginated usage history retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "type": "CustomerSubscriptionUsages",
                    "elements": []
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:read",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_READ"
      }
    },
    "/2026-02-01/customers/{customerId}/subscriptions/{subscriptionId}/status.json": {
      "get": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Current status for the selected subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "sub_123",
                    "status": "active",
                    "next_renew": "2026-05-01"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Subscription does not exist for the specified customer.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "This subscription does not exists for this customer"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:read",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_READ"
      },
      "put": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Status successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "sub_123",
                    "status": "dismiss",
                    "next_renew": null
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:write",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "subscription": {
                    "status": "dismiss"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/customers/{customerId}/subscriptions/{subscriptionId}/lifecycle.json": {
      "get": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Extended lifecycle metadata for the subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "sub_123",
                    "status": "success",
                    "lifecycle_status": "active",
                    "cancel_at_period_end": false,
                    "scheduled_change": null,
                    "carryover_credit": 0
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:read",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_READ"
      }
    },
    "/2026-02-01/customers/{customerId}/subscriptions/{subscriptionId}/lifecycle/pause.json": {
      "put": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Lifecycle transition applied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "sub_123",
                    "lifecycle_status": "paused",
                    "amendment": {
                      "action": "pause",
                      "status": "applied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:write",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "lifecycle": {
                    "idempotency_key": "lifecycle-evt-001"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/customers/{customerId}/subscriptions/{subscriptionId}/lifecycle/change-plan.json": {
      "put": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Plan change accepted (immediate or scheduled).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "sub_123",
                    "scheduled_change": {
                      "type": "plan",
                      "apply_on": "2026-06-01"
                    },
                    "amendment": {
                      "action": "change_plan",
                      "status": "applied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:write",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "lifecycle": {
                    "plan_id": "PLAN_ENTERPRISE_V3",
                    "taxes": "TAX_STANDARD_22",
                    "when": "period_end",
                    "proration": true
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/customers/{customerId}/subscriptions/{subscriptionId}/lifecycle/change-addons.json": {
      "put": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Addon amendment applied with optional proration.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "sub_123",
                    "carryover_credit": 18.5,
                    "amendment": {
                      "action": "change_addons",
                      "status": "applied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:write",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_WRITE",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "lifecycle": {
                    "addons": [
                      {
                        "element": "workspace_seat",
                        "quantity": 25
                      }
                    ],
                    "when": "immediate",
                    "proration": true
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/customers/{customerId}/subscriptions/{subscriptionId}/lifecycle/preview.json": {
      "post": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Economic preview of the amendment without persisting changes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "action": "change_addons",
                    "proration": {
                      "old_due": 499,
                      "new_due": 679,
                      "delta": 180,
                      "direction": "debit"
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:read",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_READ",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "lifecycle": {
                    "action": "change_addons",
                    "addons": [
                      {
                        "element": "workspace_seat",
                        "quantity": 40
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/customers/{customerId}/subscriptions/{subscriptionId}/amendments.json": {
      "get": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Paginated amendment stream for audit and support operations.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "type": "CustomerSubscriptionAmendments",
                    "elements": [
                      {
                        "action": "change_addons",
                        "when": "immediate",
                        "status": "applied"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:read",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_READ"
      }
    },
    "/2026-02-01/customers/{customerId}/subscriptions/{subscriptionId}/addons.json": {
      "get": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "List of provisioned addons.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": [
                    {
                      "element": "compute_units",
                      "quantity": 10
                    },
                    {
                      "element": "secondary_domains",
                      "quantity": 2
                    }
                  ]
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:read",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_READ"
      },
      "put": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Addon quantities successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "updated"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:write",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "addons": [
                    {
                      "element": "compute_units",
                      "quantity": 15
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/customers/{customerId}/subscriptions/simulate/{subscriptionId}.json": {
      "post": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "200 OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "simulated_success"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:write",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_WRITE"
      },
      "delete": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "200 OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "simulated_failure"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "customer_subscriptions:write",
        "x-required-permission-constant": "CUSTOMER_SUBSCRIPTIONS_WRITE"
      }
    },
    "/2026-02-01/customers/{customerId}/charges.json": {
      "post": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Charge created and payment status returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "success",
                    "id": "ch_777",
                    "captured": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "charges:write",
        "x-required-permission-constant": "CHARGES_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "charge": {
                    "capture": true,
                    "services": [
                      {
                        "name": "Technical Consulting",
                        "amount": 250,
                        "taxProfile": "TAX_SERVICES_22"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "List of customer-specific charges.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "type": "CustomerCharges",
                    "elements": []
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "charges:read",
        "x-required-permission-constant": "CHARGES_READ"
      }
    },
    "/2026-02-01/customers/{customerId}/charges/{chargeId}.json": {
      "get": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Full charge metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "ch_777",
                    "customer_id": "cust_123",
                    "total": 305,
                    "type": "one-shot",
                    "status": "paid",
                    "statuses": {
                      "pending": false,
                      "paid": true,
                      "refunded": false
                    },
                    "date": {
                      "date": "2026-03-01 10:00:00.000000",
                      "timezone": "+00:00"
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "charges:read",
        "x-required-permission-constant": "CHARGES_READ"
      }
    },
    "/2026-02-01/customers/{customerId}/charges/{chargeId}/invoice.json": {
      "get": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Invoice synchronization details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "number": "INV-2026-001",
                    "date": "2026-03-01",
                    "source": "accounting-system",
                    "link": "https://docs.acme.com/inv/123.pdf"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "charges:read",
        "x-required-permission-constant": "CHARGES_READ"
      },
      "put": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "200 OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "success"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "charges:write",
        "x-required-permission-constant": "CHARGES_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "invoice": {
                    "number": "INV-2026-001",
                    "date": "2026-03-01",
                    "source": "erp-system",
                    "link": "https://erp.example.com/invoices/991.pdf"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/charges/{chargeId}.json": {
      "get": {
        "summary": "List All Customers",
        "responses": {
          "200": {
            "description": "Charge metadata resolved globally.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "ch_777",
                    "customer_id": "cust_123"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "charges:read",
        "x-required-permission-constant": "CHARGES_READ"
      }
    },
    "/2026-02-01/directory-monitor/{projectId}.json": {
      "post": {
        "summary": "Initialize Monitor (Startup)",
        "responses": {
          "200": {
            "description": "Monitor successfully initialized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "success",
                    "projectId": "proj_123"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "directory_monitor:write",
        "x-required-permission-constant": "DIRECTORY_MONITOR_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "ingressToken": "DM_SECURE_TOKEN_XYZ"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Initialize Monitor (Startup)",
        "responses": {
          "200": {
            "description": "Event successfully ingested and indexed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "success",
                    "eventId": "evt_7721...",
                    "projectId": "proj_123",
                    "inserted": true,
                    "workflowTriggered": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "directory_monitor:write",
        "x-required-permission-constant": "DIRECTORY_MONITOR_WRITE",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Must match the projectId in the path."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "projectId": "proj_123",
                  "filename": "src/controllers/UserController.php",
                  "event": "modified",
                  "filesize": 4096,
                  "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
                  "uid": 1000,
                  "pid": 4512
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/systems/directory-monitor/{projectId}/events.json": {
      "get": {
        "summary": "Initialize Monitor (Startup)",
        "responses": {
          "200": {
            "description": "Collection of project events retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "fetch",
                    "projectId": "proj_123",
                    "page": 1,
                    "size": 50,
                    "count": 120,
                    "items": []
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "directory_monitor:read",
        "x-required-permission-constant": "DIRECTORY_MONITOR_READ"
      }
    },
    "/2026-02-01/dns/capabilities.json": {
      "get": {
        "summary": "DNS Capabilities",
        "responses": {
          "200": {
            "description": "Supported record types, default record types, and resolver catalog.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "recordTypes": [
                      "A",
                      "AAAA",
                      "CNAME",
                      "TXT",
                      "MX",
                      "NS",
                      "SOA",
                      "CAA",
                      "SRV"
                    ],
                    "defaultRecordTypes": [
                      "A",
                      "AAAA",
                      "CNAME",
                      "TXT"
                    ],
                    "resolvers": [
                      {
                        "id": "cloudflare_primary",
                        "label": "Cloudflare (1.1.1.1)",
                        "server": "1.1.1.1"
                      },
                      {
                        "id": "google_primary",
                        "label": "Google (8.8.8.8)",
                        "server": "8.8.8.8"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "dns:read",
        "x-required-permission-constant": "DNS_READ"
      }
    },
    "/2026-02-01/dns/lookup.json": {
      "get": {
        "summary": "DNS Capabilities",
        "responses": {
          "200": {
            "description": "DNS lookup completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "target": "example.com",
                    "generated_at": "2026-04-15T10:00:00+00:00",
                    "recordTypes": [
                      "A",
                      "AAAA"
                    ],
                    "resolver_count": 2,
                    "resolvers": [
                      {
                        "id": "cloudflare_primary",
                        "label": "Cloudflare (1.1.1.1)",
                        "server": "1.1.1.1"
                      },
                      {
                        "id": "google_primary",
                        "label": "Google (8.8.8.8)",
                        "server": "8.8.8.8"
                      }
                    ],
                    "propagation": {
                      "A": {
                        "is_consistent": true,
                        "distinct_statuses": 1,
                        "distinct_answers": 1
                      }
                    },
                    "queries": {
                      "A": [
                        {
                          "resolver_label": "Cloudflare (1.1.1.1)",
                          "resolver": "1.1.1.1",
                          "record_type": "A",
                          "status": "NOERROR",
                          "server": "1.1.1.1#53",
                          "query_time_ms": 12,
                          "answers": [
                            {
                              "name": "example.com.",
                              "ttl": 300,
                              "class": "IN",
                              "type": "A",
                              "value": "93.184.216.34"
                            }
                          ],
                          "answer_signature": "A|93.184.216.34",
                          "error": null
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing target.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "target is required"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "dns:read",
        "x-required-permission-constant": "DNS_READ"
      },
      "post": {
        "summary": "DNS Capabilities",
        "responses": {
          "200": {
            "description": "DNS lookup completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "target": "example.com",
                    "generated_at": "2026-04-15T10:00:00+00:00",
                    "recordTypes": [
                      "A",
                      "AAAA"
                    ],
                    "resolver_count": 2,
                    "resolvers": [
                      {
                        "id": "cloudflare_primary",
                        "label": "Cloudflare (1.1.1.1)",
                        "server": "1.1.1.1"
                      },
                      {
                        "id": "google_primary",
                        "label": "Google (8.8.8.8)",
                        "server": "8.8.8.8"
                      }
                    ],
                    "propagation": {
                      "A": {
                        "is_consistent": true,
                        "distinct_statuses": 1,
                        "distinct_answers": 1
                      }
                    },
                    "queries": {
                      "A": [
                        {
                          "resolver_label": "Cloudflare (1.1.1.1)",
                          "resolver": "1.1.1.1",
                          "record_type": "A",
                          "status": "NOERROR",
                          "server": "1.1.1.1#53",
                          "query_time_ms": 12,
                          "answers": [
                            {
                              "name": "example.com.",
                              "ttl": 300,
                              "class": "IN",
                              "type": "A",
                              "value": "93.184.216.34"
                            }
                          ],
                          "answer_signature": "A|93.184.216.34",
                          "error": null
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "dns:write",
        "x-required-permission-constant": "DNS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "target": "example.com",
                  "recordTypes": [
                    "A",
                    "AAAA"
                  ],
                  "resolverPreset": [
                    "public"
                  ],
                  "customResolvers": "1.1.1.1 8.8.8.8",
                  "resolvers": [
                    "9.9.9.9"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/contentbox/contents.json": {
      "get": {
        "summary": "Content Entity Management",
        "responses": {
          "200": {
            "description": "Collection of content entities retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "Contents",
                    "count": 12,
                    "per_page": 50,
                    "elements": [
                      {
                        "id": "6768...",
                        "type_id": "6751...",
                        "title": "Q1 Product Launch",
                        "state": "public",
                        "data": {
                          "headline": "Introducing the 2026 Fleet",
                          "hero_image": "https://cdn.acme.com/img/l1.jpg",
                          "featured": true
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "contentbox_contents:read",
        "x-required-permission-constant": "CONTENTBOX_CONTENTS_READ"
      },
      "post": {
        "summary": "Content Entity Management",
        "responses": {
          "201": {
            "description": "Content entity successfully provisioned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "6768..."
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "contentbox_contents:write",
        "x-required-permission-constant": "CONTENTBOX_CONTENTS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "content": {
                    "title": "Annual Sustainability Report",
                    "type_id": "675112233b498f30",
                    "state": "draft",
                    "data": {
                      "period": "2025",
                      "impact_score": 92
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/contentbox/contents/{contentId}.json": {
      "put": {
        "summary": "Content Entity Management",
        "responses": {
          "200": {
            "description": "Content entity successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "6768...",
                    "updated": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "contentbox_contents:write",
        "x-required-permission-constant": "CONTENTBOX_CONTENTS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "content": {
                    "state": "public",
                    "data": {
                      "revised_at": "2026-03-01T10:00:00Z"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Content Entity Management",
        "responses": {
          "200": {
            "description": "Content entity retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "6768...",
                    "title": "Q1 Product Launch",
                    "state": "public",
                    "data": {}
                  }
                }
              }
            }
          },
          "404": {
            "description": "Content entry does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Content Box not found"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "contentbox_contents:read",
        "x-required-permission-constant": "CONTENTBOX_CONTENTS_READ"
      },
      "delete": {
        "summary": "Content Entity Management",
        "responses": {
          "202": {
            "description": "Deletion request processed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "6768...",
                    "deleted": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "contentbox_contents:write",
        "x-required-permission-constant": "CONTENTBOX_CONTENTS_WRITE"
      }
    },
    "/2026-02-01/contentbox/types.json": {
      "get": {
        "summary": "Content Entity Management",
        "responses": {
          "200": {
            "description": "Collection of content type definitions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "Types",
                    "count": 1,
                    "elements": [
                      {
                        "id": "6751...",
                        "title": "Corporate Blog",
                        "description": "Schema for official news",
                        "fields": {
                          "author": {
                            "label": "Author",
                            "type": "string"
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "contentbox_types:read",
        "x-required-permission-constant": "CONTENTBOX_TYPES_READ"
      },
      "post": {
        "summary": "Content Entity Management",
        "responses": {
          "201": {
            "description": "Content type definition created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "6751...",
                    "title": "E-Commerce Product"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "contentbox_types:write",
        "x-required-permission-constant": "CONTENTBOX_TYPES_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "type": {
                    "title": "E-Commerce Product",
                    "description": "Standardized schema for catalog items.",
                    "fields": {
                      "sku": {
                        "label": "SKU",
                        "type": "string"
                      },
                      "price": {
                        "label": "Unit Price",
                        "type": "string"
                      },
                      "in_stock": {
                        "label": "Inventory Status",
                        "type": "checkbox"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/contentbox/types/{typeId}.json": {
      "get": {
        "summary": "Content Entity Management",
        "responses": {
          "200": {
            "description": "Full schema definition retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "6751...",
                    "title": "Corporate Blog",
                    "fields": {}
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "contentbox_types:read",
        "x-required-permission-constant": "CONTENTBOX_TYPES_READ"
      },
      "put": {
        "summary": "Content Entity Management",
        "responses": {
          "200": {
            "description": "Content type updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "6751...",
                    "title": "Corporate Blog",
                    "description": "Schema for official company news",
                    "fields": {}
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid fields payload or field type.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Fields must be an associative array"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "contentbox_types:write",
        "x-required-permission-constant": "CONTENTBOX_TYPES_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "type": {
                    "title": "Corporate Blog",
                    "description": "Schema for official company news",
                    "fields": {
                      "author": {
                        "label": "Author",
                        "type": "string"
                      },
                      "hero_image": {
                        "label": "Hero Image",
                        "type": "url"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/email-gateway/templates.json": {
      "get": {
        "summary": "List Templates",
        "responses": {
          "200": {
            "description": "Template list returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "Email Templates",
                    "count": 2,
                    "per_page": 100,
                    "pages": {
                      "current": 1,
                      "max": 1
                    },
                    "elements": [
                      {
                        "id": "welcome.html",
                        "endpoint": [
                          {
                            "type": "POST",
                            "action": "Send email using this template",
                            "url": "https://api.hub.donutwork.com/2026-02-01/email-gateway/welcome.html/send.json"
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "email_templates:read",
        "x-required-permission-constant": "EMAIL_TEMPLATES_READ"
      },
      "post": {
        "summary": "List Templates",
        "responses": {
          "201": {
            "description": "Template created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "welcome.html"
                  }
                }
              }
            }
          },
          "409": {
            "description": "Template already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Template already exists"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "email_templates:write",
        "x-required-permission-constant": "EMAIL_TEMPLATES_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "template": {
                    "id": "welcome.html",
                    "content": "<h1>Hello FIRST_NAME</h1>"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/email-gateway/templates/{templateId}.json": {
      "get": {
        "summary": "List Templates",
        "responses": {
          "200": {
            "description": "Template returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "welcome.html",
                    "content": "<h1>Hello FIRST_NAME</h1>"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Template not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Template not found"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "email_templates:read",
        "x-required-permission-constant": "EMAIL_TEMPLATES_READ"
      },
      "put": {
        "summary": "List Templates",
        "responses": {
          "200": {
            "description": "Template updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "welcome.html",
                    "updated": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "email_templates:write",
        "x-required-permission-constant": "EMAIL_TEMPLATES_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "template": {
                    "content": "<h1>Hello FIRST_NAME</h1><p>Updated</p>"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "List Templates",
        "responses": {
          "202": {
            "description": "Template deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "welcome.html",
                    "deleted": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "email_templates:write",
        "x-required-permission-constant": "EMAIL_TEMPLATES_WRITE"
      }
    },
    "/2026-02-01/email-gateway/templates/{templateId}/preview.json": {
      "post": {
        "summary": "List Templates",
        "responses": {
          "200": {
            "description": "Rendered HTML preview returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "template_id": "welcome.html",
                    "html": "<h1>Hello Alex</h1>"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "email_templates:write",
        "x-required-permission-constant": "EMAIL_TEMPLATES_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "preview": {
                    "vars": {
                      "first_name": "Alex"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/email-gateway/{templateId}/send.json": {
      "post": {
        "summary": "List Templates",
        "responses": {
          "201": {
            "description": "Email accepted for delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "email": {
                      "id": "msg_123"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Template not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Template not found or empty"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "email_messages:write",
        "x-required-permission-constant": "EMAIL_MESSAGES_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "email": {
                    "to": "recipient@example.com",
                    "subject": "Operational Update",
                    "from": "notifications@example.com",
                    "cc": [
                      "ops@example.com"
                    ],
                    "vars": {
                      "first_name": "Alex"
                    },
                    "attachments": [
                      {
                        "content": "SGVsbG8gd29ybGQ=",
                        "filename": "summary.txt",
                        "type": "text/plain"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/countries/countries.json": {
      "get": {
        "summary": "Infrastructure Health (Ping)",
        "responses": {
          "200": {
            "description": "Global country directory retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": [
                    {
                      "code": "US",
                      "name": "United States"
                    },
                    {
                      "code": "GB",
                      "name": "United Kingdom"
                    },
                    {
                      "code": "IT",
                      "name": "Italy"
                    },
                    {
                      "code": "DE",
                      "name": "Germany"
                    },
                    {
                      "code": "FR",
                      "name": "France"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-required-scope": "countries:read",
        "x-required-permission-constant": "COUNTRIES_READ"
      }
    },
    "/2026-02-01/geoip/ip.json": {
      "get": {
        "summary": "Intelligence Resolution (Geo-Location)",
        "responses": {
          "200": {
            "description": "IP intelligence profile successfully resolved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "requested_ip": "8.8.8.8",
                    "geolocation": {
                      "as_domain": "google.com",
                      "as_name": "Google LLC",
                      "asn": "AS15169",
                      "continent": "NA",
                      "country": "US",
                      "country_name": "United States"
                    },
                    "country_metadata": {
                      "name": "United States",
                      "phone": [
                        1
                      ],
                      "capital": "Washington D.C.",
                      "currency": [
                        "USD",
                        "USN",
                        "USS"
                      ],
                      "languages": [
                        "en"
                      ]
                    },
                    "threats": [
                      "proxy",
                      "vpn"
                    ],
                    "_credits": "IP address data powered by https://ipinfo.io"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The provided IP address is malformed or resolution failed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Unable to get info for this IP Address"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "geoip:read",
        "x-required-permission-constant": "GEOIP_READ"
      }
    },
    "/2026-02-01/idp/user.json": {
      "post": {
        "summary": "Identity Management",
        "responses": {
          "201": {
            "description": "User identity successfully provisioned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "user": {
                      "id": "6908bffd...",
                      "external_id": "ORG_USR_9921_AFG",
                      "status": "active"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Identity already exists for the specified external_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "User with this external_id already exists for this company"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "idp:write",
        "x-required-permission-constant": "IDP_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "user": {
                    "external_id": "ORG_USR_9921_AFG"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/idp/{externalUserId}.json": {
      "get": {
        "summary": "Identity Management",
        "responses": {
          "200": {
            "description": "Identity profile retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "6908...",
                    "external_id": "ORG_USR_9921_AFG",
                    "status": "active",
                    "has_otp": true,
                    "has_passkeys": false,
                    "is_locked": false,
                    "failed_attempts": 0,
                    "saas_client_id": "67c9..."
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "idp:read",
        "x-required-permission-constant": "IDP_READ"
      }
    },
    "/2026-02-01/idp/{externalUserId}/otp.json": {
      "post": {
        "summary": "Identity Management",
        "responses": {
          "200": {
            "description": "New MFA secret successfully generated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "user": {
                      "external_id": "ORG_USR_9921_AFG",
                      "new_otp_secret": "REDACTED_OTP_SECRET",
                      "qrcode_payload": "otpauth://totp/Acme+Enterprise:alexander%40enterprise.com?secret=REDACTED_OTP_SECRET&issuer=Acme+Enterprise",
                      "is_setup_complete": true
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "idp:write",
        "x-required-permission-constant": "IDP_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "otp": {
                    "issuer_name": "Acme Enterprise",
                    "account_name": "alexander@enterprise.com"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/idp/otp/verify.json": {
      "post": {
        "summary": "Identity Management",
        "responses": {
          "200": {
            "description": "Authentication successful.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "success",
                    "id": "ORG_USR_9921_AFG",
                    "message": "OTP verified successfully."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials or code expired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Invalid credentials or access denied"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "idp:write",
        "x-required-permission-constant": "IDP_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "otp": {
                    "id": "ORG_USR_9921_AFG",
                    "code": "552192"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/idp/{externalUserId}/backupcodes.json": {
      "post": {
        "summary": "Identity Management",
        "responses": {
          "200": {
            "description": "Set of 10 backup codes generated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "user": {
                      "id": "ORG_USR_9921_AFG",
                      "backupCodes": [
                        "ABCD-1234",
                        "EFGH-5678",
                        "..."
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "idp:write",
        "x-required-permission-constant": "IDP_WRITE"
      }
    },
    "/2026-02-01/sentinel/verify.json": {
      "post": {
        "summary": "Identity Management",
        "responses": {
          "200": {
            "description": "Risk assessment completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "authorized",
                    "risk_score": 0.05,
                    "recommendation": "allow"
                  }
                }
              }
            }
          },
          "403": {
            "description": "High-risk indicators detected.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "High risk detection",
                    "risk_score": 0.95
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "sentinel:write",
        "x-required-permission-constant": "SENTINEL_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "sentinel": {
                    "id": "6908bffd...",
                    "context": {
                      "ip": "1.1.1.1",
                      "ua": "EnterpriseAgent/1.0"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/integrations.json": {
      "get": {
        "summary": "Lifecycle Management",
        "responses": {
          "200": {
            "description": "Integration directory successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "Integration",
                    "count": 1,
                    "per_page": 100,
                    "pages": {
                      "current": 1,
                      "max": 1
                    },
                    "elements": [
                      {
                        "id": "6908bffd...",
                        "handler": "STRIPE_CONNECT",
                        "name": "Stripe Global Payments",
                        "status": "connected"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "integrations:read",
        "x-required-permission-constant": "INTEGRATIONS_READ"
      },
      "put": {
        "summary": "Lifecycle Management",
        "responses": {
          "200": {
            "description": "Capabilities successfully registered.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "success": true,
                    "message": "Capabilities declared successfully for MY_CUSTOM_APP",
                    "app_handler": "MY_CUSTOM_APP",
                    "actions_count": 1
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "integrations:write",
        "x-required-permission-constant": "INTEGRATIONS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "app_token": "ext_auth_token_9921",
                  "capabilities": [
                    {
                      "action": "SYNC_INVENTORY",
                      "method": "POST",
                      "endpoint": "https://api.myapp.com/v1/sync",
                      "inputs": [
                        {
                          "name": "sku",
                          "type": "string",
                          "required": true
                        },
                        {
                          "name": "quantity",
                          "type": "number",
                          "required": true
                        }
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/integrations/{appHandler}.json": {
      "get": {
        "summary": "Lifecycle Management",
        "responses": {
          "200": {
            "description": "Detailed integration profile retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "6908...",
                    "handler": "SLACK_ENT",
                    "status": "connected",
                    "actions": [
                      {
                        "name": "SEND_MESSAGE",
                        "method": "POST"
                      }
                    ],
                    "metadata": {
                      "workspace": "AcmeHQ"
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "integrations:read",
        "x-required-permission-constant": "INTEGRATIONS_READ"
      }
    },
    "/2026-02-01/integrations/{appHandler}/{appAction}.json": {
      "post": {
        "summary": "Lifecycle Management",
        "responses": {
          "200": {
            "description": "Action executed and external response relayed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "success": true,
                    "integration": "SLACK_ENT",
                    "action": "SEND_MESSAGE",
                    "external_status": 200,
                    "response": {
                      "ok": true,
                      "ts": "123456789.0001"
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "integrations:write",
        "x-required-permission-constant": "INTEGRATIONS_WRITE"
      },
      "get": {
        "summary": "Lifecycle Management",
        "responses": {
          "200": {
            "description": "Action executed using GET forwarding.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "success": true,
                    "integration": "SLACK_ENT",
                    "action": "GET_CHANNEL_INFO",
                    "external_status": 200,
                    "response": {}
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "integrations:read",
        "x-required-permission-constant": "INTEGRATIONS_READ"
      },
      "put": {
        "summary": "Lifecycle Management",
        "responses": {
          "200": {
            "description": "Action executed using PUT forwarding.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "success": true,
                    "integration": "SLACK_ENT",
                    "action": "UPSERT_TEMPLATE",
                    "external_status": 200,
                    "response": {}
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "integrations:write",
        "x-required-permission-constant": "INTEGRATIONS_WRITE"
      },
      "delete": {
        "summary": "Lifecycle Management",
        "responses": {
          "200": {
            "description": "Action executed using DELETE forwarding.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "success": true,
                    "integration": "SLACK_ENT",
                    "action": "DELETE_MESSAGE",
                    "external_status": 200,
                    "response": {}
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "integrations:write",
        "x-required-permission-constant": "INTEGRATIONS_WRITE"
      }
    },
    "/2026-02-01/integrations/{appHandler}/events/{eventName}/emit.json": {
      "post": {
        "summary": "Lifecycle Management",
        "responses": {
          "200": {
            "description": "Event accepted and dispatched.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "success": true,
                    "app_handler": "SLACK",
                    "event": "Slack.MESSAGE_SENT",
                    "queued_workflows": 1
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "integration_events:write",
        "x-required-permission-constant": "INTEGRATION_EVENTS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "metadata": {
                    "message_id": "msg_001",
                    "status": "sent"
                  },
                  "entity_id": "SLACK_ENT"
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/job-runner.json": {
      "get": {
        "summary": "List Jobs",
        "responses": {
          "200": {
            "description": "Job runner list returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "JobRunner",
                    "count": 1,
                    "per_page": 50,
                    "pages": {
                      "current": 1,
                      "max": 1
                    },
                    "elements": [
                      {
                        "id": "681f10...",
                        "title": "Sync CRM Contacts",
                        "method": "POST",
                        "url": "https://api.partner.com/sync",
                        "content_type": "application/json",
                        "has_body": true,
                        "schedulation": [
                          "08:00",
                          "14:30"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "job_runner:read",
        "x-required-permission-constant": "JOB_RUNNER_READ"
      },
      "post": {
        "summary": "List Jobs",
        "responses": {
          "201": {
            "description": "Job runner created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "681f10...",
                    "created": true
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error on payload.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Invalid schedulation time \"24:30\". Use HH:mm format"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "job_runner:write",
        "x-required-permission-constant": "JOB_RUNNER_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "jobrunner": {
                    "title": "Sync CRM Contacts",
                    "method": "POST",
                    "url": "https://api.partner.com/sync",
                    "content_type": "application/json",
                    "body": "{\"scope\":\"daily\"}",
                    "schedulation": [
                      "08:00",
                      "14:30"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/job-runner/{jobRunnerId}/run.json": {
      "post": {
        "summary": "List Jobs",
        "responses": {
          "200": {
            "description": "Job execution completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "job_runner_id": "681f10...",
                    "status": "success",
                    "headers": [
                      "HTTP/1.1 200 OK"
                    ],
                    "response": "{\"ok\":true}",
                    "ms": 122.45
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "job_runner:write",
        "x-required-permission-constant": "JOB_RUNNER_WRITE"
      }
    },
    "/2026-02-01/job-runner/{jobRunnerId}.json": {
      "delete": {
        "summary": "List Jobs",
        "responses": {
          "202": {
            "description": "Job runner deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "681f10...",
                    "deleted": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "job_runner:write",
        "x-required-permission-constant": "JOB_RUNNER_WRITE"
      }
    },
    "/2026-02-01/kms.json": {
      "get": {
        "summary": "Secret Management",
        "responses": {
          "200": {
            "description": "Secret inventory successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "KMSEntry",
                    "count": 12,
                    "per_page": 100,
                    "pages": {
                      "current": 1,
                      "max": 1
                    },
                    "elements": [
                      {
                        "id": "6835c2cd...",
                        "name": "Production AWS S3 Access",
                        "handler": "aws-s3-prod-credentials"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "kms:read",
        "x-required-permission-constant": "KMS_READ"
      }
    },
    "/2026-02-01/kms/{handler}.json": {
      "get": {
        "summary": "Secret Management",
        "responses": {
          "200": {
            "description": "Secret configuration retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "6835c2cd...",
                    "name": "Production AWS S3 Access",
                    "handler": "aws-s3-prod-credentials",
                    "whitelist": [
                      "52.1.2.3",
                      "54.0.0.1"
                    ],
                    "properties": {
                      "region": "us-east-1"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The specified handler does not exist in the vault.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "This KMSEntry does not exist"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "kms:read",
        "x-required-permission-constant": "KMS_READ"
      }
    },
    "/2026-02-01/kms/reveal/{handler}.json": {
      "get": {
        "summary": "Secret Management",
        "responses": {
          "200": {
            "description": "Secret successfully decrypted and returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "content": "EXAMPLE_ACCESS_KEY_REDACTED"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Requesting IP is not in the authorized whitelist or permissions are insufficient.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Unauthorized to reveal this KMS Entry"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "kms:read",
        "x-required-permission-constant": "KMS_READ"
      }
    },
    "/2026-02-01/media-library/files.json": {
      "get": {
        "summary": "Strategy",
        "responses": {
          "200": {
            "description": "Media file list returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "MediaLibraryFile",
                    "count": 1,
                    "per_page": 60,
                    "pages": {
                      "current": 1,
                      "max": 1
                    },
                    "elements": [
                      {
                        "filename": "invoice-apr-2026.pdf",
                        "size": 58211,
                        "etag": "15d6a30e7a6f0d...",
                        "last_modified": "2026-04-20T08:55:10+00:00"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "media_library:read",
        "x-required-permission-constant": "MEDIA_LIBRARY_READ"
      },
      "post": {
        "summary": "Strategy",
        "responses": {
          "201": {
            "description": "File uploaded.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "filename": "small-note.txt",
                    "size": 24,
                    "uploaded": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "media_library:write",
        "x-required-permission-constant": "MEDIA_LIBRARY_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "file": {
                    "filename": "small-note.txt",
                    "content_type": "text/plain",
                    "content_base64": "U2NoZWR1bGVkIG5vdGUgZnJvbSBBUEk="
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/media-library/files/upload-link.json": {
      "post": {
        "summary": "Strategy",
        "responses": {
          "200": {
            "description": "Presigned direct upload link generated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "strategy": "direct_presigned_put",
                    "file": {
                      "filename": "invoice-apr-2026.pdf",
                      "content_type": "application/pdf",
                      "max_size_bytes": 524288000
                    },
                    "upload": {
                      "method": "PUT",
                      "url": "https://storage.example.com/prod-.../invoice-apr-2026.pdf?...",
                      "expires_in": 1200,
                      "headers": {
                        "Content-Type": "application/pdf"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "media_library:write",
        "x-required-permission-constant": "MEDIA_LIBRARY_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "file": {
                    "filename": "invoice-apr-2026.pdf",
                    "content_type": "application/pdf",
                    "size_bytes": 58211
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/media-library/files/download-link.json": {
      "post": {
        "summary": "Strategy",
        "responses": {
          "200": {
            "description": "Download link generated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "filename": "invoice-apr-2026.pdf",
                    "url": "https://app.example.com/file-download/download?file=..."
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "media_library:write",
        "x-required-permission-constant": "MEDIA_LIBRARY_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "file": {
                    "filename": "invoice-apr-2026.pdf"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/mobile/push-token.json": {
      "post": {
        "summary": "Save Device Push Token",
        "responses": {
          "200": {
            "description": "Push token saved or updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "success",
                    "message": "Push token saved",
                    "device": {
                      "device_id": "ios_device_001",
                      "platform": "ios",
                      "environment": "production"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key is not mobile-scoped.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Mobile API key required for this endpoint"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "mobile_push:write",
        "x-required-permission-constant": "MOBILE_PUSH_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "device": {
                    "device_id": "ios_device_001",
                    "push_token": "f6ad7d6f0a3b82d91fd89e88d4d4c6f3e0f9a7f6",
                    "platform": "ios",
                    "app_version": "1.2.3",
                    "environment": "production"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Save Device Push Token",
        "responses": {
          "200": {
            "description": "Push token deleted or already absent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "success",
                    "message": "Push token removed",
                    "deleted": true,
                    "device_id": "ios_device_001"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Device identifier missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Missing required field: device_id"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "mobile_push:write",
        "x-required-permission-constant": "MOBILE_PUSH_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "device": {
                    "device_id": "ios_device_001"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/newsletters.json": {
      "get": {
        "summary": "List Newsletter Campaigns",
        "responses": {
          "200": {
            "description": "Newsletter list returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "Newsletter",
                    "count": 1,
                    "per_page": 100,
                    "pages": {
                      "current": 1,
                      "max": 1
                    },
                    "elements": [
                      {
                        "id": "672489...",
                        "title": "Launch Campaign",
                        "subject": "New release",
                        "template_id": "welcome.html",
                        "total_recipients": 210,
                        "status": "draft",
                        "created_at": 1704067200
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "newsletters:read",
        "x-required-permission-constant": "NEWSLETTERS_READ"
      },
      "post": {
        "summary": "List Newsletter Campaigns",
        "responses": {
          "201": {
            "description": "Newsletter draft created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "672489...",
                    "status": "draft",
                    "skipped_suppressed": 0,
                    "skipped_not_found": 1
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "newsletters:write",
        "x-required-permission-constant": "NEWSLETTERS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "newsletter": {
                    "title": "Launch Campaign",
                    "subject": "New release",
                    "template_id": "welcome.html",
                    "contact_ids": [
                      "cust_1",
                      "cust_2"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/newsletters/{newsletterId}.json": {
      "get": {
        "summary": "List Newsletter Campaigns",
        "responses": {
          "200": {
            "description": "Campaign details returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "672489...",
                    "title": "Launch Campaign",
                    "subject": "New release",
                    "template_id": "welcome.html",
                    "total_recipients": 210,
                    "status": "queued",
                    "scheduled_at": null,
                    "created_at": 1704067200
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "newsletters:read",
        "x-required-permission-constant": "NEWSLETTERS_READ"
      },
      "put": {
        "summary": "List Newsletter Campaigns",
        "responses": {
          "200": {
            "description": "Campaign metadata updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "672489...",
                    "title": "Launch Campaign v2",
                    "subject": "Release update",
                    "template_id": "welcome-v2.html",
                    "total_recipients": 210,
                    "status": "draft",
                    "scheduled_at": null,
                    "created_at": 1704067200
                  }
                }
              }
            }
          },
          "409": {
            "description": "Campaign is not in draft status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Only newsletters in draft status can be updated"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "newsletters:write",
        "x-required-permission-constant": "NEWSLETTERS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "newsletter": {
                    "title": "Launch Campaign v2",
                    "subject": "Release update",
                    "template_id": "welcome-v2.html"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "List Newsletter Campaigns",
        "responses": {
          "202": {
            "description": "Campaign and related queue entries deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "672489...",
                    "deleted": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "newsletters:write",
        "x-required-permission-constant": "NEWSLETTERS_WRITE"
      }
    },
    "/2026-02-01/newsletters/{newsletterId}/recipients.json": {
      "get": {
        "summary": "List Newsletter Campaigns",
        "responses": {
          "200": {
            "description": "Recipients snapshot returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "newsletter_status": "draft",
                    "selected_ids": [
                      "cust_1",
                      "cust_2"
                    ],
                    "all_customers": [
                      {
                        "id": "cust_1",
                        "name": "Alex Doe",
                        "email": "alex@example.com",
                        "tags": [
                          "beta"
                        ],
                        "subscription_count": 1,
                        "has_consent": true,
                        "is_suppressed": false
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "newsletters:read",
        "x-required-permission-constant": "NEWSLETTERS_READ"
      },
      "put": {
        "summary": "List Newsletter Campaigns",
        "responses": {
          "200": {
            "description": "Recipients synchronized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "newsletter_id": "672489...",
                    "saved_recipients": 2,
                    "skipped_suppressed": 1,
                    "skipped_not_found": 0
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "newsletters:write",
        "x-required-permission-constant": "NEWSLETTERS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "newsletter": {
                    "contact_ids": [
                      "cust_1",
                      "cust_2",
                      "cust_3"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/newsletters/{newsletterId}/queue.json": {
      "post": {
        "summary": "List Newsletter Campaigns",
        "responses": {
          "200": {
            "description": "Campaign queued for sending.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "newsletter_id": "672489...",
                    "status": "queued",
                    "queued_recipients": 150,
                    "skipped_suppressed": 0,
                    "skipped_not_found": 0
                  }
                }
              }
            }
          },
          "409": {
            "description": "Invalid state or usage limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "This newsletter is already queued and cannot be queued again"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "newsletters:write",
        "x-required-permission-constant": "NEWSLETTERS_WRITE"
      }
    },
    "/2026-02-01/newsletters/{newsletterId}/test.json": {
      "post": {
        "summary": "List Newsletter Campaigns",
        "responses": {
          "201": {
            "description": "Test email sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "newsletter_id": "672489...",
                    "test_email": "qa@example.com",
                    "sent": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "newsletters:write",
        "x-required-permission-constant": "NEWSLETTERS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "newsletter": {
                    "test_email": "qa@example.com"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/newsletters/{newsletterId}/stats.json": {
      "get": {
        "summary": "List Newsletter Campaigns",
        "responses": {
          "200": {
            "description": "Campaign stats returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "newsletter": {
                      "id": "672489...",
                      "title": "Launch Campaign",
                      "subject": "New release",
                      "template_id": "welcome.html",
                      "total_recipients": 150,
                      "status": "queued",
                      "scheduled_at": null,
                      "created_at": 1704067200
                    },
                    "stats": {
                      "pending": 12,
                      "processing": 3,
                      "sent": 120,
                      "failed": 10,
                      "skipped": 5,
                      "total": 150
                    },
                    "progress": {
                      "processed": 135,
                      "total": 150,
                      "overall_progress": 90,
                      "delivery_rate": 80
                    },
                    "failures": []
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "newsletters:read",
        "x-required-permission-constant": "NEWSLETTERS_READ"
      }
    },
    "/2026-02-01/newsletters/unsubscribes.json": {
      "get": {
        "summary": "List Newsletter Campaigns",
        "responses": {
          "200": {
            "description": "Suppression list returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "Unsubscribes",
                    "count": 1,
                    "per_page": 100,
                    "pages": {
                      "current": 1,
                      "max": 1
                    },
                    "elements": [
                      {
                        "email": "user@example.com",
                        "reason": "Manual unsubscribe via API",
                        "unsubscribed_at": 1704067200
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "newsletter_unsubscribes:read",
        "x-required-permission-constant": "NEWSLETTER_UNSUBSCRIBES_READ"
      },
      "post": {
        "summary": "List Newsletter Campaigns",
        "responses": {
          "201": {
            "description": "Email added to suppression list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "email": "user@example.com",
                    "unsubscribed": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "newsletter_unsubscribes:write",
        "x-required-permission-constant": "NEWSLETTER_UNSUBSCRIBES_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "unsubscribe": {
                    "email": "user@example.com",
                    "reason": "Support request"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/newsletters/unsubscribes/resubscribe.json": {
      "post": {
        "summary": "List Newsletter Campaigns",
        "responses": {
          "200": {
            "description": "Email removed from suppression list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "email": "user@example.com",
                    "resubscribed": true
                  }
                }
              }
            }
          },
          "404": {
            "description": "Email not found in suppression list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Email not found in suppression list"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "newsletter_unsubscribes:write",
        "x-required-permission-constant": "NEWSLETTER_UNSUBSCRIBES_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "unsubscribe": {
                    "email": "user@example.com"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/partners/groups.json": {
      "get": {
        "summary": "Group Inventory",
        "responses": {
          "200": {
            "description": "Partner group directory successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "PartnerGroup",
                    "count": 4,
                    "per_page": 100,
                    "pages": {
                      "current": 1,
                      "max": 1
                    },
                    "elements": [
                      {
                        "id": "68f76721...",
                        "name": "Standard Managed Agency",
                        "external_id": "P-GROUP-ADVANCED",
                        "default": true
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partner_groups:read",
        "x-required-permission-constant": "PARTNER_GROUPS_READ"
      },
      "post": {
        "summary": "Group Inventory",
        "responses": {
          "201": {
            "description": "Partner group created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "group": {
                      "id": "68f76721..."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partner_groups:write",
        "x-required-permission-constant": "PARTNER_GROUPS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "partnerGroup": {
                    "name": "Performance Agencies",
                    "description": "Tier for high-volume agencies",
                    "external_id": "P-GROUP-PERF",
                    "tags": "managed,performance",
                    "default": false,
                    "rules": [
                      {
                        "type": "new_customer_time_tier",
                        "max_months": 6,
                        "percentage": 30
                      },
                      {
                        "type": "recurring",
                        "percentage": 12
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/partners/groups/{groupId}.json": {
      "get": {
        "summary": "Group Inventory",
        "responses": {
          "200": {
            "description": "Group configuration and rules engine definition retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "68f76721...",
                    "name": "Standard Managed Agency",
                    "external_id": "P-GROUP-ADVANCED",
                    "rules": [
                      {
                        "type": "new_customer_time_tier",
                        "max_months": 12,
                        "percentage": 50,
                        "description": "Introductory 12-month high-incentive tier."
                      },
                      {
                        "type": "recurring",
                        "percentage": 15,
                        "description": "Standard recurring commission (post-time-tier)."
                      },
                      {
                        "type": "partner_ltv_upgrade",
                        "min_ltv_total": 10000,
                        "upgrade_percentage": 5,
                        "description": "LTV Performance Bonus (Threshold: 10,000€)."
                      }
                    ],
                    "tags": "managed,high-volume",
                    "description": "Default group for high-performance managed agencies."
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partner_groups:read",
        "x-required-permission-constant": "PARTNER_GROUPS_READ"
      }
    },
    "/2026-02-01/partners/groups/{partnerGroupId}.json": {
      "put": {
        "summary": "Group Inventory",
        "responses": {
          "202": {
            "description": "Partner group updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "group": {
                      "id": "68f76721..."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partner_groups:write",
        "x-required-permission-constant": "PARTNER_GROUPS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "partnerGroup": {
                    "name": "Performance Agencies v2",
                    "default": true,
                    "rules": [
                      {
                        "type": "recurring",
                        "percentage": 14
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Group Inventory",
        "responses": {
          "202": {
            "description": "Partner group deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "group": {
                      "id": "68f76721...",
                      "deleted": true
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partner_groups:write",
        "x-required-permission-constant": "PARTNER_GROUPS_WRITE"
      }
    },
    "/2026-02-01/partners/groups/simulate-rules.json": {
      "post": {
        "summary": "Group Inventory",
        "responses": {
          "200": {
            "description": "Rules simulation completed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "success",
                    "result": {
                      "final_fee": 74.98
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partner_groups:write",
        "x-required-permission-constant": "PARTNER_GROUPS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "partnerGroupSimulation": {
                    "rules": [
                      {
                        "type": "new_customer_time_tier",
                        "max_months": 3,
                        "percentage": 25
                      },
                      {
                        "type": "recurring",
                        "percentage": 10
                      }
                    ],
                    "simulation": {
                      "charge_amount": 299.9,
                      "customer_months": 2,
                      "partner_ltv": 4500,
                      "qualified_customers": 12,
                      "first_paid_customer_bootstrap": false
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/partners.json": {
      "get": {
        "summary": "Channel Management",
        "responses": {
          "200": {
            "description": "Partner directory successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "Partner",
                    "count": 24,
                    "per_page": 100,
                    "pages": {
                      "current": 1,
                      "max": 1
                    },
                    "elements": [
                      {
                        "id": "675d...",
                        "name": "Global Solutions Agency",
                        "external_id": "GSA-9921",
                        "partner_code": "GOLD-PARTNER-X"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partners:read",
        "x-required-permission-constant": "PARTNERS_READ"
      },
      "post": {
        "summary": "Channel Management",
        "responses": {
          "201": {
            "description": "Partner successfully provisioned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "partner": {
                      "id": "6768..."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partners:write",
        "x-required-permission-constant": "PARTNERS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "partner": {
                    "name": "Apex Marketing Group",
                    "email": "channel@apex-marketing.com",
                    "external_id": "APEX_001",
                    "code": "APEXPROMO",
                    "partner_group_id": "66bf22b0...",
                    "address": {
                      "vat_number": "IT09876543210",
                      "country": "IT",
                      "city": "Milan"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/partners/{partnerId}.json": {
      "get": {
        "summary": "Channel Management",
        "responses": {
          "200": {
            "description": "Partner profile retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "66b136b9...",
                    "name": "Apex Marketing Group",
                    "status": "active",
                    "tags": [
                      "tier-1",
                      "mfa-enabled"
                    ],
                    "email": "channel@apex-marketing.com",
                    "address": {
                      "city": "Milan",
                      "country": "IT",
                      "vat_number": "IT098..."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partners:read",
        "x-required-permission-constant": "PARTNERS_READ"
      },
      "put": {
        "summary": "Channel Management",
        "responses": {
          "200": {
            "description": "Partner updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "675d...",
                    "name": "Apex Marketing Group - Enterprise"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partners:write",
        "x-required-permission-constant": "PARTNERS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "partner": {
                    "name": "Apex Marketing Group - Enterprise",
                    "email": "enterprise@apex-marketing.com",
                    "description": "Updated profile",
                    "external_id": "APEX_001",
                    "code": "APEXPROMO",
                    "partner_group_id": "66bf22b0...",
                    "tags": [
                      "tier-1",
                      "priority"
                    ],
                    "address": {
                      "country": "IT",
                      "city": "Milan"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Channel Management",
        "responses": {
          "202": {
            "description": "Partner deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "675d...",
                    "deleted": true
                  }
                }
              }
            }
          },
          "406": {
            "description": "Partner has still attached customers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Unable to remove this partner. Customer attached to partner: ..."
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partners:write",
        "x-required-permission-constant": "PARTNERS_WRITE"
      }
    },
    "/2026-02-01/partners/{partnerId}/customers.json": {
      "get": {
        "summary": "Channel Management",
        "responses": {
          "200": {
            "description": "Attributed customer list retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "PartnerCustomers",
                    "count": 142,
                    "elements": [
                      {
                        "id": "68d2...",
                        "company_name": "Acme Corp",
                        "email": "procurement@acme.com",
                        "status": "active"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partners:read",
        "x-required-permission-constant": "PARTNERS_READ"
      }
    },
    "/2026-02-01/partners/{partnerId}/stats.json": {
      "get": {
        "summary": "Channel Management",
        "responses": {
          "200": {
            "description": "Aggregated performance statistics retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "total_revenue": "45200.00",
                    "commission_earned": "4520.00",
                    "currency": "EUR"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partners:read",
        "x-required-permission-constant": "PARTNERS_READ"
      }
    },
    "/2026-02-01/partners/{partnerId}/fees.json": {
      "get": {
        "summary": "Channel Management",
        "responses": {
          "200": {
            "description": "Commission ledger retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "PartnerFees",
                    "elements": [
                      {
                        "id": "fee_991",
                        "source_charge": "ch_123",
                        "fee_value": 15.5,
                        "status": "pending"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partners:read",
        "x-required-permission-constant": "PARTNERS_READ"
      }
    },
    "/2026-02-01/partners/payouts.json": {
      "post": {
        "summary": "Channel Management",
        "responses": {
          "201": {
            "description": "Payout request successfully generated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "pay_5521",
                    "total": "1250.00"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partner_payouts:write",
        "x-required-permission-constant": "PARTNER_PAYOUTS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "payout": {
                    "partner_id": "675d...",
                    "transactions": [
                      "fee_991",
                      "fee_992"
                    ],
                    "invoice": {
                      "number": "INV-2026-001",
                      "date": "2026-03-01"
                    },
                    "vat_settings": {
                      "tax_id": "tax_vat_22"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Channel Management",
        "responses": {
          "200": {
            "description": "Paginated payout list across all partners.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "PartnerPayout",
                    "count": 3,
                    "elements": []
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partner_payouts:read",
        "x-required-permission-constant": "PARTNER_PAYOUTS_READ"
      }
    },
    "/2026-02-01/partners/{partnerId}/payouts/{payoutId}/report.json": {
      "get": {
        "summary": "Channel Management",
        "responses": {
          "200": {
            "description": "PDF documentation retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "stream": {
                      "type": "application/pdf",
                      "base64_content": "JVBER..."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partner_payouts:read",
        "x-required-permission-constant": "PARTNER_PAYOUTS_READ"
      }
    },
    "/2026-02-01/partners/partner.json": {
      "get": {
        "summary": "Channel Management",
        "responses": {
          "200": {
            "description": "Partner record retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "675d...",
                    "name": "Apex Marketing Group",
                    "email": "channel@apex-marketing.com"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Neither `externalId` nor `email` was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "A valid \"externalId\" or \"email\" must be specified in the request"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partners:read",
        "x-required-permission-constant": "PARTNERS_READ"
      }
    },
    "/2026-02-01/partners/{partnerId}/fees/{feeId}.json": {
      "get": {
        "summary": "Channel Management",
        "responses": {
          "200": {
            "description": "Partner fee entry retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "fee_991",
                    "partner_id": "675d...",
                    "fee_value": 15.5,
                    "status": "pending"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partners:read",
        "x-required-permission-constant": "PARTNERS_READ"
      }
    },
    "/2026-02-01/partners/{partnerId}/payouts.json": {
      "get": {
        "summary": "Channel Management",
        "responses": {
          "200": {
            "description": "Paginated payout list for the specified partner.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "PartnerPayout",
                    "count": 2,
                    "elements": []
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partner_payouts:read",
        "x-required-permission-constant": "PARTNER_PAYOUTS_READ"
      }
    },
    "/2026-02-01/partners/{partnerId}/payouts/{payoutId}.json": {
      "get": {
        "summary": "Channel Management",
        "responses": {
          "200": {
            "description": "Payout details retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "pay_5521",
                    "partner_id": "675d...",
                    "status": "pending",
                    "total": 1250
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partner_payouts:read",
        "x-required-permission-constant": "PARTNER_PAYOUTS_READ"
      }
    },
    "/2026-02-01/partners/payouts/{payoutId}.json": {
      "get": {
        "summary": "Channel Management",
        "responses": {
          "200": {
            "description": "Payout details retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "pay_5521",
                    "partner_id": "675d...",
                    "status": "pending",
                    "total": 1250
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partner_payouts:read",
        "x-required-permission-constant": "PARTNER_PAYOUTS_READ"
      }
    },
    "/2026-02-01/partners/payouts/{payoutId}/status.json": {
      "put": {
        "summary": "Channel Management",
        "responses": {
          "200": {
            "description": "Payout status updated and related fee entries synchronized.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "payout": {
                      "id": "pay_5521",
                      "status": "paid"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Invalid status transition.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Paid payouts cannot be updated"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partner_payouts:write",
        "x-required-permission-constant": "PARTNER_PAYOUTS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "payout": {
                    "status": "paid",
                    "metadata": {
                      "reference": "BANK-TRX-2026-8891"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/partners/{partnerId}/payouts/{payoutId}/report.pdf": {
      "get": {
        "summary": "Channel Management",
        "responses": {
          "200": {
            "description": "Inline PDF stream response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "note": "Response is streamed as application/pdf."
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "partner_payouts:read",
        "x-required-permission-constant": "PARTNER_PAYOUTS_READ"
      }
    },
    "/2026-02-01/recurring-payments/settings.json": {
      "get": {
        "summary": "Operational Configuration",
        "responses": {
          "200": {
            "description": "Operational settings successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "success",
                    "settings": {
                      "retry_policy": "exponential_backoff",
                      "max_retries": 5,
                      "next_cycle_offset": "24 hours",
                      "dunning_notifications": true
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "recurring_settings:read",
        "x-required-permission-constant": "RECURRING_SETTINGS_READ"
      }
    },
    "/2026-02-01/recurring-payments/subscriptions.json": {
      "get": {
        "summary": "Operational Configuration",
        "responses": {
          "200": {
            "description": "Subscription inventory retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "type": "RecurringSubscriptions",
                    "count": 1250,
                    "per_page": 100,
                    "elements": [
                      {
                        "id": "67bdf...",
                        "customerId": "66a15...",
                        "subscription_reference": "sub_premium_9921",
                        "status": "active",
                        "next_renewal_date": "2026-04-01T00:00:00Z",
                        "last_payment_status": "success"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "recurring_subscriptions:read",
        "x-required-permission-constant": "RECURRING_SUBSCRIPTIONS_READ"
      }
    },
    "/2026-02-01/scheduler/events.json": {
      "get": {
        "summary": "List Events",
        "responses": {
          "200": {
            "description": "Events fetched in the requested range.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "fetch",
                    "count": 2,
                    "range": {
                      "start": "2026-04-01T00:00:00+02:00",
                      "end": "2026-04-30T23:59:59+02:00"
                    },
                    "events": [
                      {
                        "id": "681f0f...",
                        "event_type": "appointment",
                        "title": "Quarterly Review",
                        "schedule_date": "2026-04-12T09:00:00+02:00",
                        "end_date": "2026-04-12T10:00:00+02:00"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "scheduler_events:read",
        "x-required-permission-constant": "SCHEDULER_EVENTS_READ"
      },
      "post": {
        "summary": "List Events",
        "responses": {
          "201": {
            "description": "Event created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "681f0f...",
                    "event": {
                      "id": "681f0f...",
                      "event_type": "action",
                      "action_type": "workflow"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error on event payload.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Invalid \"action_type\". Allowed values: charge, job_runner, workflow"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "scheduler_events:write",
        "x-required-permission-constant": "SCHEDULER_EVENTS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "event": {
                    "event_type": "action",
                    "title": "Run Workflow Daily",
                    "schedule_date": "2026-04-20T07:30:00+02:00",
                    "end_date": "2026-04-20T07:30:00+02:00",
                    "is_all_day": false,
                    "color": "primary",
                    "action_type": "workflow",
                    "action_details": {
                      "workflow_id": "67ffac1f8a3f0f2f88f9dd10",
                      "payload": {
                        "source": "api"
                      }
                    },
                    "recurrence": {
                      "type": "week",
                      "interval": 1,
                      "endDate": "2026-12-31"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/scheduler/events/{eventId}.json": {
      "put": {
        "summary": "List Events",
        "responses": {
          "200": {
            "description": "Event updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "681f0f...",
                    "event": {
                      "id": "681f0f...",
                      "title": "Run Workflow - Updated"
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "scheduler_events:write",
        "x-required-permission-constant": "SCHEDULER_EVENTS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "event": {
                    "title": "Run Workflow - Updated",
                    "recurrence": {
                      "type": "month",
                      "interval": 1,
                      "endDate": "2027-04-30"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "List Events",
        "responses": {
          "202": {
            "description": "Event deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "681f0f...",
                    "deleted": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "scheduler_events:write",
        "x-required-permission-constant": "SCHEDULER_EVENTS_WRITE"
      }
    },
    "/2026-02-01/share-secrets.json": {
      "get": {
        "summary": "Secret Management",
        "responses": {
          "200": {
            "description": "Secret directory successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "ShareSecret",
                    "count": 5,
                    "per_page": 100,
                    "pages": {
                      "current": 1,
                      "max": 1
                    },
                    "elements": [
                      {
                        "id": "6739782b...",
                        "name": "Database Migration Credentials",
                        "url": "https://hub.donutwork.com/ss/b6a9532aa4a06...",
                        "readed": false
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "share_secrets:read",
        "x-required-permission-constant": "SHARE_SECRETS_READ"
      },
      "post": {
        "summary": "Secret Management",
        "responses": {
          "200": {
            "description": "Secret link successfully provisioned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "67397a4c...",
                    "name": "Deployment API Token",
                    "url": "https://hub.donutwork.com/ss/fb89f610...",
                    "readed": false,
                    "readerInfo": {
                      "ip": null,
                      "ua": null,
                      "isoDate": null,
                      "ts": null
                    },
                    "sendTo": {
                      "status": true,
                      "messageId": "msg_9921"
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "share_secrets:write",
        "x-required-permission-constant": "SHARE_SECRETS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "shareSecret": {
                    "name": "Deployment API Token",
                    "content": "secret_value_redacted",
                    "sendTo": {
                      "email": "engineer@partner-company.com",
                      "message": "The requested production API token is now available for one-time retrieval."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/share-secrets/{secretId}.json": {
      "get": {
        "summary": "Secret Management",
        "responses": {
          "200": {
            "description": "Access metadata successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "6739782b...",
                    "name": "Database Migration Credentials",
                    "readed": true,
                    "readerInfo": {
                      "ip": "82.1.4.22",
                      "ua": "Mozilla/5.0...",
                      "isoDate": "03/03/2026 11:20:00",
                      "ts": 1772536800
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "share_secrets:read",
        "x-required-permission-constant": "SHARE_SECRETS_READ"
      },
      "delete": {
        "summary": "Secret Management",
        "responses": {
          "202": {
            "description": "Secret link successfully revoked and record purged.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "67397a4c...",
                    "deleted": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "share_secrets:write",
        "x-required-permission-constant": "SHARE_SECRETS_WRITE"
      }
    },
    "/2026-02-01/shortlinks.json": {
      "get": {
        "summary": "Link Lifecycle Management",
        "responses": {
          "200": {
            "description": "Shortlink inventory successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "Shortlink",
                    "count": 42,
                    "per_page": 100,
                    "pages": {
                      "current": 1,
                      "max": 1
                    },
                    "elements": [
                      {
                        "id": "675d9fea...",
                        "title": "Spring 2026 Campaign",
                        "original_url": "https://marketing.acme.com/promo/spring",
                        "short_code": "k9x2m-spr26",
                        "url": "https://d.dw2.it/r/k9x2m-spr26",
                        "is_active": true
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "shortlinks:read",
        "x-required-permission-constant": "SHORTLINKS_READ"
      },
      "post": {
        "summary": "Link Lifecycle Management",
        "responses": {
          "201": {
            "description": "Shortlink successfully provisioned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "shortlink": {
                      "id": "6768440..."
                    },
                    "short_code": "k9x2m-launch-2026",
                    "url": "https://d.dw2.it/r/k9x2m-launch-2026"
                  }
                }
              }
            }
          },
          "409": {
            "description": "Requested custom fragment is already in use.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "This shortlink fragment is already in use"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "shortlinks:write",
        "x-required-permission-constant": "SHORTLINKS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "shortlink": {
                    "title": "Product Launch Announcement",
                    "original_url": "https://acme.com/products/new-gen-ai",
                    "fragment": "launch-2026",
                    "is_active": true
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/shortlinks/{shortlinkId}.json": {
      "get": {
        "summary": "Link Lifecycle Management",
        "responses": {
          "200": {
            "description": "Shortlink configuration retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "675d9fea...",
                    "title": "Spring 2026 Campaign",
                    "original_url": "https://marketing.acme.com/promo/spring",
                    "short_code": "k9x2m-spr26",
                    "url": "https://d.dw2.it/r/k9x2m-spr26",
                    "is_active": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "shortlinks:read",
        "x-required-permission-constant": "SHORTLINKS_READ"
      },
      "put": {
        "summary": "Link Lifecycle Management",
        "responses": {
          "200": {
            "description": "Configuration updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "shortlink": {
                      "id": "675d9fea..."
                    },
                    "short_code": "k9x2m-spring-final",
                    "url": "https://d.dw2.it/r/k9x2m-spring-final"
                  }
                }
              }
            }
          },
          "409": {
            "description": "Requested custom fragment is already in use.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "This shortlink fragment is already in use"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "shortlinks:write",
        "x-required-permission-constant": "SHORTLINKS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "shortlink": {
                    "title": "Revised Spring Campaign",
                    "original_url": "https://marketing.acme.com/promo/spring-final",
                    "fragment": "spring-final",
                    "is_active": true
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Link Lifecycle Management",
        "responses": {
          "202": {
            "description": "Shortlink successfully revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "675d9fea...",
                    "deleted": true
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "shortlinks:write",
        "x-required-permission-constant": "SHORTLINKS_WRITE"
      }
    },
    "/2026-02-01/shortlinks/{shortlinkId}/stats.json": {
      "get": {
        "summary": "Link Lifecycle Management",
        "responses": {
          "200": {
            "description": "Engagement metrics successfully aggregated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "shortlink": {
                      "id": "675d9fea...",
                      "title": "Spring 2026 Campaign",
                      "original_url": "https://marketing.acme.com/promo/spring",
                      "short_code": "k9x2m-spr26",
                      "is_active": true,
                      "url": "https://d.dw2.it/r/k9x2m-spr26",
                      "created_at": 1772536800
                    },
                    "metrics": {
                      "summary": {
                        "human": 1530,
                        "bot": 12,
                        "total": 1542
                      },
                      "view_density": [
                        {
                          "country": "IT",
                          "count": 600
                        },
                        {
                          "country": "US",
                          "count": 420
                        }
                      ],
                      "referrers": {
                        "Direct": 900,
                        "linkedin.com": 350,
                        "newsletter.acme.com": 292
                      },
                      "bots": {
                        "Google": 7,
                        "Facebook": 5
                      },
                      "browsers": {
                        "Chrome": 1100,
                        "Safari": 320,
                        "Firefox": 110
                      },
                      "os": {
                        "Windows": 620,
                        "macOS": 410,
                        "iOS": 320,
                        "Android": 180
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "shortlinks:read",
        "x-required-permission-constant": "SHORTLINKS_READ"
      }
    },
    "/2026-02-01/taxes.json": {
      "get": {
        "summary": "Tax Profiles",
        "responses": {
          "200": {
            "description": "Tax profile directory successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "Taxes",
                    "count": 5,
                    "per_page": 100,
                    "pages": {
                      "current": 1,
                      "max": 1
                    },
                    "elements": [
                      {
                        "id": "66a151b7...",
                        "name": "Standard EU VAT (22%)",
                        "percentage": 22,
                        "description": "Standard Value Added Tax for European Union member states."
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "taxes:read",
        "x-required-permission-constant": "TAXES_READ"
      },
      "post": {
        "summary": "Tax Profiles",
        "responses": {
          "201": {
            "description": "Tax profile created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "success",
                    "tax": {
                      "id": "tax_001",
                      "name": "Standard EU VAT (22%)",
                      "percentage": 22
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "taxes:write",
        "x-required-permission-constant": "TAXES_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "tax": {
                    "name": "Standard EU VAT (22%)",
                    "description": "EU default VAT profile",
                    "percentage": 22,
                    "default": false
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/taxes/{taxId}.json": {
      "put": {
        "summary": "Tax Profiles",
        "responses": {
          "200": {
            "description": "Tax profile updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "success",
                    "tax": {
                      "id": "tax_001",
                      "name": "EU VAT 2026",
                      "percentage": 23
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "taxes:write",
        "x-required-permission-constant": "TAXES_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "tax": {
                    "name": "EU VAT 2026",
                    "description": "Updated profile metadata",
                    "percentage": 23,
                    "default": true
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Tax Profiles",
        "responses": {
          "200": {
            "description": "Tax profile deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "success",
                    "tax": {
                      "id": "tax_001",
                      "deleted": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Tax profile not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "This tax profile does not exists"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "taxes:write",
        "x-required-permission-constant": "TAXES_WRITE"
      }
    },
    "/2026-02-01/webhooks.json": {
      "get": {
        "summary": "List Webhooks",
        "responses": {
          "200": {
            "description": "Paginated list of webhook subscriptions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "Webhook",
                    "count": 2,
                    "per_page": 100,
                    "pages": {
                      "current": 1,
                      "max": 1
                    },
                    "elements": [
                      {
                        "id": "wh_001",
                        "name": "Billing Events",
                        "description": "Receive invoice and payment updates",
                        "url": "https://example.com/webhooks/billing",
                        "events": [
                          "RecurringPayments.charge.paid"
                        ],
                        "token": "redacted"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "webhooks:read",
        "x-required-permission-constant": "WEBHOOKS_READ"
      },
      "post": {
        "summary": "List Webhooks",
        "responses": {
          "201": {
            "description": "Webhook created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "wh_001",
                    "name": "Billing Events",
                    "description": "Receive invoice and payment updates",
                    "url": "https://example.com/webhooks/billing",
                    "events": [
                      "RecurringPayments.charge.paid"
                    ],
                    "token": "generated_webhook_token"
                  }
                }
              }
            }
          },
          "412": {
            "description": "Name, url, or events missing; or TLS certificate validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "A valid \"url\" must be specified."
                  }
                }
              }
            }
          },
          "422": {
            "description": "URL format invalid or unsupported event specified.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Some events are not available"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "webhooks:write",
        "x-required-permission-constant": "WEBHOOKS_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "webhook": {
                    "name": "Billing Events",
                    "description": "Receive invoice and payment updates",
                    "url": "https://example.com/webhooks/billing",
                    "events": [
                      "RecurringPayments.charge.paid"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/webhooks/types.json": {
      "get": {
        "summary": "List Webhooks",
        "responses": {
          "200": {
            "description": "List of available webhook event names for the company context.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": [
                    "RecurringPayments.charge.paid",
                    "RecurringPayments.charge.failed"
                  ]
                }
              }
            }
          }
        },
        "x-required-scope": "webhooks:read",
        "x-required-permission-constant": "WEBHOOKS_READ"
      }
    },
    "/2026-02-01/webhooks/{webhookId}.json": {
      "get": {
        "summary": "List Webhooks",
        "responses": {
          "200": {
            "description": "Webhook details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "wh_001",
                    "name": "Billing Events",
                    "description": "Receive invoice and payment updates",
                    "url": "https://example.com/webhooks/billing",
                    "events": [
                      "RecurringPayments.charge.paid"
                    ],
                    "token": "redacted"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Webhook resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Webhook not found."
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "webhooks:read",
        "x-required-permission-constant": "WEBHOOKS_READ"
      },
      "delete": {
        "summary": "List Webhooks",
        "responses": {
          "202": {
            "description": "Webhook deletion accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "wh_001",
                    "deleted": true
                  }
                }
              }
            }
          },
          "404": {
            "description": "Webhook resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Webhook not found. Unable to delete unknown resource"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "webhooks:write",
        "x-required-permission-constant": "WEBHOOKS_WRITE"
      }
    },
    "/2026-02-01/workflow.json": {
      "get": {
        "summary": "Workflow Management",
        "responses": {
          "200": {
            "description": "Workflow inventory successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "Workflow",
                    "count": 12,
                    "per_page": 100,
                    "pages": {
                      "current": 1,
                      "max": 1
                    },
                    "elements": [
                      {
                        "id": "6724bffd...",
                        "name": "Enterprise Onboarding Logic",
                        "active": true,
                        "tasks_count": 8,
                        "description": "Orchestrates account provisioning and initial compliance checks."
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "workflow:read",
        "x-required-permission-constant": "WORKFLOW_READ"
      }
    },
    "/2026-02-01/workflow/{workflowId}.json": {
      "post": {
        "summary": "Workflow Management",
        "responses": {
          "200": {
            "description": "Workflow execution completed. Detailed stage results returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "success": true,
                    "execution_id": "exe_8821abd033",
                    "stages": [
                      {
                        "node": "validate_identity",
                        "status": "completed",
                        "output": {
                          "valid": true
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "The specified workflow identifier does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "This workflow does not exists"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "workflow:write",
        "x-required-permission-constant": "WORKFLOW_WRITE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "data": {
                    "customer_id": "cust_9921",
                    "priority": "high",
                    "metadata": {
                      "source": "api_v2"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2026-02-01/workflow/{workflowId}/traces.json": {
      "get": {
        "summary": "Workflow Management",
        "responses": {
          "200": {
            "description": "Trace list retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "entities": "WorkflowTrace",
                    "count": 2,
                    "per_page": 50,
                    "pages": {
                      "current": 1,
                      "max": 1
                    },
                    "elements": [
                      {
                        "id": "6803f0f1...",
                        "workflow_id": "67ffac1f...",
                        "uuid": "d76d716e-0f91-4f7f-b37f-4475e573f807",
                        "run_date": "2026-04-20T08:41:12+00:00",
                        "status": "executed"
                      }
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "Workflow not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "This workflow does not exists"
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "workflow_traces:read",
        "x-required-permission-constant": "WORKFLOW_TRACES_READ"
      }
    },
    "/2026-02-01/workflow/{workflowId}/traces/{traceId}.json": {
      "get": {
        "summary": "Workflow Management",
        "responses": {
          "200": {
            "description": "Trace retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "6803f0f1...",
                    "workflow_id": "67ffac1f...",
                    "uuid": "d76d716e-0f91-4f7f-b37f-4475e573f807",
                    "run_date": "2026-04-20T08:41:12+00:00",
                    "status": "executed",
                    "response": {
                      "input": {
                        "customer_id": "cust_9921"
                      },
                      "result": {
                        "workflow_status": "executed"
                      },
                      "stages": [
                        {
                          "node_name": "validate_identity",
                          "status": "SUCCESS",
                          "duration": 0.1281
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Trace not found for workflow.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "error": "Trace not found for this workflow."
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "workflow_traces:read",
        "x-required-permission-constant": "WORKFLOW_TRACES_READ"
      }
    }
  }
}