The Asaas interactive documentation lets you test API calls directly in it! See the step by step below.
Before testingRequests run in this documentation are sent to the Sandbox (
https://api-sandbox.asaas.com/v3).Use an API key created in the Sandbox. A Production key is not valid in this environment and will result in
401 Unauthorized.Create your Sandbox account and generate an API key for testing.
Each endpoint in the API Reference has an interactive console. With it, you fill in the parameters, send the request to the Sandbox, and see the API response without leaving the documentation.
1. Choose the endpoint
In the side menu, select the endpoint you want to test, for example List customers.
The page shows the method, the URL, the operation description, and the accepted parameters.
2. Provide your API key
In the panel on the right, under Credentials, fill in the access_token field with your Sandbox API key.
The key remains available for the next requests while you browse the documentation.
Learn how to configure authentication
3. Fill in the parameters
Provide the request parameters in the fields on the page:
- Path Params: identifiers that are part of the URL, such as a resource
id; - Query Params: filters and pagination, such as
offsetandlimit; - Body Params: data sent in the request body for create and update endpoints.
Required fields are marked as required.
4. Run the request
Click Try It!.
The console sends the request to the Sandbox and shows the result under Response, with the HTTP status and the returned JSON.
Before running it, you can also check the response examples available in the same panel.
5. Generate the request code
Under Language, select the language you want, such as Shell, Node, Ruby, PHP, or Python.
The code example is updated with the parameters you provided and can be copied into your application.
Real requests in the SandboxRequests run from the console create, change, or remove real data in your Sandbox account.
Use fictitious data and avoid entering personal data of third parties.
Common errors
| Status | Likely cause | How to fix |
|---|---|---|
401 Unauthorized | API key missing, invalid, or from Production | Provide a valid API key created in the Sandbox |
400 Bad Request | Required parameter missing or in an invalid format | Review the fields listed in errors |
404 Not Found | Identifier does not exist in the Sandbox account | Confirm that the id provided belongs to your account |
