# Build Approval Transaction

If your allowance is not sufficient, this endpoint can help you initiate an ERC20 approval transaction.

{% openapi src="/files/TtIQ5kToU9bWazZWUKQj" path="/approveTx" method="get" %}
[openapi.json](https://3694085950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mcs9EhDrgbKHodtcAT6%2Fuploads%2F992nLSFootyLzNGT3OSd%2Fopenapi.json?alt=media\&token=dbdd978e-3fd3-4af0-a7aa-36ce013023ad)
{% endopenapi %}

{% hint style="info" %}
**NOTE :** The spender should be the `contractAddress` in the response of [Get Quote](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator/get-quote.md).\
e.g. `routes[{ROUTE_INDEX}]["contractAddress"]`
{% endhint %}

{% hint style="info" %}
Here you can find our full [API reference](https://aggregator-api.xy.finance/v1/docs)
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xy.finance/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator/build-approval-transaction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
