ORGANIZATION_MISMATCH
A machine token belongs to exactly one organization, and the request named another one in X-Organization-ID.
Typical cause
Code written for a person's token, which names its organization in every request, now runs with an API credential that already belongs to one.
Fix
Leave the header out for machine tokens, or send the credential's own organization.
Where it comes from
Any operation can answer it (HTTP 403).
Related
{
"error": {
"code": "ORGANIZATION_MISMATCH",
"message": "…",
"request_id": "req_01JB4Z0K3Q7V8W9X0Y1Z2A3B4C",
"doc_url": "https://developers.tracken.ee/errors/ORGANIZATION_MISMATCH"
}
}code, never on message, which is developer-facing English and may change. Field problems are in details, each with a JSON Pointer; the figures for your own text are in context. Quote request_id when you contact support.tracken contacts list …
# exits 5 and prints the code, the message, each field problem and the request idimport { isApiError } from "@tracken/sdk";
try {
await tracken.contacts.list(…);
} catch (error) {
if (!isApiError(error, "ORGANIZATION_MISMATCH")) throw error;
// Leave the header out for machine tokens, or send the credential's own organization.
}