AngelSend API documentation
Complete reference for all API endpoints with code examples in cURL, JavaScript, and Python.
Authentication
AngelSend has three authentication patterns. Generate the relevant credentials from your Settings page.
01External integrations — /api-gateway/*
For partner apps, agents, and third-party tools (also /mcp-server and /agent-api). Send your sk_ key in the x-api-key header; Authorization: Bearer sk_… also works on these three routes. Never send an anon or user JWT to them.
x-api-key: sk_your_api_key_here02External 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_secret03First-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 as a Bearer token to a first-party endpoint (only /api-gateway, /mcp-server and /agent-api accept it there). | 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. |
| 503 Temporarily unable to verify the API key | AngelSend couldn't reach its database to check the key. It says nothing about the key itself. | Retry after the Retry-After seconds, with backoff. Don't discard or rotate the key — only a 401 means it's bad. |
Base URL
https://invazkujqgdgpkpsingh.supabase.co/functions/v1Authentication
1 endpointAgent Chat (Agent-as-API)
1 endpointExternal API Gateway
12 endpointsContacts & Leads
12 endpointsEmail Campaigns
11 endpointsLinkedIn Outreach
3 endpointsVoice Agents
12 endpointsAI Chat Widget
6 endpointsBooking & Calendar
5 endpointsCalendar Slotting
2 endpointsSlack Integration
1 endpointSalesforce / HubSpot Sync
2 endpointsOutbound Webhooks
9 endpointsDeals (Pipeline)
5 endpointsAccounts (Companies)
4 endpointsSegments
2 endpointsTags, Comments & Attachments
3 endpointsCompliance
6 endpointsBackground Jobs
2 endpointsCRM Integrations
9 endpointsAI & Reply Handling
5 endpointsScraping & Automation
4 endpointsAnalytics
1 endpointCredits
4 endpointsExternal App OAuth
16 endpointsPartner Email (External Apps)
5 endpointsOAuth Provider System
6 endpointsEmbed Forms
2 endpointsContact Intelligence
6 endpointsMarket Intelligence
1 endpointQuality & Advisory
4 endpointsCampaign Authoring
16 endpointsPer-Recipient Campaign Controls
6 endpointsSender Limits & Warm-up
2 endpointsMessaging & Knowledge Base
8 endpointsInbox
4 endpointsIntent Signals
2 endpointsContact Form Outreach
2 endpointsIntercom Widget Management
16 endpointsReporting & Metrics
7 endpointsCampaign & Contact Records
8 endpointsReview Queue & Support
6 endpointsPlatform State & Automation
13 endpointsIssuer Funnel
11 endpointsRate Limits
- Default: 1000 requests per hour per API key
- Burst: 100 requests per minute
- Rate limit headers are included in all responses
Error Codes
- 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
- 503
- Service Unavailable - Temporary; retry after
Retry-After. Your key is still valid