Using Swagger/OpenAPI to document your Xano APIs for easy integration.
Xano automatically generates Swagger/OpenAPI documentation for your APIs, making it easy to share your endpoints with frontend developers, AI copilots, or third-party services. It’s also a quick way to visualize and test your API endpoints.The API documentation is accessible via a unique URL for each API group, or for an entire workspace. This URL can be shared with anyone who needs to understand or interact with your API. The URLs can also be protected with a token, or disabled entirely.
From inside of an API group, click Swagger Documentation in the top right to access the Swagger/OpenAPI documentation for that specific group.This will open a new tab with the Swagger UI, displaying all the endpoints in that API group, along with details about request parameters, responses, and authentication.You can access a downloadable version of your OpenAPI specification in JSON format by selecting the link under the title of the page.
From the API Groups page, click Swagger Documentation Disabled in the top right to access the settings. You’ll need to select which API groups you want to be made available in your workspace-level documentation.At the bottom of the panel, select the desired option to enable the documentation (public or requires token), and use the check boxes to select which API groups to include.
Once first-time setup is complete, you can access the workspace-level Swagger/OpenAPI documentation by clicking Swagger Documentation in the top right of the API Groups page.
You can also access Swagger/OpenAPI documentation for individual API endpoints. From inside an API, click the icon to view documentation specific to that endpoint.
NoteWe’re currently rolling out this feature to all users as part of our next release. If you don’t have it yet, you will soon! Hang tight.
When testing your function stacks in Xano, you can define sample input and output examples for your Swagger documentation.It is important that you do this to ensure that your documentation is as effective as possible, as well as for helping AI models understand what’s expected when interacting with your APIs.
1
In the 'response' section of the Run panel, click Set As Example
2
Review the sample input and response, and make any necessary adjustments
Make sure these do not include any sensitive information.
3
Click Save and you will see these defined in your Swagger documentation.
If you need to make adjustments later, you can do so from the settings menu.
Throughout the documentation, you’ll see icons. These will let you quickly copy the contents of that element, and in the presence of a cURL command, copy that command to quickly paste into a terminal or other API / testing platform of choice, such as Postman.
You can click the link at the top of the page to access a JSON-formatted version of your API spec. This is useful for other external platforms that rely on this type of standardized information about your APIs or providing to AI chatbots / LLMs.