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

# Overview

> This guide provides a step-by-step overview of integrating Bungee Auto into your application.

## Integration Flow[​](#integration-flow "Direct link to Integration Flow")

All Bungee integrations follow the four key steps below. For detailed API specifications, see the [API Reference](/api-reference).

### 1. Get a quote[​](#1-get-a-quote "Direct link to 1. Get a quote")

Request a quote from the `/bungee/quote` endpoint to receive available routes, fee estimates, and transaction data for your token swap.

### 2. Handle token approvals[​](#2-handle-token-approvals "Direct link to 2. Handle token approvals")

For ERC20 tokens only:

* **Auto Mode**: Uses Permit2 for gasless approvals (Permit2 tx data is provided in the quote response)
* **Manual Mode**: Requires standard ERC20 approval transaction (approval transaction data is provided in the quote response and execution data in the build-tx response)

### 3. Submit the transaction (onchain or gasless)[​](#3-submit-the-transaction-onchain-or-gasless "Direct link to 3. Submit the transaction (onchain or gasless)")

**Auto ERC20**

Sign the Permit2 typed data and submit it offchain via `/bungee/submit` endpoint

<Info>
  See [submit onchain requests](/integrate/integration-guides/auto-onchain-requests) to get the transaction data in the quote response and submit ERC20 requests onchain
</Info>

**Auto Native Token**

* Transaction data is provided in the quote response
* Submit the request onchain to the Inbox Contract

**Manual Routes**

Build transaction data via `/bungee/build-tx` endpoint and submit onchain

### 4. Monitor the transaction status[​](#4-monitor-the-transaction-status "Direct link to 4. Monitor the transaction status")

Use the `/bungee/status` API endpoint to track the status of your transaction until completion.

<CardGroup cols={2}>
  <Card title="Submit requests with Permit2" icon="file-signature" href="/integrate/integration-guides/auto-erc20-permit2">
    Integrate Bungee with Permit2 for ERC20 tokens
  </Card>

  <Card title="Submit requests onchain" icon="link" href="/integrate/integration-guides/auto-onchain-requests">
    Integrate Bungee with the Inbox Contract
  </Card>
</CardGroup>

## Submission Methods[​](#submission-methods "Direct link to Submission Methods")

Bungee Auto requests can be submitted in two ways. Use this table to decide which one fits your needs:

| Requirement                | Recommended Flow             | Why?                                                                      |
| :------------------------- | :--------------------------- | :------------------------------------------------------------------------ |
| **ERC20 Tokens**           | **Permit2 (Gasless)**        | Better UX, no gas for approvals, one-time signature.                      |
| **Native Tokens**          | **Inbox Contract (Onchain)** | Native tokens (ETH, POL) cannot be approved, must be sent onchain.        |
| **Smart Contract Wallets** | **Inbox Contract (Onchain)** | Unless the wallet supports EIP-1271 signatures, use the onchain fallback. |

### Gasless request with Permit2[​](#gasless-request-with-permit2 "Direct link to Gasless request with Permit2")

This method uses the Bungee Auto API with Permit2 for gasless approvals:

1. Get a quote from the Bungee API
2. Create a request via the API
3. Approve Permit2 contract if needed
4. Sign a Permit2 message
5. Submit the request with the signature
6. Monitor the status via the API

This is the recommended approach for ERC20 tokens as it provides a better user experience by eliminating the need for separate approval transactions. Additionally, it allows for gasless approvals, saving users gas fees and tokens are only transferred if the auction is completed and a transmitter has picked up the request.

For a complete implementation guide, see [Permit2 Integration (ERC20)](/integrate/integration-guides/auto-permit2-gasless-requests).

### Inbox Contract[​](#inbox-contract "Direct link to Inbox Contract")

This method uses the Bungee Auto inbox contract to directly submit the request onchain:

1. Get a quote from the Bungee API
2. Create and submit a request onchain via Inbox contract
3. Monitor the status via the API

This method is required for native tokens (ETH, POL, etc.) and can also be used for ERC20 tokens if Permit2 is not an option or if the integration is directly onchain.

For a complete implementation guide, see [onchain request submission via Inbox Contract](/integrate/integration-guides/auto-onchain-requests).
