Skip to main content
Before continuing, make sure you’re familiar with:If you need a primer on what an API is, we’ve added a quick summary below. For more detailed information, check out What is an API in the Before You Begin section.

Building APIs in Xano

APIs are a core part of any backend. They allow you to connect your backend to other services and applications. Each API is assigned a name, a verb, and a URL.
  • The name is the unique identifier for the API. For example, user_list. We’ll be referencing this sample API throughout the rest of this page.
  • The verb is the HTTP verb that will be used to make the request. For example, GET.
  • The URL is the endpoint that the API will be accessed at. For example, https://myapi.com/user_list.
APIs in Xano are built in three parts:
  • Inputs — Inputs are the data that the API will accept. For example, name and email.
  • Logic — The logic is the logic that will be executed when the API is called. For example, retrieving a record from your database or calculating a user’s age.
  • Response — The response is the data that the API will return. For our user_list API, it might return a list of users, or a single user.

API Groups

APIs live inside of API groups. Think of groups as folders that you can use to organize all of your different APIs. For example, you might have a group for your authentication APIs, a group for your user APIs, and a group for file storage APIs.

Creating a new API Group

1

From the left-hand menu, click API, and then click + Add API Group.
apis-20251013-101018
2

In the panel that opens, give your API group a name. You can also provide a description, tags for organization, and choose whether or not to make auto-generated API documentation available for this group.
  • Visually
  • With Code
apis-20251013-101155
ParameterDescription
nameThe name of the API group. This comes immediately after the api_group definition, and before the opening curly brace.
descriptionA description of the API group.
tagsTags for organization.
Swagger (OpenAPI) DocumentationOptions for auto-generated API documentation. By default, it will be public, non-tokenized documentation. You can switch to tokenized documentation by clicking the toggle and choosing “Private (requires token)”, or disable it by clicking the toggle and selecting “Disabled”.

Creating a new API

Clicking the + Add API Endpoint button will open a panel that allows you to create a new API. You can choose from one of the following options:
TypeDescription
Custom EndpointCreates a blank canvas for you to build your API from scratch.
External API requestCreates a pre-built API for making requests to external APIs.
CRUD Database OperationsCreates a pre-built API for performing CRUD operations (Create, Read, Update, Delete) on a database table.
WebhookCreates a pre-built API for receiving webhooks from external services.
AuthenticationCreates a pre-built API for authentication.
Upload ContentCreates a pre-built API for uploading files, such as images or attachments.
HTML PageCreates a pre-built API for serving HTML pages.
Use XanoScriptOpens the XanoScript editor so you can build your API from scratch.
You’ll be asked to provide some basic information about your API before continuing.
apis-20251013-103441
ParameterDescription
NameThe name of the API.
VerbThe HTTP verb that will be used to make the request.
DescriptionA description of the API.
TagsTags for organization.
AuthenticationChoose whether this endpoint requires a valid authentication token present in the headers to execute.
You can build APIs in Xano in three different ways. Choose the one that best fits your needs. You can switch between them at any time.
  • Canvas View
  • Function Stack
  • XanoScript

The Canvas View

The canvas view is a visual representation of your API in a node-based format. If you’re new to the canvas view, review the Canvas View basics first.
apis-20251013-112630

Here's an example of a basic API in the canvas view

I