Get an API token
- Open Settings → API in Inboxapp
- Select New API token
- Name it and select Create
- Copy the token
Use the token
Send it in theAuthorization header of every request:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Create and use an Inboxapp API token
Authorization header of every request:
Authorization: Bearer YOUR_API_TOKEN
const API = "https://inboxapp.com/api/v2";
async function api<T>(path: string, init: RequestInit = {}): Promise<T> {
const response = await fetch(`${API}${path}`, {
...init,
headers: {
Authorization: `Bearer ${process.env.INBOX_API_TOKEN}`,
"Content-Type": "application/json",
...init.headers,
},
});
if (!response.ok) {
const error = await response.json();
throw new Error(`${error.code}: ${error.message} (${error.requestId})`);
}
return response.status === 204 ? (undefined as T) : response.json();
}
const team = await api<{ name: string }>("/team");
console.log("Connected to", team.name);
const API = "https://inboxapp.com/api/v2";
async function api(path, init = {}) {
const response = await fetch(`${API}${path}`, {
...init,
headers: {
Authorization: `Bearer ${process.env.INBOX_API_TOKEN}`,
"Content-Type": "application/json",
...init.headers,
},
});
if (!response.ok) {
const error = await response.json();
throw new Error(`${error.code}: ${error.message} (${error.requestId})`);
}
return response.status === 204 ? undefined : response.json();
}
api("/team").then((team) => console.log("Connected to", team.name));
curl https://inboxapp.com/api/v2/team \
-H "Authorization: Bearer $INBOX_API_TOKEN"
| Response | Cause |
|---|---|
401 unauthorized | The header is missing or malformed, or the token was revoked |
403 workspaceLocked | The team’s billing is paused or past due, or its trial ended |
403 planRequired | The endpoint needs a plan or add-on the team doesn’t have |
Was this page helpful?