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

# Enable Transaction Bundling

> Get authorization for bundling transactions.

Currently this is required for every transaction bundle to prevent replay attacks
and ensure transaction ordering when batching multiple actions into a single
transaction. The authorization includes a nonce and chain ID to guarantee
transaction uniqueness and proper network targeting.



## OpenAPI

````yaml /v1/combined_spec.json post /v1/transaction_bundler/authorization
openapi: 3.1.0
info:
  title: Compass API
  description: Compass Labs DeFi API
  version: 0.0.1
servers:
  - url: https://api.compasslabs.ai
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /v1/transaction_bundler/authorization:
    post:
      tags:
        - Transaction Bundler
      summary: Enable Transaction Bundling
      description: >-
        Get authorization for bundling transactions.


        Currently this is required for every transaction bundle to prevent
        replay attacks

        and ensure transaction ordering when batching multiple actions into a
        single

        transaction. The authorization includes a nonce and chain ID to
        guarantee

        transaction uniqueness and proper network targeting.
      operationId: v1_transaction_bundler_authorization
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MulticallAuthorizationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MulticallAuthorizationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: python
          label: Python (SDK)
          source: |-
            from compass_api_sdk import CompassAPI, models


            with CompassAPI(
                api_key_auth="<YOUR_API_KEY_HERE>",
            ) as compass_api:

                res = compass_api.transaction_bundler.transaction_bundler_authorization(chain=models.MulticallAuthorizationRequestChain.ARBITRUM, sender="0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B")

                # Handle response
                print(res)
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { CompassApiSDK } from "@compass-labs/api-sdk";

            const compassApiSDK = new CompassApiSDK({
              apiKeyAuth: "<YOUR_API_KEY_HERE>",
            });

            async function run() {
              const result = await compassApiSDK.transactionBundler.transactionBundlerAuthorization({
                chain: "arbitrum",
                sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
              });

              console.log(result);
            }

            run();
components:
  schemas:
    MulticallAuthorizationRequest:
      properties:
        chain:
          type: string
          enum:
            - arbitrum
            - base
            - ethereum
          title: Chain
          default: arbitrum
          examples:
            - arbitrum
        sender:
          type: string
          title: Sender
          description: The Ethereum address to use for authorization
          examples:
            - '0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B'
          default: '0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B'
      type: object
      required:
        - chain
        - sender
      title: MulticallAuthorizationRequest
      description: >-
        Request model for getting a multicall authorization.


        This model is used to authorize a sender address to perform multicall
        operations,

        allowing it to call multiple functions on multiple contracts in a single

        transaction.
      default:
        chain: arbitrum
        sender: '0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B'
      required_allowances: []
    MulticallAuthorizationResponse:
      properties:
        nonce:
          type: integer
          title: Nonce
          description: A unique nonce value for this authorization
          examples:
            - 12345
        address:
          type: string
          title: Address
          description: The Ethereum address authorized for multicall
        chainId:
          type: integer
          title: Chainid
          description: The chain ID for the blockchain network
          examples:
            - 1
      type: object
      required:
        - nonce
        - address
        - chainId
      title: MulticallAuthorizationResponse
      description: Response model for multicall authorization.
    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:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Compass API Key. Get your key
        [here](https://www.compasslabs.ai/dashboard).

````