X-Organization-Id header so Grain knows which church’s data to return.
Header format
How users get an organization ID
When a user signs in to Grain, they may belong to one or more churches. Your OAuth flow authorizes the user, not a specific organization. Your application chooses which organization to access per request.Finding the ID in the Grain app
- Sign in at app.grainledger.com
- Open the organization switcher (top of the sidebar)
- The organization ID is available in organization settings or from your Grain contact during API onboarding
If you are building a partner integration, the Grain team provides the organization ID when API access is approved. Request API access.
Multi-organization users
A single user can be a member of multiple churches (for example a bookkeeper serving several clients). Your application should:- Let the user pick which church to work with
- Send that organization’s ID in
X-Organization-Idon every request - Switch the header when the user changes churches
Example
Related
- Authentication for OAuth setup
- Errors for
400and403responses when the header is missing or invalid