{
  "type": "https://errors.swepay.com.br/accounting-ops/tenant-context-required",
  "service": "accounting-ops",
  "slug": "tenant-context-required",
  "httpStatus": 403,
  "title": "Tenant Context Required",
  "summary": "The access token carries no tenant; a tenant must be selected before calling tenant-scoped endpoints.",
  "description": "Returned when a tenant-scoped endpoint is called with an access token that\nhas no tenant context attached. Almost every endpoint of this API operates\non data scoped to one tenant, so it requires a token that already carries\nwhich tenant the caller is acting on — not merely proof of who the caller is.\n\nThis is different from [Tenant Mismatch](/accounting-ops/tenant-mismatch):\nhere there is no tenant on the token at all, so there is nothing to compare\nthe request against.\n",
  "commonCauses": [
    "The access token came straight from sign-in, before a tenant was selected.",
    "The caller reused a token issued for a different product or audience.",
    "A raw identity token was sent instead of the tenant-scoped token returned by tenant selection."
  ],
  "clientAction": "List the tenants the caller belongs to with `GET /me/tenants`, then exchange\nthe identity token for a tenant-scoped one with\n`POST /me/tenants/{id}/select`. Use the token returned by that call — not the\noriginal one — as the `Authorization` header on every tenant-scoped request.\nRetrying with the same tenant-less token will keep returning `403`.\n",
  "exampleResponse": {
    "type": "https://errors.swepay.com.br/accounting-ops/tenant-context-required",
    "title": "Tenant Context Required",
    "status": 403,
    "detail": "The access token carries no tenant; select a tenant first.",
    "instance": "/v1/tenant"
  },
  "relatedDocs": [
    {
      "label": "RFC 9457 — Problem Details",
      "url": "https://www.rfc-editor.org/rfc/rfc9457"
    }
  ],
  "category": "service",
  "deprecated": false,
  "documentation": "https://errors.swepay.com.br/accounting-ops/tenant-context-required"
}