Xano Documentation
Search…
πŸ’‘
Start here
☁️ Your Xano Account
πŸ’²
Special Discount Pricing
πŸ”¨
Troubleshooting
Developer API
The Xano Developer API allows you to interact with your account in an automated fashion.
The primary use case is the ability to authenticate and then retrieve Swagger/OpenAPI documentation for each of your API groups on each of your Xano instances. More functionality will be coming soon.
Since Xano supports a single tenant infrastructure on each of its premium instances, it is important to understand that different authentication is required for different aspects of this API.
Authentication starts with your Developer API Key, which allows you to authenticate your account with the master service. This master service is responsible for managing your account, subscriptions, and instances.
By listing each instance you have access to, you will then be able to re-authenticate with each individual instance to view the Developer API for that instance. Then you will have access to list workspaces and the API groups within each workspace, which then gives you access to the appropriate Swagger documentation for each API group.

Step 1: Generate your Developer API Key

This is available on the Account page. Every account has the ability to have a single Developer API Key. Once this is generated, it is no longer possible to view the key, so it is very important to write this down in a safe place, so it isn't forgotten. If it is forgotten, then you need to revoke the current one and generate a new key.
Generate a Developer API key from the Account page.

Step 2: Xano Master Service Documentation

Now that you have your API Key, you can start authenticating against the API endpoints for the Xano master service. The API documentation is detailed at https://app.xano.com/api:developer.
Currently, there is only support to list your Xano instances, but more functionality will be fleshed out over the next several releases.
Authentication is handled using the Authorization HTTP header along with the Bearer token specification.
If you are viewing the Swagger documentation, then you can click the "Authorize" button and paste in your Developer API key. Then you can click on the Instances endpoint and click the "Try Out" button to execute the API endpoint.
If you are using the API directly via your front-end or the CURL command line utility, then you would need to include your Developer API key as follows.
In the CURL example below you would replace the text YOUR_DEVELOPER_API_KEY with your actual Developer API Key.
1
curl -X 'GET' \
2
'https://app.xano.com/api:developer/instance' \
3
-H 'accept: application/json' \
4
-H 'Authorization: Bearer YOUR_DEVELOPER_API_KEY'
Copied!
The following would be an example response to expect, if your account had access to two instances.
1
[
2
{
3
"id": 1,
4
"name": "explore-instance",
5
"display": "Explore Instance",
6
"description": "",
7
"host": "",
8
"tokenUrl": "https://app.xano.com/api:developer/token/auth?token=DBWJQ2..."
9
},
10
{
11
"id": 2,
12
"name": "starter-instance",
13
"display": "Starter Instance",
14
"description": "",
15
"host": "",
16
"tokenUrl": "https://app.xano.com/api:developer/token/auth?token=6B67wcN..."
17
}
18
]
Copied!

Step 3: Fetch the tokenUrl for your instance

The tokenUrl for each instance has an authenticated token parameter to give you access to the Authorization token required to call the API for that specific instance.
In the above example, if we fetch the tokenUrl, then the following example response would be expected.
1
{
2
"authToken": "eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJ...",
3
"api": "https://x8d0-doy0-xx99.n0.xano.io/api:developer",
4
"swaggerspec": "https://x8d0-doy0-xx99.n0.xano.io/apispec:developer?type=json",
5
"origin": "https://x8d0-doy0-xx99.n0.xano.io"
6
}
Copied!
The authToken key will be used to authenticate to any endpoints listed within the API or swaggerspec links.
The API key is a link to the Swagger documentation for the Developer APIs for this specific instance.
The swaggerspec key is a link to the json spec for the Swagger documentation in case you want to programmatically parse the endpoints available within the documentation.
The origin key is useful for knowing the desired http origin of any requests sent to the instance. This is normally Xano URL, but can change if a custom domain is enabled.

Step 4: Call the APIs of your Instance

Now that we have the authToken from Step 3, we can call the endpoints available within the API link above.
Any endpoints within this instance that require authentication, must use this authToken and not your API Developer Key. The API Developer Key is only intended for the Xano master service.
1
curl -X 'GET' \
2
'https://x8d0-doy0-xx99.n0.xano.io/api:developer/workspace' \
3
-H 'accept: application/json' \
4
-H 'Authorization: Bearer eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJ...'
Copied!
Below is an example response to the workspace endpoint listed above.
1
[
2
{
3
"id": 2,
4
"name": "Book Marketplace",
5
"description": "This is an example workspace.",
6
"apigroups": [
7
{
8
"id": 4,
9
"name": "Public API",
10
"description": "",
11
"api": "https://x8d0-doy0-xx99.n0.xano.io/api:Wk_siXX",
12
"swaggerspec": "https://x8d0-doy0-xx99.n0.xano.io/apispec:Wk_siXX"
13
},
14
{
15
"id": 5,
16
"name": "Private API",
17
"description": "",
18
"api": "https://xb17-541e-40b9.dev.xano.io/api:YkBUXX",
19
"swaggerspec": "https://xb17-541e-40b9.dev.xano.io/apispec:YkBUXX"
20
}
21
]
22
}
23
]
Copied!
From this response, you can see there is one workspace with two API Groups. Each API Group has its own api and swaggerspec key. The difference here is that these APIs are the ones built by you in your own instance. This also means that these will require their own Authentication.