# Chapter 0 setting up the API context

When integrating with the bunq API, security is a top priority. Instead of relying solely on API keys, bunq uses a **three-step authentication process:**

* installation,
* device registration,
* session creation

to ensure secure and controlled access. This approach prevents unauthorized use, protects sensitive financial data, and aligns with banking security standards like PSD2. Here’s how each step enhances security while keeping API access flexible and manageable.

{% hint style="info" %}
**Pro Tip: Simplify with Postman** Using our Postman examples makes API integration super easy. We've pre-filled all the requests with environment variables, streamlining the process and reducing the risk of errors. It's by far the quickest way to get a live session, to play around with until you fully commit to a integration in your own application.This setup allows you to focus more on development and less on configuration, ensuring a smoother experience&#x20;

Check it out here : [postman](https://doc.bunq.com/getting-started/tools/postman "mention")
{% endhint %}

**Setting up the API context**

We documented the API context in the following pages

* [creating-the-installation](https://doc.bunq.com/tutorials/your-first-payment/creating-the-api-context/creating-the-installation "mention")
* [device-registration](https://doc.bunq.com/tutorials/your-first-payment/creating-the-api-context/device-registration "mention")
* [start-a-session](https://doc.bunq.com/tutorials/your-first-payment/creating-the-api-context/start-a-session "mention")

### Host URL for the API endpoints <a href="#host-url-for-the-api-endpoints" id="host-url-for-the-api-endpoints"></a>

One change for partners, compared to regular API users is the base URL. Make sure to target

* Sandbox: `https://partner-api.sandbox.bunq.com`&#x20;
* Production: `https://api.partner.bunq.com`


---

# 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://doc.bunq.com/user-provisioning/chapter-0-setting-up-the-api-context.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.
