Basker Docs

Client libraries

Use cURL, fetch, axios, or any HTTP client — there are no SDK requirements for the Basker Partners API

The Basker Partners API is a standard REST API. There's no required SDK — every endpoint is reachable from any HTTP client in any language. This page collects the most common client patterns so you can move fast in your stack of choice.

Official Basker SDKs are not currently published. If you'd like a first-party client library for a specific language, contact sales — there's a roadmap discussion you'll be able to feed into.

cURL

cURL is the canonical example syntax used throughout this section.

curl -s \
  -H "Authorization: users API-Key YOUR_API_KEY" \
  -H "x-basker-tenant-slug: royal-opera-house" \
  "https://api.basker.app/partners/2026-02/royal-opera-house/events?limit=10"

Node.js (fetch)

Native fetch is available in Node.js 18 and above. No dependencies required.

const response = await fetch(
  "https://api.basker.app/partners/2026-02/royal-opera-house/events?limit=10",
  {
    headers: {
      Authorization: "users API-Key YOUR_API_KEY",
      "x-basker-tenant-slug": "royal-opera-house",
    },
  }
);

if (!response.ok) {
  throw new Error(`Request failed: ${response.status} ${response.statusText}`);
}

const data = await response.json();
console.log(data);

Node.js (axios)

import axios from "axios";

const client = axios.create({
  baseURL: "https://api.basker.app/partners/2026-02/royal-opera-house",
  headers: {
    Authorization: "users API-Key YOUR_API_KEY",
    "x-basker-tenant-slug": "royal-opera-house",
  },
});

const { data } = await client.get("/events", { params: { limit: 10 } });

Python (requests)

import requests

response = requests.get(
    "https://api.basker.app/partners/2026-02/royal-opera-house/events",
    headers={
        "Authorization": "users API-Key YOUR_API_KEY",
        "x-basker-tenant-slug": "royal-opera-house",
    },
    params={"limit": 10},
)
response.raise_for_status()
data = response.json()

Ruby (Net::HTTP)

require "net/http"
require "json"

uri = URI("https://api.basker.app/partners/2026-02/royal-opera-house/events?limit=10")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "users API-Key YOUR_API_KEY"
request["x-basker-tenant-slug"] = "royal-opera-house"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end

raise "Request failed: #{response.code}" unless response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)

OpenAPI-generated clients

The Partners API ships an OpenAPI specification. Use any OpenAPI generator to scaffold a typed client in your language of choice — openapi-generator-cli, openapi-typescript, oapi-codegen, and similar tools all consume the spec directly.

This is the recommended path for larger integrations because:

  • The generated client mirrors the API's types — fewer hand-written shapes that can drift from reality.
  • Re-running the generator against a new API version produces the new types automatically.
  • Most generators support multiple languages from the same spec.

Tips for any client

  • Set a User-Agent that identifies your integration — e.g. MyApp/1.0 (contact@example.com). It helps engineering correlate traffic if you ever need support.
  • Implement retries with exponential backoff plus jitter — see Rate limits.
  • Use field selection (Field selection) to keep responses small.
  • Cache collection definitions and other rarely-changing data on your side.

On this page