Authentication
Authenticate requests to the Monolith API using an API key in the X-API-KEY request header.
Monolith API requests are authenticated using an API key.
API keys can be created and managed from Settings > API in Monolith.
API Key Authentication
Include your API key in the following HTTP request header with each authenticated request:
X-API-KEY: your_api_keyThe X-API-KEY header must contain a valid Monolith API key.
Treat API keys as sensitive credentials. Do not share them publicly, include them directly in source code, or store them in locations where they may be exposed.
Create an API Key
To create an API key:
Open Settings in Monolith.
Select API.
Select New API Key.
Create the API key for the application, integration, script, or other approved workflow that will use it.
API keys can also be managed or revoked from the same page.
See API for more information about API key and Webhook management.
Example API Request
The following Python example uses the Info API to verify that the API endpoint and API key are working correctly.
Replace the example API key and base URL with the values for your environment.
Use the API base URL for the Monolith environment where your tenant is hosted.
See API Endpoints for cloud-region and on-premises endpoint guidance.
Verify API Access
A request to the Info endpoint provides a simple way to confirm that authentication is working:
A successful request returns basic information about the authenticated Monolith user and tenant.
See Info API for the documented response structure.
Authentication Errors
If an API request is unsuccessful, verify that:
The
X-API-KEYheader is included.The API key is valid and has not been revoked.
The request is being sent to the correct Monolith environment.
The endpoint path and HTTP method are correct.
Testing GET /api/v1/info can help separate an authentication or endpoint problem from an issue with a specific API resource.
Related Documentation
Last updated
Was this helpful?