Insomnia

Import the Asaas OpenAPI specification into Insomnia to generate a Collection, configure requests, and resolve common import issues.


Import the Asaas OpenAPI specification into Insomnia to create a Collection with the API endpoints and test requests in your workspace

Insomnia is a tool for testing APIs. Use this flow when you want to automatically load the endpoints from Asaas documentation, validate calls during development, or compare your local Collection with the current version of the documentation.

Prerequisites

  1. Install or open Insomnia.
  2. Create or access a workspace where the Asaas Collection will be saved.
  3. Have your API key available before executing imported requests. To configure the headers correctly, see Authentication.
  4. Choose the language of the OpenAPI specification (the file that describes endpoints, parameters, and API responses): English or Brazilian Portuguese.

What to expect after importing

The import creates a Collection with the endpoints available in the provided OpenAPI specification. It does not automatically execute calls and does not validate your credentials during the import process.

Before sending requests, review the headers, environment variables, and required parameters in Insomnia. If you import the specification again to update endpoints, check whether you want to update the existing Collection or create a new one to avoid duplicate requests.

Importing the Collection into Insomnia


  1. In your Insomnia workspace, create a new empty Collection and name it Collection Asaas.

  1. With the Collection created, at the top of the page, click the Collection name and select Import.

  1. On the import screen, select Url and enter the URL of the OpenAPI file from the documentation.

To import the Collection in English, use:

https://www.asaas.com/openApi/document?version=3&languageCode=en-US

To import the Collection in Brazilian Portuguese, use:

https://www.asaas.com/openApi/document?version=3&languageCode=pt-BR
  1. Click Scan and confirm the import.

  1. Adjust the order of the imported endpoints to match the same sequence as the documentation: next to the Filter field, click the sorting icon and select Oldest First.

Troubleshooting

SituationHow to resolve
The import doesn't find any endpointsMake sure the URL was copied in full, including version=3 and languageCode. Then click Scan again.
The Collection was imported in the wrong languageRepeat the import using the URL for the desired language.
A documented endpoint doesn't appear in InsomniaImport the OpenAPI specification again to update the local Collection.
The request returns an authentication errorConfigure the API key and headers before executing the call. See Authentication.
The Collection has duplicate requests after a new importReview the imported Collection and remove duplicate requests, or create a new Collection to compare with the previous one before replacing your testing flow.

Next steps

  • Configure request authentication in Authentication.
  • If you use Postman instead of Insomnia, see Postman.
  • Re-import the specification whenever you need to sync your Collection with new or updated endpoints in the documentation.