Programmatic Access to Everything
Middlewr’s API gives you full programmatic control over links, rules, domains, analytics, and team management. Create automated links, define rule graphs, and retrieve per-branch analytics — all via API.Two Types of API Keys
User API Keys
Scoped to your user account. Access all workspaces your account belongs to with the same permissions you have in the dashboard.
Workspace API Keys
Scoped to a specific workspace. Ideal for integrations, CI/CD pipelines, and third-party tools that should only access one workspace.
User API Keys
User API keys are tied to your personal account and inherit your permissions across all workspaces.1
Navigate to account settings
Go to Account Settings > API Keys in the dashboard.
2
Generate a new key
Click Create API Key, give it a descriptive name, and copy the key immediately.
3
Use Bearer authentication
Include the key in the
Authorization header: Bearer your-api-key.User API keys are shown only once at creation. Store them securely — you cannot retrieve the key value after leaving the creation page.
Workspace API Keys
Workspace API keys are scoped to a single workspace, providing isolation and security for integrations.1
Navigate to workspace settings
Go to Workspace Settings > API Keys in the dashboard.
2
Generate a new key
Click Create API Key, give it a descriptive name, and copy the key immediately.
3
Use Bearer authentication
Include the key in the
Authorization header: Bearer your-api-key.Authentication
Both key types use Bearer token authentication:Webhooks
Middlewr supports real-time event notifications via webhooks. Receive HTTP POST requests to your endpoint whenever key events occur:- Click events — Notified when a link receives a click (includes rule destination data)
- Conversion events — Notified when a tracked conversion occurs
- Link lifecycle — Notified when links are created, updated, or archived
Webhook payloads include a signature header for verification. Always validate the signature before processing events to ensure authenticity.
Next Steps
API Reference
Explore the full API documentation with request and response schemas.
Authentication
Learn more about authentication methods and best practices.