{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/thisisbud/main/json-schema/thisisbud-auth-gateway-urlrequestv2-schema.json",
  "title": "Authorisation Gateweay URL Request Payload",
  "x-generated": "2026-10-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/thisisbud-openapi-openapi.yml#/components/schemas/AuthGatewayURLRequestv2",
  "type": "object",
  "required": [
    "redirect_url"
  ],
  "properties": {
    "redirect_url": {
      "type": "string",
      "description": "URL where the user will be redirected to once they have completed the TPP Connection flow. This can be a web based URL or a mobile application internal URL.",
      "nullable": false,
      "maxLength": 2083
    },
    "providers": {
      "type": [
        "array",
        "null"
      ],
      "description": "Specify a list of one or more providers that will be displayed to the customer during the connection flow. If only a single provider is given, the customer will no longer be shown the select provider screen.\n\nNote, that these must match the `provider_id` returned by the Retrieve OB Providers endpoint.\n",
      "items": {
        "type": "string"
      }
    },
    "provider_types": {
      "$ref": "#/$defs/ProviderTypes"
    },
    "connect_more_accounts_button": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "When enabled, the customer will see an additional button at the end of the connection flow that allows them to start the connection flow again in order to connect to a new provider."
    },
    "accounts_summary": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "When enabled, the customer will be shown a summary screen at the endpoint of the flow that lists the names and balances of all of the accounts that the customer has active consents for (including those connected in previous sessions)."
    },
    "initial_screen": {
      "type": [
        "string",
        "null"
      ],
      "description": "The first screen that the customer will be shown. When value is 'accounts_summary' the customer will see a list of the names and balances of the accounts that the customer currently has active consents for.\nWhen value is 'connect_accounts', the customer will see a list of providers to connect their accounts with. By default this value is 'connect_accounts'.\nWhen the value is 'download_data', the customer can download their data in a JSON file.\nWhen the value is 'reconfirm_consent', the customer will be taken through the reconfirmation of consent journey. If the customer only has one consent they will skip the consent selection screen.\nWhen the value is 'revoke_consent', the customer can revoke consent for accounts they have previously connected.\n",
      "enum": [
        "accounts_summary",
        "connect_accounts",
        "download_data",
        "reconfirm_consent",
        "revoke_consent"
      ]
    },
    "reconfirm_consent": {
      "deprecated": true,
      "type": [
        "boolean",
        "null"
      ],
      "description": "This body parameter has been deprecated. Please use the initial_screen option reconfirm_consent. When enabled, the customer will be taken through the reconfirmation of consent journey. If the customer only has one consent they will skip the consent selection screen. Once they select the option to renew their consent, Bud will either extend the consent expiry date by 90 days from today's date or (if required) send the customer to the provider to go through Strong Customer Authentication (SCA) before updating the consent expiry date."
    },
    "reconfirm_consent_redirect": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "When enabled, once a customer has reconfirmed consent they will be redirected back to the client redirect_url bypassing the account summary screen. This should be used if you don’t want your customers to see the Bud account summary screen."
    },
    "enable_async_connect": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "When enabled, once the consent authorisation has completed, the customer will be moved on in the flow. The data is then fetched and enriched in the background, instead of the customer waiting on a loading spinner"
    },
    "skip_success_screen": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "When enabled, once the customer has completed the connect flow, they will be redirected back to the client redirect_url bypassing the success screen. This should be used if you don’t want your customers to see the Bud success screen."
    },
    "customer_email": {
      "type": "string",
      "format": "email",
      "description": "When provided, an email will be delivered to the customer with a URL for managing their consents with you.\n\nThis allows the customer to separately view, revoke and reconfirm consents for accounts that they have agreed to share with you, as well as download the financial data for their own records.\n\nUse this option if your application does not already provide a means for customers to manage their financial data consents.\n\n**Note**: for some clients, we enforce that customers have access to this consent management feature. In this case, even if `customer_email` is not provided, the customer will be prompted at the start of the Connect flow to provide their email address, so that the URL will still be delivered to them.\n"
    }
  },
  "$defs": {
    "ProviderTypes": {
      "title": "Provider Types",
      "type": "array",
      "description": "One or more provider types that can be used to filter the list of providers that are shown to the customer during the connection flow. If no filter is applied, all types of provider are returned. Note that on Bud's sandbox environment, only sandbox providers will be returned.",
      "items": {
        "type": "string",
        "enum": [
          "business",
          "retail",
          "sandbox"
        ]
      }
    }
  }
}