Overview
Userorbit API uses two authentication methods depending on the endpoint type:- API Key Authentication - For team/admin operations and Zapier integrations
- Subscriber JWT Authentication - For public widget and subscriber-specific operations
API Key Authentication
Getting Your API Key
- Log into your Userorbit dashboard
- Navigate to Settings → API Keys
- Click Create New API Key
- Copy the generated key (you won’t be able to see it again)
- Store it securely (never commit to version control)
Using API Keys
Include your API key in theAuthorization header using Bearer authentication:
API Key Format
API keys follow this format:API Key Permissions
Each API key is tied to:- A specific team (all operations are scoped to this team)
- A user (for audit logging)
- Permissions inherited from the user’s role
Best Practices
- Store keys in environment variables
- Use separate keys for development and production
- Rotate keys regularly (every 90 days recommended)
- Delete unused keys immediately
- Monitor API key usage in your dashboard
Subscriber JWT Authentication
Overview
Public/widget APIs require subscriber authentication to identify end-users and track their activity.Getting a JWT Token
First, identify the subscriber using thesubscriber.identify endpoint:
Using JWT Tokens
Use the JWT token for subsequent subscriber operations:JWT Token Lifespan
- Tokens expire after 90 days
- Automatically refreshed on widget initialization
- Store securely in cookies or local storage (for web)
Subscriber Authentication Flow
Dual Authentication
Some endpoints support both authentication methods:Error Responses
Invalid API Key
Expired JWT
Missing Authorization
Testing Authentication
Test your API key:Revoking Access
Revoke API Keys
- Go to Settings → API Keys
- Find the key to revoke
- Click Delete
- Confirm deletion
Invalidate JWT Tokens
Subscriber JWT tokens are automatically invalidated when:- The subscriber is deleted
- The team is deleted
- 90 days have passed since issuance
Security Considerations
Use HTTPS Only
Always make API requests over HTTPS to prevent key interception
Rotate Keys
Regularly rotate API keys (every 90 days recommended)
Least Privilege
Create separate keys with minimal permissions for each use case
Monitor Usage
Track API key usage and set up alerts for unusual activity
Next Steps
- Quickstart Guide - Make your first API call
- Zapier Integration - Set up webhooks
- Public APIs - Build embedded widgets

