SendMQ documentation
Enqueue background HTTP jobs, deliver signed webhooks, and run requests on a schedule.
Send and inspect your first job
Create an API key
Sign in to the SendMQ Console as a workspace owner or admin. Open API Keys and select Generate Key. The console key includes
jobs:writeandjobs:read. Save the displayed key in your environment.Shellexport SENDMQ_API_URL='https://sendmq.com' export SENDMQ_API_KEY='YOUR_SENDMQ_API_KEY'For a local Go API, set
SENDMQ_API_URL=http://localhost:8080.Enqueue an HTTP job
Replace the destination URL with an HTTPS endpoint you control that accepts this request and returns
2xxon success.cURLcurl -i "$SENDMQ_API_URL/v1/jobs" \ -H "Authorization: Bearer $SENDMQ_API_KEY" \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: order-123' \ -d '{ "url": "https://api.yourapp.com/webhooks/fulfill", "method": "POST", "body": {"order_id": "ord_8492"}, "retry": {"max_attempts": 5} }'The API returns
202 Acceptedafter enqueueing. Save theidto inspect the job after the worker runs.Example JSON response{ "id": "job_123", "queue": "default", "status": "pending", "scheduled_at": "2026-11-25T08:00:00Z", "status_url": "https://sendmq.com/v1/jobs/job_123", "delivery_id": "dlv_123" }Check status and attempts
Check for
succeededor inspect the HTTP status, latency, and error for each attempt. You can also open Jobs in the console.cURL# Replace with the id from your enqueue response. JOB_ID=job_123 curl -sS "$SENDMQ_API_URL/v1/jobs/$JOB_ID" \ -H "Authorization: Bearer $SENDMQ_API_KEY" curl -sS "$SENDMQ_API_URL/v1/jobs/$JOB_ID/attempts" \ -H "Authorization: Bearer $SENDMQ_API_KEY"
Authentication
For server integrations, send your key as Authorization: Bearer <key> or X-API-Key: <key>. Keep keys server-side and grant the scopes listed for the operations you call.
The console uses an HTTP-only session cookie from sign-in. Cookie-authenticated changes are subject to origin checks. Owners and admins can manage the workspace, developers can run integrations, and viewers can use read scopes.
Retries and idempotency
- 2xx marks the delivery successful.
- 408, 429, 5xx, and connection errors or timeouts trigger retries up to the configured attempt limit. Backoff is exponential with jitter and respects the destination’s
Retry-Afterwithin the configured cap. - 3xx, other 4xx, and blocked destinations fail without retry. SendMQ does not follow redirects.
Send Idempotency-Key on job creation or webhook publishing to retry an API request safely. An identical enqueue request returns the original job with Idempotency-Replayed: true. Webhook requests deduplicate per endpoint. A conflicting request for an existing key returns 409 IDEMPOTENCY_CONFLICT. A change to the job’s queue or effective retry policy also conflicts.
Outbound attempts include X-SendMQ-Job-Id, X-SendMQ-Delivery-Id, and X-SendMQ-Attempt. Delivery is at least once and unordered. Record the stable delivery ID alongside processing and return 2xx for duplicates you already processed.
Verify webhook signatures
Read X-SendMQ-Signature in the form t=<unix-seconds>,v1=<hex>. Compute HMAC-SHA256 over <timestamp>.<raw body> with the full whsec_ signing secret. Verify against the original bytes before parsing the JSON, compare in constant time, and reject timestamps outside a five-minute window.
Webhook requests also include X-SendMQ-Timestamp, X-SendMQ-Webhook-Id, and X-SendMQ-Event-Type. After signature verification, deduplicate with X-SendMQ-Delivery-Id. Deliveries can arrive out of order, so use a producer-supplied version for updates to the same resource.
const crypto = require("node:crypto");
function verifySendMQSignature(secret, header, rawBody) {
if (typeof header !== "string" || !Buffer.isBuffer(rawBody)) return false;
const parts = Object.fromEntries(
header.split(",").filter((p) => p.includes("=")).map((p) => {
const i = p.indexOf("=");
return [p.slice(0, i).trim(), p.slice(i + 1).trim()];
})
);
if (!/^\d+$/.test(parts.t) || !/^[0-9a-f]{64}$/i.test(parts.v1)) return false;
const timestamp = Number(parts.t);
if (!Number.isSafeInteger(timestamp)) return false;
if (Math.abs(Date.now() / 1000 - timestamp) > 300) return false; // 5-min window
const expected = crypto
.createHmac("sha256", secret)
.update(`${parts.t}.`)
.update(rawBody)
.digest("hex");
const a = Buffer.from(expected, "hex");
const b = Buffer.from(parts.v1, "hex");
return a.length === b.length && crypto.timingSafeEqual(a, b);
}Errors and limits
API errors include error.code, error.message, and error.request_id. Keep the request ID when investigating a failure.
- 400 · Invalid request
- Check required fields and types. Strict JSON endpoints reject unknown fields.
- 401 / 403 · Access denied
- Check the key or session, its scope, and the active workspace.
- 402 · Quota or plan limit
- Check usage and resource limits in Billing.
- 409 · Conflict
- Check the idempotency key or the resource’s current state before retrying.
- 429 · Rate limited
- Back off before retrying your API request.
Outbound security
Production destinations require HTTPS on port 443. SendMQ blocks private, loopback, link-local, and metadata addresses, and checks the destination again at connection time. Outbound payloads, custom headers, and webhook secrets are encrypted at rest. Workspaces have separate rate and concurrency limits.
API reference
Download OpenAPIJobs
Use status and type to filter jobs. For the next page, pass next_cursor from the response as ?before=. Cancel a pending or retrying job. Manually retry a failed or canceled job. For a scheduled agent action, send run_at, agent_action, and an Idempotency-Key to POST /v1/jobs. The action_id is the job ID. Filter actions by ticket_id or agent_run_id. On a successful response, the destination can report sent or skipped in X-SendMQ-Action-Outcome. See the follow-up example.
get/v1/jobsList tenant jobs (newest first, cursor paginated)
Access jobs:read
Parameters
statusquery · string- Values pending, processing, retrying, succeeded, failed, canceled
typequery · string- Values http_job, webhook_delivery
agent_actionsquery · boolean- Include only agent actions when true.
agent_run_idquery · string- Exact agent run reference.
ticket_idquery · string- Exact ticket reference.
beforequery · string- RFC3339 cursor (`next_cursor` from the previous page)
limitquery · integer
Responses
200Job list plus `next_cursor`Response fields
jobsarray of objectqueuestringidstringtenant_idstringtypestringstatusstringValues pending, processing, retrying, succeeded, failed, canceled
target_urlstringhttp_methodstringscheduled_atstring · date-timenext_attempt_atstring · date-timeattempt_countintegermax_attemptsintegerdelivery_idstringidempotency_keystringagent_actionobjectlast_errorstringcreated_atstring · date-timeupdated_atstring · date-timecompleted_atstring or null
next_cursorstringSupply this value as before for the next page. An empty string marks the end.
post/v1/jobsCreate an HTTP background job
Access jobs:write
For a scheduled agent action, provide run_at, agent_action, and an Idempotency-Key. A retry with the same request returns the original action even after its scheduled time.
Parameters
Idempotency-Keyheader · string
JSON body (required)
queuestringLogical queue name recorded on the job.
Default
defaulturlstring · uri · requiredmethodstringValues GET, POST, PUT, PATCH, DELETE, HEAD
Default
POSTheadersobjectbodyJSONArbitrary JSON payload or string body.
delay_secondsintegerRelative delay for ordinary jobs. Leave unset or zero for agent actions.
Default
0run_atstring · date-timeRequired alongside agent_action. An absolute time in the next 30 days, with millisecond precision or coarser.
agent_actionobjectagent_run_idstring · requiredNonempty agent run reference of at most 128 UTF-8 bytes.
ticket_idstring · requiredNonempty ticket reference of at most 128 UTF-8 bytes.
retryobjectmax_attemptsintegerCapped by the tenant's `limits.max_attempts` (10 for standard tenants).
Default
5initial_backoff_msintegerDefault
1000max_backoff_msintegerDefault
300000
Responses
202Job accepted for asynchronous executionResponse fields
queuestringidstringstatusstringValues pending, processing, retrying, succeeded, failed, canceled
scheduled_atstring · date-timestatus_urlstringaction_idstringPresent for agent actions and equal to the job ID.
delivery_idstring
400Validation error401Unauthorized402Monthly message quota exceeded409Idempotency key reused with a different request, including queue or retry policy429Tenant rate limit exceeded
get/v1/jobs/{id}Get job status and metadata
Access jobs:read
Parameters
idpath · string · required
Responses
200Job detailsResponse fields
queuestringidstringtenant_idstringtypestringstatusstringValues pending, processing, retrying, succeeded, failed, canceled
target_urlstringhttp_methodstringscheduled_atstring · date-timenext_attempt_atstring · date-timeattempt_countintegermax_attemptsintegerdelivery_idstringidempotency_keystringagent_actionobjectagent_run_idstring · requiredticket_idstring · requiredoutcomestringBusiness result reported by the destination on successful HTTP delivery.
Values sent, skipped
reasonstringValues customer_replied, ticket_closed, no_longer_needed
last_errorstringcreated_atstring · date-timeupdated_atstring · date-timecompleted_atstring or null
404Job not found
get/v1/jobs/{id}/attemptsList delivery attempts for a job
Access jobs:read
Parameters
idpath · string · required
Responses
200Delivery attempt historyResponse fields
attemptsarray of objectidstringjob_idstringattempt_numberintegerstarted_atstring · date-timefinished_atstring · date-timehttp_statusintegerduration_msintegererror_codestringerror_messagestringresponse_excerptstringAllowlisted JSON status fields, available with workspace opt-in for up to 24 hours.
post/v1/jobs/{id}/cancelCancel a pending or retrying job
Access jobs:write
Parameters
idpath · string · required
Responses
200Job canceled409Invalid state transition
post/v1/jobs/{id}/retryManually retry a failed or canceled job
Access jobs:write
Parameters
idpath · string · required
Responses
202Job re-queued for execution409Invalid state transition
Queues
Set queue when creating a job to assign its logical queue. SendMQ uses default when the field is omitted. The workspace plan controls how many named queues you can create.
get/v1/queuesList logical queues and the workspace plan limit
Access jobs:read
Responses
200Configured queues and maximum queue countResponse fields
queuesarray of objectidstringtenant_idstringnamestringdescriptionstringpausedbooleancreated_atstring · date-timeupdated_atstring · date-time
max_queuesintegerZero means unlimited
post/v1/queuesCreate a logical queue
Access jobs:write
JSON body (required)
namestring · requireddescriptionstring
Responses
201Queue createdResponse fields
idstringtenant_idstringnamestringdescriptionstringpausedbooleancreated_atstring · date-timeupdated_atstring · date-time
400Invalid name or JSON402Plan queue limit reached409A queue with this name already exists
delete/v1/queues/{name}Delete a named queue
Access jobs:write
Parameters
namepath · string · required
Responses
204Queue deleted400The default queue cannot be deleted404Queue not found
Webhooks
Create an endpoint and store its signing_secret. Enabled endpoints match exact event types, *, or an empty filter. Send endpoint_ids to target specific enabled endpoints. Inspect and replay using the delivery job id. Rotate a secret with {"rotate_secret":true}. Verify signatures on your receiver.
curl -i "$SENDMQ_API_URL/v1/webhook-endpoints" \
-H "Authorization: Bearer $SENDMQ_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"url":"https://api.yourapp.com/webhooks/sendmq","event_types":["order.created"]}'
curl -i "$SENDMQ_API_URL/v1/webhooks/deliver" \
-H "Authorization: Bearer $SENDMQ_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: order-created-8492' \
-d '{"event_type":"order.created","payload":{"order_id":"ord_8492"}}'get/v1/webhook-endpointsList tenant webhook endpoints (signing secrets omitted)
Access webhooks:read
Responses
200List of webhook endpointsResponse fields
endpointsarray of objectidstringtenant_idstringurlstringenabledbooleanevent_typesarray of stringsigning_secretstringPresent only in the create and secret-rotation responses (`whsec_...`).
created_atstring · date-timeupdated_atstring · date-time
post/v1/webhook-endpointsCreate a webhook endpoint (returns raw HMAC signing secret once)
Access webhooks:write
JSON body (required)
urlstring · uri · requiredenabledbooleanDefault
trueevent_typesarray of stringExact event types to match; `*` wildcard is supported.
Responses
201Webhook endpoint createdResponse fields
idstringtenant_idstringurlstringenabledbooleanevent_typesarray of stringsigning_secretstringPresent only in the create and secret-rotation responses (`whsec_...`).
created_atstring · date-timeupdated_atstring · date-time
400Validation or SSRF policy error
patch/v1/webhook-endpoints/{id}Update webhook endpoint URL, enabled flag, event_types, or rotate signing secret
Access webhooks:write
Parameters
idpath · string · required
JSON body (required)
urlstring · urienabledbooleanevent_typesarray of stringrotate_secretbooleanWhen true, generates and returns a new signing secret.
Responses
200Webhook endpoint updatedResponse fields
idstringtenant_idstringurlstringenabledbooleanevent_typesarray of stringsigning_secretstringPresent only in the create and secret-rotation responses (`whsec_...`).
created_atstring · date-timeupdated_atstring · date-time
404Webhook endpoint not found
delete/v1/webhook-endpoints/{id}Delete a webhook endpoint
Access webhooks:write
Parameters
idpath · string · required
Responses
204Webhook endpoint deleted404Webhook endpoint not found
post/v1/webhooks/deliverFan-out a webhook event to matching enabled endpoints with HMAC-SHA256 signing
Access webhooks:write
Parameters
Idempotency-Keyheader · string
JSON body (required)
event_typestring · requiredpayloadJSON · requiredArbitrary JSON payload delivered to matching endpoints.
endpoint_idsarray of stringRestrict fan-out to these endpoints.
retryobjectmax_attemptsintegerCapped by the tenant's `limits.max_attempts` (10 for standard tenants).
Default
5initial_backoff_msintegerDefault
1000max_backoff_msintegerDefault
300000
Responses
202Webhook deliveries enqueuedResponse fields
event_idstringevent_typestringdeliveriesarray of objectidstringJob ID used for inspect and replay calls
delivery_idstringStable deduplication ID for attempts
endpoint_idstringstatusstringstatus_urlstring
402Monthly message quota exceeded409Idempotency key already used for this endpoint422No enabled endpoints matched event_type
get/v1/webhook-deliveries/{id}Inspect webhook delivery status and attempt history
Access webhooks:read
Parameters
idpath · string · required
Responses
200Delivery metadata and attempt historyResponse fields
jobobjectqueuestringidstringtenant_idstringtypestringstatusstringValues pending, processing, retrying, succeeded, failed, canceled
target_urlstringhttp_methodstringscheduled_atstring · date-timenext_attempt_atstring · date-timeattempt_countintegermax_attemptsintegerdelivery_idstringidempotency_keystringagent_actionobjectlast_errorstringcreated_atstring · date-timeupdated_atstring · date-timecompleted_atstring or null
attemptsarray of objectidstringjob_idstringattempt_numberintegerstarted_atstring · date-timefinished_atstring · date-timehttp_statusintegerduration_msintegererror_codestringerror_messagestringresponse_excerptstringAllowlisted JSON status fields, available with workspace opt-in for up to 24 hours.
404Delivery not found
post/v1/webhook-deliveries/{id}/replayManually replay a webhook delivery
Access webhooks:write
Failed and canceled deliveries retain their delivery ID. Replaying a successful delivery creates a new job with a fresh delivery ID. The endpoint must be enabled.
Parameters
idpath · string · required
Responses
202Webhook delivery replayedResponse fields
queuestringidstringtenant_idstringtypestringstatusstringValues pending, processing, retrying, succeeded, failed, canceled
target_urlstringhttp_methodstringscheduled_atstring · date-timenext_attempt_atstring · date-timeattempt_countintegermax_attemptsintegerdelivery_idstringidempotency_keystringagent_actionobjectagent_run_idstring · requiredticket_idstring · requiredoutcomestringBusiness result reported by the destination on successful HTTP delivery.
Values sent, skipped
reasonstringValues customer_replied, ticket_closed, no_longer_needed
last_errorstringcreated_atstring · date-timeupdated_atstring · date-timecompleted_atstring or null
402Monthly message quota exceeded404Delivery not found409Delivery status does not allow replay422Target endpoint is disabled or deleted
Schedules
Use one_time for RFC3339 or at(...) expressions and cron for cron(...) or rate(...). Set an IANA time zone such as Asia/Jakarta. Update status to paused or active to pause or resume. Check the schedule response for synchronization status.
curl -i "$SENDMQ_API_URL/v1/schedules" \
-H "Authorization: Bearer $SENDMQ_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"schedule_type": "cron",
"expression": "cron(0 9 * * ? *)",
"timezone": "Asia/Jakarta",
"url": "https://api.yourapp.com/daily-report",
"method": "POST"
}'get/v1/schedulesList tenant schedules
Access schedules:read
Responses
200List of schedulesResponse fields
schedulesarray of objectidstringtenant_idstringschedule_typestringValues one_time, cron
expressionstringtimezonestringtarget_urlstringhttp_methodstringpayload_size_bytesintegerretry_policyobjectaws_schedule_idstringstatusstringValues active, paused, canceled
sync_statusstringValues pending_sync, synced, pending_delete, deleted, sync_error
sync_errorstringlast_synced_atstring · date-timecreated_atstring · date-timeupdated_atstring · date-time
post/v1/schedulesCreate a one-time, cron, or rate schedule
Access schedules:write
JSON body (required)
schedule_typestring · requiredValues one_time, cron
expressionstring · requiredRFC3339 or `at(...)` for `one_time`; `cron(...)` or `rate(...)` for `cron`.
timezonestringIANA timezone; invalid values are rejected.
urlstring · uri · requiredmethodstringValues GET, POST, PUT, PATCH, DELETE, HEAD
Default
POSTheadersobjectbodyJSONArbitrary JSON payload or string body.
retryobjectmax_attemptsintegerCapped by the tenant's `limits.max_attempts` (10 for standard tenants).
Default
5initial_backoff_msintegerDefault
1000max_backoff_msintegerDefault
300000
Responses
201Schedule createdResponse fields
idstringtenant_idstringschedule_typestringValues one_time, cron
expressionstringtimezonestringtarget_urlstringhttp_methodstringpayload_size_bytesintegerretry_policyobjectmax_attemptsintegerinitial_backoff_msintegermax_backoff_msintegerbackoff_multipliernumber
aws_schedule_idstringstatusstringValues active, paused, canceled
sync_statusstringValues pending_sync, synced, pending_delete, deleted, sync_error
sync_errorstringlast_synced_atstring · date-timecreated_atstring · date-timeupdated_atstring · date-time
400Validation error (expression, timezone, or SSRF policy)
get/v1/schedules/{id}Get schedule details and AWS EventBridge sync status
Access schedules:read
Parameters
idpath · string · required
Responses
200Schedule detailsResponse fields
idstringtenant_idstringschedule_typestringValues one_time, cron
expressionstringtimezonestringtarget_urlstringhttp_methodstringpayload_size_bytesintegerretry_policyobjectmax_attemptsintegerinitial_backoff_msintegermax_backoff_msintegerbackoff_multipliernumber
aws_schedule_idstringstatusstringValues active, paused, canceled
sync_statusstringValues pending_sync, synced, pending_delete, deleted, sync_error
sync_errorstringlast_synced_atstring · date-timecreated_atstring · date-timeupdated_atstring · date-time
404Schedule not found
patch/v1/schedules/{id}Update a schedule, pause it, or resume it
Access schedules:write
Parameters
idpath · string · required
JSON body (required)
expressionstringtimezonestringurlstring · uristatusstringValues active, paused
headersobjectbodyJSONArbitrary JSON payload or string body.
Responses
200Schedule updatedResponse fields
idstringtenant_idstringschedule_typestringValues one_time, cron
expressionstringtimezonestringtarget_urlstringhttp_methodstringpayload_size_bytesintegerretry_policyobjectmax_attemptsintegerinitial_backoff_msintegermax_backoff_msintegerbackoff_multipliernumber
aws_schedule_idstringstatusstringValues active, paused, canceled
sync_statusstringValues pending_sync, synced, pending_delete, deleted, sync_error
sync_errorstringlast_synced_atstring · date-timecreated_atstring · date-timeupdated_atstring · date-time
delete/v1/schedules/{id}Cancel a schedule and remove it from AWS EventBridge Scheduler
Access schedules:write
Parameters
idpath · string · required
Responses
200Schedule canceledResponse fields
idstringtenant_idstringschedule_typestringValues one_time, cron
expressionstringtimezonestringtarget_urlstringhttp_methodstringpayload_size_bytesintegerretry_policyobjectmax_attemptsintegerinitial_backoff_msintegermax_backoff_msintegerbackoff_multipliernumber
aws_schedule_idstringstatusstringValues active, paused, canceled
sync_statusstringValues pending_sync, synced, pending_delete, deleted, sync_error
sync_errorstringlast_synced_atstring · date-timecreated_atstring · date-timeupdated_atstring · date-time
Accounts & workspaces
Registration creates an account and workspace. Use the session cookie to list workspaces and switch the active workspace with tenant_id. Password recovery uses a reset token sent through the configured delivery integration.
post/v1/auth/registerRegister a user, create a workspace, and start a session
Access Public
Atomically creates the user, tenant, owner membership, and session. Rate limited per IP.
JSON body (required)
emailstring · email · requiredpasswordstring · password · requirednamestringworkspace_namestring
Responses
201Account created; session cookie setResponse fields
userobjectidstringemailstringnamestring
tenantobjectidstringnamestringplanstringstatusstringlimitsobject
rolestringValues owner, admin, developer, viewer
409Email already registered429Rate limit exceeded
post/v1/auth/loginAuthenticate with email + password and start a session
Access Public
Rate limited per IP and per email.
JSON body (required)
emailstring · email · requiredpasswordstring · password · required
Responses
200Session cookie setResponse fields
userobjectidstringemailstringnamestring
tenantobjectidstringnamestringplanstringstatusstringlimitsobject
rolestringValues owner, admin, developer, viewer
401Invalid credentials403`ACCOUNT_LOCKED` or `TENANT_SUSPENDED`429Rate limit exceeded
post/v1/auth/logoutRevoke the current session and clear the cookie
Access Current session cookie, if present
Responses
204Session revoked503Session revocation could not be confirmed. The session cookie is preserved for retry.
post/v1/auth/forgot-passwordRequest a password reset
Access Public
An accepted request receives a generic response. When configured, SendMQ queues a reset email with a Console link through CapiMail or dispatches the configured password-reset webhook. Development can return a reset token for local testing.
JSON body (required)
emailstring · email · required
Responses
200Generic reset request acknowledgementResponse fields
statusstring · requiredmessagestring · requireddev_reset_tokenstringOnly available outside production
expires_atstring · date-time
400Invalid email or JSON403Request origin rejected503Password reset delivery is unavailable.
post/v1/auth/reset-passwordSet a new password using a reset token
Access Public
JSON body (required)
tokenstring · requirednew_passwordstring · password · required
Responses
200Password reset. Sign in again with the new password.400Invalid or expired reset token, invalid password, or malformed JSON403Request origin rejected
get/v1/auth/workspacesList workspaces (tenants) the current user belongs to
Access Workspace session
Responses
200Workspace list with the active tenantResponse fields
workspacesarray of objecttenantobjectrolestringValues owner, admin, developer, viewer
active_tenant_idstring
401Unauthorized
post/v1/auth/switch-tenantSwitch the session's active tenant
Access Workspace session
JSON body (required)
tenant_idstring · required
Responses
200Active tenant updatedResponse fields
tenantobjectidstringnamestringplanstringstatusstringlimitsobject
rolestringValues owner, admin, developer, viewer
403Not a member of the requested tenant
get/v1/meGet the current principal (tenant, role, scopes)
Access API key or workspace session
Responses
200Current principalResponse fields
auth_typestringtenantobjectidstringnamestringplanstringstatusstringlimitsobject
api_key_idstringpermissionsarray of stringrolestringValues owner, admin, developer, viewer
userobjectidstringemailstringnamestring
401Unauthorized
API keys
Owners and admins can generate a key in the console. To choose specific scopes, pass permissions to the create-key API. Store the raw api_key from the creation response securely. SendMQ only returns it at creation. Rotate by creating a replacement, updating callers, and revoking the old key.
get/v1/api-keysList API keys for the tenant (hashes never returned)
Access Owner or admin session, or keys:manage
Responses
200API key listResponse fields
api_keysarray of objectidstringnamestringenvironmentstringkey_prefixstringpermissionsarray of stringstatusstringcreated_atstring · date-timeexpires_atstring or null
403`INSUFFICIENT_SCOPE` (requires `keys:manage` or owner/admin role)
post/v1/api-keysCreate an API key for the tenant
Access Owner or admin session, or keys:manage
JSON body (optional)
namestringenvironmentstringValues live, test
permissionsarray of stringexpires_atstring or null
Responses
201API key created (raw key returned once)Response fields
idstringnamestringenvironmentstringkey_prefixstringpermissionsarray of stringstatusstringcreated_atstring · date-timeexpires_atstring or nullapi_keystringRaw secret returned once
403`INSUFFICIENT_SCOPE`
delete/v1/api-keys/{id}Revoke an API key
Access Owner or admin session, or keys:manage
Parameters
idpath · string · required
Responses
204API key revoked409`CANNOT_REVOKE_CURRENT_KEY` (the key used for this request)
Team & audit logs
Invite a teammate with a single-use link from the Team tab. Recipients can sign in or register with the invited email address. Workspace roles are owner, admin, developer, and viewer. The last owner cannot be removed or demoted. Audit logs show recorded actions in the active workspace.
get/v1/membersList workspace members and roles
Access Owner or admin session, or keys:manage
Responses
200Workspace membersResponse fields
membersarray of objectuser_idstringemailstringnamestringrolestringValues owner, admin, developer, viewer
created_atstring · date-time
post/v1/membersAdd an existing SendMQ user to the workspace
Access Owner or admin session, or keys:manage
JSON body (required)
emailstring · email · requiredrolestringValues owner, admin, developer, viewer
Default
developer
Responses
201Member addedResponse fields
user_idstringemailstringnamestringrolestringValues owner, admin, developer, viewer
created_atstring · date-time
400Invalid role, email, or JSON404No registered user found for this email409User is already a member
patch/v1/members/{userId}Change a workspace member's role
Access Owner or admin session, or keys:manage
Parameters
userIdpath · string · required
JSON body (required)
rolestring · requiredValues owner, admin, developer, viewer
Responses
200Updated user_id and roleResponse fields
user_idstringrolestringValues owner, admin, developer, viewer
400Invalid role or JSON404Member not found409The last workspace owner cannot be demoted
delete/v1/members/{userId}Remove a workspace member
Access Owner or admin session, or keys:manage
Parameters
userIdpath · string · required
Responses
204Member removed404Member not found409The last workspace owner cannot be removed
get/v1/workspace-invitesList pending workspace invitations
Access Owner or admin session
Responses
200Pending invitationsResponse fields
invitesarray of objectidstring · requiredtenant_idstring · requiredemailstring · email · requiredrolestring · requiredValues admin, developer, viewer
created_atstring · date-time · requiredexpires_atstring · date-time · required
post/v1/workspace-invitesCreate a single-use workspace invitation
Access Owner or admin session
Construct a Console invitation link with the token. The invitation expires in seven days. Creating a new one for the same address replaces the previous invitation. If requested, SendMQ attempts to queue an email and returns the token even when email is unavailable.
JSON body (required)
emailstring · email · requiredrolestring · requiredValues admin, developer, viewer
send_emailbooleanDefault
false
Responses
201Invitation and one-time-visible tokenResponse fields
inviteobjectidstring · requiredtenant_idstring · requiredemailstring · email · requiredrolestring · requiredValues admin, developer, viewer
created_atstring · date-time · requiredexpires_atstring · date-time · required
tokenstringemail_deliverystringPresent when email was requested. Queued means the mail provider accepted the request for processing.
Values queued, rate_limited, unavailable, unconfirmed
400Invalid email, role, or JSON
delete/v1/workspace-invites/{inviteId}Revoke a pending workspace invitation
Access Owner or admin session
Parameters
inviteIdpath · string · required
Responses
204Invitation revoked404Pending invitation not found
post/v1/workspace-invites/acceptAccept a workspace invitation
Access Session matching the invited email address
JSON body (required)
tokenstring · required
Responses
200Membership available in the invited workspaceResponse fields
tenant_idstring
404Invitation unavailable for the signed-in user
get/v1/audit-logsList recent recorded workspace actions, newest first
Access Owner or admin session, or keys:manage
Parameters
limitquery · integer
Responses
200Workspace audit entriesResponse fields
audit_logsarray of objectidstringtenant_idstringactor_idstringactionstringresource_typestringresource_idstringmetadataobjectcreated_atstring · date-time
Response previews
A workspace owner or admin can opt in from the Jobs tab. When enabled, supported responses can include a sanitized JSON preview in attempt history for up to 24 hours.
get/v1/settings/response-previewsRead response preview settings as a workspace owner or admin
Access Owner or admin session
Responses
200Current settingsResponse fields
enabledboolean · requiredretention_hoursinteger · required
403Workspace owner or admin session required
patch/v1/settings/response-previewsChange response preview settings as a workspace owner or admin
Access Owner or admin session
JSON body (required)
enabledboolean · required
Responses
200Updated settingsResponse fields
enabledboolean · requiredretention_hoursinteger · required
403Workspace owner or admin session required
Usage & billing
Use ISO 8601 timestamps with an explicit offset for usage windows. Billing shows usage and limits for the current UTC month. With Polar configured, checkout and customer portal calls return hosted URLs.
get/v1/usageRetrieve tenant usage summary
Access usage:read
Parameters
fromquery · string · date-timetoquery · string · date-time
Responses
200Aggregated usage metrics by metric typeResponse fields
tenant_idstringmetricsobject
get/v1/billingGet the current plan, subscription status, limits, and monthly usage
Access API key or workspace session
Responses
200Workspace billing summaryResponse fields
planstringsubscription_statusstringhas_portalbooleanpolar_enabledbooleancan_upgradebooleanThe caller can manage an active paid subscription
can_downgradebooleanThe caller can schedule a downgrade on an active paid subscription
scheduled_changeJSONmessages_used_monthintegerperiod_startstring · date-timeStart of the current UTC month
limitsobjectnamestringmonthly_message_limitintegerhard_cap_messagesbooleanmax_queuesintegermax_schedulesintegerlog_retention_daysintegerdefault_rpsnumberdefault_concurrent_jobsinteger
503Monthly usage is temporarily unavailable
post/v1/billing/checkoutCreate a Polar checkout session for a Developer workspace
Access Owner or admin session, or keys:manage
JSON body (required)
planstring · requiredValues payg, pro, business
success_urlstring · uri
Responses
201Checkout session createdResponse fields
checkout_idstringurlstring · uri
400Invalid or unconfigured plan, or invalid JSON409The workspace must start checkout on the Developer plan501Polar checkout is not configured502Polar could not create the checkout session503The configured Polar product or price is unavailable
post/v1/billing/upgradeUpgrade an active paid Polar subscription
Access Owner or admin session
Applies the higher plan to the existing subscription. Polar adds any prorated subscription charges to the next invoice and sends a webhook to synchronize workspace limits.
JSON body (required)
planstring · requiredValues pro, business
expected_planstring · requiredValues payg, pro
Responses
204Polar confirmed the requested plan on the existing subscription400Invalid JSON or upgrade plan403The caller must use a workspace owner or admin session409The subscription is inactive, changing, or on a different plan than expected501Polar billing or webhook signing is not configured502Polar could not confirm the subscription upgrade503SendMQ could not start the upgrade or verify the price
post/v1/billing/downgradeSchedule a downgrade for the next billing period
Access Owner or admin session
The current plan and limits apply until Polar reports the effective change. Switching to Developer schedules cancellation of the paid subscription at period end.
JSON body (required)
planstring · requiredValues developer, payg, pro
expected_planstring · requiredValues payg, pro, business
Responses
202Polar confirmed the scheduled changeResponse fields
planstring · requiredValues developer, payg, pro, business
effective_atstring · date-time · required
400Invalid JSON or downgrade plan403The caller must use a workspace owner or admin session409The subscription is inactive, already changing, or on a different plan than expected501Polar billing or webhook signing is not configured502Polar could not confirm the scheduled change503SendMQ could not start the plan change or verify the price
post/v1/billing/portalCreate a Polar customer portal session
Access Owner or admin session, or keys:manage
JSON body (optional)
return_urlstring · uri
Responses
201Customer portal session createdResponse fields
urlstring · uri
400The workspace has no Polar billing customer501Polar billing is not configured502Polar could not create the portal session
Operator endpoints
Health probes support deployments. Admin bootstrap uses a dedicated token when enabled. Polar subscription events use a signed callback.
get/healthLiveness probe
Access Public
Responses
200Service is alive
get/readyReadiness probe (verifies MongoDB connectivity)
Access Public
Responses
200Service is ready503Dependencies unavailable
post/v1/billing/polar/webhookReceive signed Polar billing events
Access Signed Polar webhook
Operator-configured callback. Subscription events synchronize the associated workspace's plan and limits.
Parameters
webhook-idheader · string · requiredwebhook-timestampheader · string · requiredwebhook-signatureheader · string · required
JSON body (required)
object
Responses
200Event acknowledged400Invalid body or event payload401Request signature could not be verified501Polar webhook is not configured
post/v1/admin/tenantsProvision a new tenant (Admin)
Access Admin bootstrap token
Responses
201Tenant created
post/v1/admin/tenants/{id}/api-keysGenerate an API key for a tenant (Admin)
Access Admin bootstrap token
Parameters
idpath · string · required
Responses
201API key generated (raw key returned once)