Organization IDs
TheX-External-Org-Id header identifies which of your client organizations a request belongs to. This is the foundation of DocBit AI’s multi-tenant isolation.
What is an Organization ID?
An organization ID is a string you provide that uniquely identifies one of your clients. Each organization gets:- Isolated document storage - Documents are completely separate between orgs
- Separate user accounts - The same user ID in different orgs are different users
- Independent conversation history - Chat history doesn’t cross org boundaries
- Separate usage tracking - Billing and analytics per organization
How It Works
With a single API key, you can serve multiple client organizations. TheX-External-Org-Id header determines which tenant’s data is accessed.
Choosing Organization IDs
Use identifiers that are:- Unique - Each client needs a distinct ID
- Stable - Don’t change IDs after creation (user data would be orphaned)
- Meaningful - Easy for you to map back to your clients
Good Examples
| Your System | Organization ID |
|---|---|
| Database ID | org_12345 |
| Slug | acme-corp |
| Domain | acme.com |
| UUID | 550e8400-e29b-41d4-a716-446655440000 |
Bad Examples
| Don’t Use | Why |
|---|---|
| User’s name | Not unique, can change |
| Can change, may not be unique to org | |
| Incrementing number | Easy to guess, enumerate |
One API Key, Multiple Organizations
Your single partner API key can access all your client organizations:Organization Lifecycle
Creating Organizations
Organizations are created implicitly on first use. When you send a request with a newX-External-Org-Id, the organization is automatically created.
Data Isolation
Documents uploaded to one organization are never visible to another:Best Practices
Use your existing customer identifiers
Use your existing customer identifiers
Map org IDs to your existing customer/tenant IDs for easy correlation.
Don't expose org IDs to end users
Don't expose org IDs to end users
Org IDs are internal identifiers. Users don’t need to see them.
Validate org IDs server-side
Validate org IDs server-side
Ensure users can only access organizations they belong to in your system.
Plan for organization migration
Plan for organization migration
If you ever need to rename or merge organizations, contact support.