> ## Documentation Index
> Fetch the complete documentation index at: https://docs.axle.energy/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Balance Withdrawal URL

> Get a temporary link to an Axle-hosted form through which users can view and withdraw rewards. Requires an organisational bearer token.

**Important**: Anyone with access to this link will be able to withdraw funds from the corresponding site. The URL contains a JWT valid for 60 minutes from the time of generation. Use the `url_expiry_timestamp` field to surface or enforce this deadline client-side.

The ability to withdraw funds via API-generated links is disabled by default. [Contact us](mailto:support@axle.energy) to enable it for your organisation.


## OpenAPI

````yaml GET /rewards/{site_id}/url/balance
openapi: 3.1.0
info:
  title: Axle API Docs
  description: >-
    For full documentation please see our official docs at <a
    href='http://docs.axle.energy'>docs.axle.energy</a>
  version: 1.4.6
servers:
  - url: https://api-sandbox.axle.energy
security: []
tags:
  - name: 1. Authentication
    description: Authenticate yourself with the Axle API
  - name: 2. Meters
    description: Find key info about your sites
  - name: 3. Sites
    description: Register your sites with Axle; configure market participation
  - name: 4. Assets
    description: Register your assets with Axle
  - name: 5. Data
    description: Send asset metrics to Axle, for analysis and optimisation purposes
  - name: 6. Rewards
    description: >-
      Determine how much your users have earned by participating with Axle;
      allow balance withdrawal
  - name: 7. Validation
    description: Validate structured data against Axle's rules
  - name: 8. Examples
    description: Get example data for testing
paths:
  /rewards/{site_id}/url/balance:
    get:
      tags:
        - 6. Rewards
      summary: Get Rewards Balance Withdrawal Url
      description: >-
        Get a temporary link to an Axle-hosted form through which users can view
        and withdraw rewards. Requires an organisational bearer token.
      operationId: get_rewards_balance_withdrawal_url_rewards__site_id__url_balance_get
      parameters:
        - description: >-
            The ID on Axle's system for this user. The site_id can be easily
            retrieved from the get-by-external-id endpoint.
          required: true
          schema:
            type: string
            format: uuid
            title: Site Id
            description: >-
              The ID on Axle's system for this user. The site_id can be easily
              retrieved from the get-by-external-id endpoint.
          name: site_id
          in: path
        - description: >-
            Require email verification before the user can link a bank account.
            Balance and transaction-history views are not gated. When omitted,
            falls back to the organisation's configured 2FA posture.
          required: false
          schema:
            type: boolean
            title: Enforce Two Factor Auth
            description: >-
              Require email verification before the user can link a bank
              account. Balance and transaction-history views are not gated. When
              omitted, falls back to the organisation's configured 2FA posture.
          name: enforce_two_factor_auth
          in: query
        - description: Where to redirect after completion
          required: true
          schema:
            type: string
            title: Redirect Uri
            description: Where to redirect after completion
          name: redirect_uri
          in: query
        - description: Hide transaction history from the user
          required: false
          schema:
            type: boolean
            title: Hide Transactions
            description: Hide transaction history from the user
            default: false
          name: hide_transactions
          in: query
        - description: >-
            Skip the balance page and go straight to bank setup if no account
            exists
          required: false
          schema:
            type: boolean
            title: Auto Redirect To Setup
            description: >-
              Skip the balance page and go straight to bank setup if no account
              exists
            default: false
          name: auto_redirect_to_setup
          in: query
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalanceWithdrawalURLResponse'
        '404':
          description: Site not found or not authorized to access
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    BalanceWithdrawalURLResponse:
      properties:
        balance_withdrawal_url:
          type: string
          title: Balance Withdrawal Url
          description: >-
            Temporary standalone URL via which an end-user may enter their bank
            details to withdraw their balance
        url_expiry_timestamp:
          type: string
          format: date-time
          title: Url Expiry Timestamp
          description: Time at which the given URL will expire
      type: object
      required:
        - balance_withdrawal_url
        - url_expiry_timestamp
      title: BalanceWithdrawalURLResponse
      description: Response model for balance withdrawal URL.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: auth/token-form

````