Keys, scopes, limits and errors
Create a key in the dashboard under Integrations, API keys, and send it as Authorization: Bearer bl_live_.... It is shown once and only a fingerprint is kept. A key reaches one workspace and nothing else, holds only the scopes chosen for it, and works only while the person who made it is still in the workspace with a role allowed to do what it asks.
Each key may make 600 requests a minute. Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; past the limit the answer is 429 with Retry-After. Every error has the same shape, with a request id to quote to us:
{ "error": { "code": "missing_scope", "message": "This key does not have the members:read scope.", "request_id": "req_..." } }Scopes: analytics:read, members:read, members:email (emails are never returned without it), campaigns:manage, suppression:manage and events:send. Discord tells nobody when a message is read, so there is no open rate anywhere in the API.
GET/v1/members/v1/members
List members
Members of the workspace's server with their consent, newest first, a page at a time.
Scope: members:read
Parameters| Parameter | In | Notes |
|---|
limit | query | optional |
cursor | query | optional. next_cursor from the previous page. |
opted_in | query | optional |
Example request
curl -X GET "https://api.botlunar.com/v1/members" \
-H "Authorization: Bearer bl_live_..."
Example answer
{
"data": [
{
"id": "cm1abc",
"discord_id": "123456789012345678",
"username": "trader",
"consent": {
"opted_in": true,
"basis": "MEMBER_CONFIRMED",
"opted_in_at": "2026-10-01T09:00:00Z",
"unsubscribed_at": null,
"email_opted_in": false
}
}
],
"next_cursor": null
}200 A page of members.400 The request was not understood. The error says which field.401 No key, or a key that is wrong or revoked.403 The key does not have the scope this needs.404 Nothing with that id in this workspace.429 Too many requests for this key. Wait for the number of seconds in Retry-After.
POST/v1/suppression/v1/suppression
Add to the suppression list
Discord ids, usernames or emails. A listed member is never messaged, whatever the audience.
Scope: suppression:manage
Example request
curl -X POST "https://api.botlunar.com/v1/suppression" \
-H "Authorization: Bearer bl_live_..." \
-H "Content-Type: application/json" \
-d '{"entries":["123456789012345678","someone@example.com"]}'200 What was added.400 The request was not understood. The error says which field.401 No key, or a key that is wrong or revoked.403 The key does not have the scope this needs.404 Nothing with that id in this workspace.429 Too many requests for this key. Wait for the number of seconds in Retry-After.