> For the complete documentation index, see [llms.txt](https://docs.spice.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spice.ai/api/management-api/management/organization-context.md).

# Organization context

A request acts on one organization. By default that is the organization the credential was minted against; send `X-Org-Name` with an organization handle to act on another. A user credential may name any organization its owner belongs to. A machine credential (OAuth client credentials) is issued to one organization and stays pinned to it: naming another is refused, never ignored.

Refusals carry a machine-readable `code` alongside `error`, because the remedies differ: `org_forbidden` means the caller is not a member of the named organization (ask an owner for an invitation), `forbidden` means they are a member but lack the role the action needs, `insufficient_scope` means the credential was not granted it, `org_assertion_mismatch` means a machine credential named an organization other than its own, `org_deleted` means the organization the credential itself is bound to has been deleted (no invitation or role reaches it again), and `invalid_org_assertion` (400) means the header was not a valid handle.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.spice.ai/api/management-api/management/organization-context.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
