Skip to main content

Bearer Token

All API endpoints require authentication via Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_KEY

Example Request

cURL
curl -X GET "https://api.shoal.xyz/v1/organizations/all" \
  -H "Authorization: Bearer YOUR_API_KEY"
Python
import requests

headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.get("https://api.shoal.xyz/v1/organizations/all", headers=headers)
JavaScript
const response = await fetch("https://api.shoal.xyz/v1/organizations/all", {
  headers: { Authorization: "Bearer YOUR_API_KEY" }
});

Error Responses

ErrorDescription
Missing Authorization headerNo Authorization header provided
Invalid Authorization header formatHeader doesn’t use “Bearer ” scheme
UnauthorizedInvalid API key

Missing Header

{
  "error": "Missing Authorization header"
}

Invalid Format

{
  "error": "Invalid Authorization header format"
}

Invalid API Key

{
  "error": "Unauthorized"
}