Authentication
The Tether API uses API keys for authentication. All requests must include your key in the Authorization header.
Generating an API key
API keys are scoped to a specific product in your Tether account. To create one:
- Go to Settings → Products and select a product.
- Scroll to the API section.
- Click Generate API Key.
- Copy the key — it will only be shown once.
Because keys are product-scoped, every request made with a key is automatically restricted to that product's data. You cannot use a key to access customers or data belonging to a different product.
Authenticating requests
Pass your API key as a Bearer token in the Authorization header of every request:
Authorization: Bearer YOUR_API_KEYExample
import { useEffect, useState } from "react";
export function useData() {
const [data, setData] = useState(null);
const [loading, setLoading] = useState(true);
useEffect(() => {
fetch("https://usetether.io/api/v1/customers", {
headers: {
Authorization: `Bearer ${import.meta.env.VITE_TETHER_API_KEY}`,
},
})
.then((res) => res.json())
.then((json) => { setData(json); setLoading(false); });
}, []);
return { data, loading };
}Request headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | required | Bearer token. Format: "Bearer YOUR_API_KEY". |
| Content-Type | string | optional | Required for POST and PATCH requests with a JSON body. Use "application/json". |
Errors
If authentication fails, the API returns a 401 response:
1{
2 "error": "Unauthorized",
3 "code": "UNAUTHORIZED"
4}Common causes:
- Missing
Authorizationheader - Malformed token (must be
Bearer <key>, not just the key) - Key has been revoked — generate a new one in Settings