Documentation Index
Fetch the complete documentation index at: https://mintlify.com/bitwarden/server/llms.txt
Use this file to discover all available pages before exploring further.
What is the Public API?
The Bitwarden Public API is designed for organization administrators to manage their organization programmatically. It provides endpoints for:- Managing organization members
- Organizing groups
- Configuring policies
- Bulk operations
The Public API is separate from the standard API and requires organization-scoped authentication.
Authentication
Public API endpoints use organization-scoped OAuth tokens with theOrganization policy:
Getting an API Key
- Navigate to Organization Settings
- Go to Settings > Organization Info
- Generate an API Key
- Use client_id and client_secret to obtain access tokens
OAuth Token Request
Response
Base URL
All Public API endpoints are prefixed with/public:
API Endpoints
Members
GET /public/members- List organization membersGET /public/members/{id}- Get member detailsPOST /public/members- Invite new memberPUT /public/members/{id}- Update memberDELETE /public/members/{id}- Remove member
Groups
GET /public/groups- List groupsGET /public/groups/{id}- Get group detailsPOST /public/groups- Create groupPUT /public/groups/{id}- Update groupDELETE /public/groups/{id}- Delete group
Policies
GET /public/policies- List policiesGET /public/policies/{id}- Get policy detailsPUT /public/policies/{id}- Update policy
Rate Limiting
The Public API implements rate limiting to ensure fair usage:- Rate: 100 requests per minute per organization
- Burst: Up to 20 requests in quick succession
Response Format
Success Response
Successful requests return JSON with the requested data:List Response
List endpoints return paginated data:Error Response
Errors return appropriate HTTP status codes with details:Common HTTP Status Codes
| Code | Meaning | Description |
|---|---|---|
| 200 | OK | Request successful |
| 201 | Created | Resource created |
| 400 | Bad Request | Invalid request data |
| 401 | Unauthorized | Invalid or missing token |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Resource doesn’t exist |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Server Error | Internal server error |
Best Practices
Authentication
- Rotate API keys regularly (every 90 days recommended)
- Store credentials securely - never commit to version control
- Use environment variables for API credentials
- Implement token caching - reuse tokens until expiration
Error Handling
Rate Limiting
- Implement exponential backoff for retries
- Cache responses when appropriate
- Batch operations where possible
- Monitor rate limit headers to avoid hitting limits
Use Cases
SCIM/Directory Sync
Automate user provisioning from your identity provider:Automated Onboarding
Invite new team members during onboarding:Compliance Reporting
Generate reports on organization membership:Next Steps
Members API
Manage organization members
Groups API
Organize users into groups
Policies API
Configure security policies