Make your first API call
Authenticate, set your tenant, and fetch your first records from the Partners API
This walkthrough takes you from nothing to a working authenticated request. By the end you'll have an API key, know your tenant slug, and have fetched live content from your site.
Before you start
You need a Basker account with access to the admin panel. Everything else you'll create as you go.
Generate an API key
Sign in to the admin panel, click your avatar to open your profile, and find the API Key section. Click Generate New API Key and copy the key — it's shown in full only once.
Your key looks like a1b2c3d4-e5f6-7890-abcd-ef1234567890.
For the full authentication reference, see Authentication.
Find your tenant slug
Every request resolves a single tenant (your site). The tenant slug is the short identifier for your site — for example royal-opera-house. You'll use it in the request path.
If you manage more than one site, see Multi-tenancy for how tenant context works.
Make the request
Fetch the first page of your site's pages. Replace the key and tenant slug with your own:
curl -s \
-H "Authorization: users API-Key a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
"https://api.basker.app/partners/2026-02/royal-opera-house/pages"The path is /partners/{version}/{tenant}/{resource}. Here the version is 2026-02, the tenant is royal-opera-house, and the resource is pages.
Read the response
A successful request returns 200 with a paginated envelope: a docs array of records plus pagination metadata.
{
"docs": [
{ "id": "67be2c1cb1d3f...", "title": "Home", "slug": "home" }
],
"totalDocs": 12,
"limit": 10,
"page": 1,
"totalPages": 2,
"hasNextPage": true,
"hasPrevPage": false
}If you get a 401, recheck the Authorization header — the scheme must be exactly users API-Key, not Bearer. See Status codes for the full list.
Next steps
- Pagination — page through large result sets and sort them.
- Filtering — narrow results to what you need.
- Field selection — trim responses to specific fields.
- Reference — every resource and endpoint, with request and response detail.