Overview
The Notra API uses Unkey for authentication and authorization. All requests to/v1/* endpoints require a valid API key sent via the Authorization header using Bearer authentication.
Authentication Method
Notra uses Bearer token authentication with the following format:Generating an API Key
To generate an API key for your organization:- Log in to your Notra dashboard
- Navigate to Settings > API Keys
- Click Create New API Key
- Provide a descriptive name for the key
- Copy and securely store your API key
API keys are only displayed once during creation. If you lose your key, you’ll need to generate a new one.
Making Authenticated Requests
Include your API key in theAuthorization header of every request:
Permissions
API keys are scoped with specific permissions. The Notra API currently requires the following permission:Required for all read operations on content endpoints. This permission allows you to list and retrieve posts for your organization.
403 Forbidden response:
Organization Scope
API keys are tied to a specific organization via theexternalId identity field. When making requests:
- The
{organizationId}in the URL path must match your key’s organization - Attempts to access other organizations will result in a
403 Forbiddenerror
Each API key can only access content for its associated organization. This ensures data isolation and security.
Error Responses
The API returns specific error codes for authentication issues:401 Unauthorized - Missing API Key
Authorization header is not provided.
401 Unauthorized - Invalid API Key
403 Forbidden - Insufficient Permissions
403 Forbidden - Organization Access Denied
503 Service Unavailable
Best Practices
Store Keys Securely
Always use environment variables or secret management services:.env
Rotate Keys Regularly
For enhanced security:- Generate a new API key
- Update your applications to use the new key
- Delete the old key once migration is complete
Use Separate Keys for Different Environments
Create dedicated API keys for:- Development
- Staging
- Production
Handle Authentication Errors Gracefully
Implement proper error handling in your application:Next Steps
Rate Limits
Learn about API rate limits and quotas
API Reference
Explore available endpoints