Error format#
A failed request answers with a status code and a JSON body. error is a sentence for people, in the caller's language. details, when present, is for your code.
{
"error": "That API token isn't valid. It may have been revoked."
}Status codes#
| Code | Meaning |
|---|---|
| 200 | It worked. The body is the record or list. |
| 201 | Created. The body is what was made. |
| 400 | The request didn't pass validation. details says which field. |
| 401 | No token, or a token that isn't valid: mistyped or revoked. |
| 403 | You may not do this: your role, a read-only token, an area tokens can't reach, or a plan that ended. |
| 404 | No such record, or one you may not see. The two read the same on purpose. |
| 429 | Too many requests. Wait for the number of seconds in Retry-After. |
| 500 | Something broke on Teamadoo's side. Try again; if it keeps happening, write to hello@teamadoo.com. |
Validation errors#
details mirrors the request body, with the problems listed under each field:
{
"error": "Too small: expected number to be >=5",
"details": {
"errors": [],
"properties": {
"durationMinutes": {
"errors": [
"Too small: expected number to be >=5"
]
}
}
}
}When a plan has ended#
A team or club whose trial or plan has ended turns read-only until someone subscribes. Requests that need more than that get a 403 whose details.code is plan_inactive:
{
"error": "This team's plan has ended, so it's read-only. The club or team owner can renew on teamadoo.com.",
"details": {
"code": "plan_inactive",
"state": "readonly",
"clubId": null,
"teamId": "8b1d3c52-4f7e-4a8b-9c21-5d6e7f8a9b10",
"canManageBilling": false,
"billingPath": null
}
}Rate limits#
Each token can make 120 requests a minute, across the REST API and the MCP server together. The minute starts with the first request; past the limit, the API answers 429 until it's over.
Retry-After (and details.retryAfterSeconds) says how many seconds to wait:
HTTP/1.1 429 Too Many Requests
Retry-After: 23
Content-Type: application/json
X-Teamadoo-API: v1
{
"error": "Too many requests. Wait a minute and try again.",
"details": {
"retryAfterSeconds": 23
}
}A small retry loop in JavaScript:
async function teamadoo(path, init = {}) {
for (let attempt = 0; attempt < 3; attempt++) {
const res = await fetch(`https://teamadoo.com/api/v1${path}`, {
...init,
headers: { Authorization: `Bearer ${process.env.TEAMADOO_TOKEN}`, ...init.headers },
});
if (res.status !== 429) return res;
// Wait as long as the API asks, then try again.
const seconds = Number(res.headers.get("Retry-After") ?? 60);
await new Promise((done) => setTimeout(done, seconds * 1000));
}
throw new Error("Still rate limited after 3 tries");
}429 for the rest of the hour.Messages in French#
Send Accept-Language: fr or X-Teamadoo-Locale: fr and error comes back in French. Status codes and details stay the same in both languages.
curl https://teamadoo.com/api/v1/me -H "Accept-Language: fr"{
"error": "Ce jeton d'API n'est pas valide. Il a peut-être été révoqué."
}