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

# Approve Enso contract

> Returns a transaction that approves your Enso contracts to spend the given amount of specified tokens. Approve before sending the route transaction on-chain.



## OpenAPI

````yaml /public/openapi.json get /api/v1/wallet/approve
openapi: 3.0.0
info:
  title: Enso API
  description: >-
    #### Enso API

    - Find detailed documentation on
    [docs.enso.finance](https://docs.enso.finance).

    - To use the API, **you must include your API Key in the Authorization
    header** (Bearer format).

    - For testing, Swagger pre-authorizes you using the key:
    `1e02632d-6feb-4a75-a157-documentation` (1rps).

    - Get your own API Key at
    [enso.finance/developers](https://enso.finance/developers).
  version: 1.0.1
  contact: {}
servers:
  - url: https://api.enso.build
security:
  - {}
tags:
  - name: shortcuts
    description: ''
paths:
  /api/v1/wallet/approve:
    get:
      tags:
        - DeFi Shortcuts
      summary: Approve Enso contract
      description: >-
        Returns a transaction that approves your Enso contracts to spend the
        given amount of specified tokens. Approve before sending the route
        transaction on-chain.
      operationId: WalletController_createApproveTransaction
      parameters:
        - name: chainId
          required: false
          in: query
          description: Chain ID of the network to execute the transaction on
          schema:
            default: 1
            type: number
        - name: fromAddress
          required: true
          in: query
          description: Ethereum address of the wallet to send the transaction from
          schema:
            example: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
            type: string
        - name: routingStrategy
          required: false
          in: query
          description: >-
            Routing strategy to use. Use the same routing strategy you used to
            create the transaction.
          schema:
            nullable: true
            enum:
              - ensowallet
              - router
              - delegate
              - router-legacy
              - delegate-legacy
            type: string
        - name: tokenAddress
          required: true
          in: query
          description: ERC20 token address of the token to approve
          schema:
            default: '0x6b175474e89094c44da98b954eedeac495271d0f'
            type: string
        - name: amount
          required: true
          in: query
          description: Amount of tokens to approve in wei
          schema:
            default: '1000000000000000000000000000'
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletApproveTransaction'
components:
  schemas:
    WalletApproveTransaction:
      type: object
      properties:
        tx:
          type: object
          description: The tx object to use in `ethers`
        gas:
          type: string
          description: The gas estimate for the transaction
        token:
          type: string
          description: The token address to approve
        amount:
          type: string
          description: The amount of tokens to approve
        spender:
          type: string
          description: The spender address to approve
      required:
        - tx
        - gas
        - token
        - amount
        - spender

````