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

# Test locally

> Download the Codaclean collection and call the API from Bruno or Postman in a few minutes.

[Bruno](https://www.usebruno.com) is a free, open-source API client that runs on your computer.

The Codaclean collection lets you try every endpoint without writing any code. It uses the Postman format, so it also works in Postman.

<Steps>
  <Step title="Install Bruno">
    Download Bruno from [usebruno.com](https://www.usebruno.com) and install it.
  </Step>

  <Step title="Download the collection">
    <a href="/downloads/codaclean-api.postman_collection.txt" download="codaclean-api.postman_collection.json">Download the Codaclean collection</a> (JSON file, Postman v2.1 format).
  </Step>

  <Step title="Import it into Bruno">
    In Bruno, import a collection and choose the **Postman collection** format.

    Select the file you downloaded, then the folder where Bruno should store the collection.
  </Step>

  <Step title="Fill in the variables">
    In Bruno, create an environment for the collection, select it, and add these variables:

    | Variable   | Value                                                                                                       |
    | ---------- | ----------------------------------------------------------------------------------------------------------- |
    | `baseUrl`  | Defaults to staging: `https://api.test.codaclean.io/v1`. For production, use `https://api.codaclean.io/v1`. |
    | `apiKey`   | Your API key.                                                                                               |
    | `username` | The user's Codaclean login.                                                                                 |
    | `password` | The user's password, **in plain text**. The collection encodes it in Base64 for you.                        |
  </Step>

  <Step title="Get a token">
    Run **Authentication › Get a token**.

    The collection saves the ID token and the refresh token. Every other request uses them automatically.

    The ID token is valid for 1 hour. After that, run **Refresh the token** or run **Get a token** again.
  </Step>

  <Step title="Call the API">
    Start with **Utilities › Hello world** to check that everything works.

    Requests that target a specific customer, mandate or file have a variable in their URL: `customerId`, `iban`, `payrollProviderCode`, `mandateId` or `fileId`. Fill it in with a value from a list response.
  </Step>
</Steps>

<Warning>
  The collection variables hold your API key and the user's password. Keep the collection on your computer. Do not share it or commit it to a code repository.
</Warning>

## Use Postman

In Postman, import the same file. You find the variables in the collection's **Variables** tab. The requests work the same way.

**See also:** [Authentication](/api/authentication) · [Environments](/api/environments)
