Authentication
AngelSend has three authentication patterns. Generate the relevant credentials from your Settings page.
1. External integrations — /api-gateway/*
For partner apps, agents, and third-party tools. Use only the x-api-key header. Do NOT include an Authorization header or anon JWT.
x-api-key: sk_live_your_api_key_here2. External OAuth app endpoints
Endpoints like external-calendar-api/* are for apps you register in Settings → External Apps. Use the app's client_secret in the x-api-key header. General sk_ project API keys do not work on these routes.
x-api-key: secret_your_external_app_client_secret3. First-party / logged-in user endpoints
All other endpoints require a Supabase user JWT (Bearer token) — typically obtained automatically via the AngelSend client SDK when a user is signed in.
Authorization: Bearer <user_jwt>Which one do I use? If the endpoint path starts with /api-gateway/, use x-api-key. Everything else uses a Bearer JWT. If it starts with /external-calendar-api/, use the External App client_secret in x-api-key. Endpoints like cred-api are internal-only and cannot be called with an sk_ key — use /api-gateway/get-credit-balance instead for external balance reads.
Auth Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| 401 Missing authorization header | Calling a first-party endpoint without a Bearer JWT. | Add Authorization: Bearer <user_jwt>, or switch to the /api-gateway/* equivalent. |
| 401 invalid JWT … invalid number of segments | Passing your sk_ key in the Authorization header. | Move sk_ to x-api-key and target an /api-gateway/* route. |
| 401 invalid claim: missing sub claim | Calling an internal user-scoped endpoint (e.g. cred-api) without a real user session. | Use the external equivalent, e.g. /api-gateway/get-credit-balance. |
| 401 Invalid API key | Wrong key type, revoked key, mistyped key, or a key from a different AngelSend workspace/environment. | For /api-gateway/*, use your sk_ project API key. For external-calendar-api/*, use the registered External App client_secret from Settings → External Apps. |
Base URL
https://invazkujqgdgpkpsingh.supabase.co/functions/v1Authentication
Agent Chat (Agent-as-API)
External API Gateway
Contacts & Leads
Email Campaigns
LinkedIn Outreach
Voice Agents
AI Chat Widget
Booking & Calendar
Calendar Slotting
Slack Integration
Salesforce / HubSpot Sync
Outbound Webhooks
Deals (Pipeline)
Accounts (Companies)
Segments
Tags, Comments & Attachments
Compliance
Background Jobs
CRM Integrations
AI & Reply Handling
Scraping & Automation
Analytics
Credits
External App OAuth
Partner Email (External Apps)
OAuth Provider System
Embed Forms
Contact Intelligence
Quality & Advisory
Campaign Authoring
Per-Recipient Campaign Controls
Sender Limits & Warm-up
Messaging & Knowledge Base
Inbox
Intent Signals
Contact Form Outreach
Intercom Widget Management
Reporting & Metrics
Campaign & Contact Records
Review Queue & Support
Platform State & Automation
Issuer Funnel
Rate Limits
- Default: 1000 requests per hour per API key
- Burst: 100 requests per minute
- Rate limit headers are included in all responses
Error Codes
| Code | Description |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 402 | Payment Required - Insufficient credits |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |