Skip to documentation

SendMQ documentation

Enqueue background HTTP jobs, deliver signed webhooks, and run requests on a schedule.

Send and inspect your first job

  1. 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:write and jobs:read. Save the displayed key in your environment.

    Shell
    export 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.

  2. Enqueue an HTTP job

    Replace the destination URL with an HTTPS endpoint you control that accepts this request and returns 2xx on success.

    cURL
    curl -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 Accepted after enqueueing. Save the id to 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"
    }
  3. Check status and attempts

    Check for succeeded or 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-After within 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 OpenAPI

Jobs

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 object
    queuestring
    idstring
    tenant_idstring
    typestring
    statusstring

    Values pending, processing, retrying, succeeded, failed, canceled

    target_urlstring
    http_methodstring
    scheduled_atstring · date-time
    next_attempt_atstring · date-time
    attempt_countinteger
    max_attemptsinteger
    delivery_idstring
    idempotency_keystring
    agent_actionobject
    last_errorstring
    created_atstring · date-time
    updated_atstring · date-time
    completed_atstring or null
    next_cursorstring

    Supply 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)

queuestring

Logical queue name recorded on the job.

Default default

urlstring · uri · required
methodstring

Values GET, POST, PUT, PATCH, DELETE, HEAD

Default POST

headersobject
bodyJSON

Arbitrary JSON payload or string body.

delay_secondsinteger

Relative delay for ordinary jobs. Leave unset or zero for agent actions.

Default 0

run_atstring · date-time

Required alongside agent_action. An absolute time in the next 30 days, with millisecond precision or coarser.

agent_actionobject
agent_run_idstring · required

Nonempty agent run reference of at most 128 UTF-8 bytes.

ticket_idstring · required

Nonempty ticket reference of at most 128 UTF-8 bytes.

retryobject
max_attemptsinteger

Capped by the tenant's `limits.max_attempts` (10 for standard tenants).

Default 5

initial_backoff_msinteger

Default 1000

max_backoff_msinteger

Default 300000

Responses

  • 202Job accepted for asynchronous execution
    Response fields
    queuestring
    idstring
    statusstring

    Values pending, processing, retrying, succeeded, failed, canceled

    scheduled_atstring · date-time
    status_urlstring
    action_idstring

    Present for agent actions and equal to the job ID.

    delivery_idstring
  • 400Validation error
  • 401Unauthorized
  • 402Monthly message quota exceeded
  • 409Idempotency key reused with a different request, including queue or retry policy
  • 429Tenant rate limit exceeded
get/v1/jobs/{id}Get job status and metadata

Access jobs:read

Parameters

idpath · string · required

Responses

  • 200Job details
    Response fields
    queuestring
    idstring
    tenant_idstring
    typestring
    statusstring

    Values pending, processing, retrying, succeeded, failed, canceled

    target_urlstring
    http_methodstring
    scheduled_atstring · date-time
    next_attempt_atstring · date-time
    attempt_countinteger
    max_attemptsinteger
    delivery_idstring
    idempotency_keystring
    agent_actionobject
    agent_run_idstring · required
    ticket_idstring · required
    outcomestring

    Business result reported by the destination on successful HTTP delivery.

    Values sent, skipped

    reasonstring

    Values customer_replied, ticket_closed, no_longer_needed

    last_errorstring
    created_atstring · date-time
    updated_atstring · date-time
    completed_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 history
    Response fields
    attemptsarray of object
    idstring
    job_idstring
    attempt_numberinteger
    started_atstring · date-time
    finished_atstring · date-time
    http_statusinteger
    duration_msinteger
    error_codestring
    error_messagestring
    response_excerptstring

    Allowlisted 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 canceled
  • 409Invalid 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 execution
  • 409Invalid 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 count
    Response fields
    queuesarray of object
    idstring
    tenant_idstring
    namestring
    descriptionstring
    pausedboolean
    created_atstring · date-time
    updated_atstring · date-time
    max_queuesinteger

    Zero means unlimited

post/v1/queuesCreate a logical queue

Access jobs:write

JSON body (required)

namestring · required
descriptionstring

Responses

  • 201Queue created
    Response fields
    idstring
    tenant_idstring
    namestring
    descriptionstring
    pausedboolean
    created_atstring · date-time
    updated_atstring · date-time
  • 400Invalid name or JSON
  • 402Plan queue limit reached
  • 409A queue with this name already exists
delete/v1/queues/{name}Delete a named queue

Access jobs:write

Parameters

namepath · string · required

Responses

  • 204Queue deleted
  • 400The default queue cannot be deleted
  • 404Queue 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.

Register and publish · cURL
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 endpoints
    Response fields
    endpointsarray of object
    idstring
    tenant_idstring
    urlstring
    enabledboolean
    event_typesarray of string
    signing_secretstring

    Present only in the create and secret-rotation responses (`whsec_...`).

    created_atstring · date-time
    updated_atstring · date-time
post/v1/webhook-endpointsCreate a webhook endpoint (returns raw HMAC signing secret once)

Access webhooks:write

JSON body (required)

urlstring · uri · required
enabledboolean

Default true

event_typesarray of string

Exact event types to match; `*` wildcard is supported.

Responses

  • 201Webhook endpoint created
    Response fields
    idstring
    tenant_idstring
    urlstring
    enabledboolean
    event_typesarray of string
    signing_secretstring

    Present only in the create and secret-rotation responses (`whsec_...`).

    created_atstring · date-time
    updated_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 · uri
enabledboolean
event_typesarray of string
rotate_secretboolean

When true, generates and returns a new signing secret.

Responses

  • 200Webhook endpoint updated
    Response fields
    idstring
    tenant_idstring
    urlstring
    enabledboolean
    event_typesarray of string
    signing_secretstring

    Present only in the create and secret-rotation responses (`whsec_...`).

    created_atstring · date-time
    updated_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 deleted
  • 404Webhook 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 · required
payloadJSON · required

Arbitrary JSON payload delivered to matching endpoints.

endpoint_idsarray of string

Restrict fan-out to these endpoints.

retryobject
max_attemptsinteger

Capped by the tenant's `limits.max_attempts` (10 for standard tenants).

Default 5

initial_backoff_msinteger

Default 1000

max_backoff_msinteger

Default 300000

Responses

  • 202Webhook deliveries enqueued
    Response fields
    event_idstring
    event_typestring
    deliveriesarray of object
    idstring

    Job ID used for inspect and replay calls

    delivery_idstring

    Stable deduplication ID for attempts

    endpoint_idstring
    statusstring
    status_urlstring
  • 402Monthly message quota exceeded
  • 409Idempotency key already used for this endpoint
  • 422No 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 history
    Response fields
    jobobject
    queuestring
    idstring
    tenant_idstring
    typestring
    statusstring

    Values pending, processing, retrying, succeeded, failed, canceled

    target_urlstring
    http_methodstring
    scheduled_atstring · date-time
    next_attempt_atstring · date-time
    attempt_countinteger
    max_attemptsinteger
    delivery_idstring
    idempotency_keystring
    agent_actionobject
    last_errorstring
    created_atstring · date-time
    updated_atstring · date-time
    completed_atstring or null
    attemptsarray of object
    idstring
    job_idstring
    attempt_numberinteger
    started_atstring · date-time
    finished_atstring · date-time
    http_statusinteger
    duration_msinteger
    error_codestring
    error_messagestring
    response_excerptstring

    Allowlisted 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 replayed
    Response fields
    queuestring
    idstring
    tenant_idstring
    typestring
    statusstring

    Values pending, processing, retrying, succeeded, failed, canceled

    target_urlstring
    http_methodstring
    scheduled_atstring · date-time
    next_attempt_atstring · date-time
    attempt_countinteger
    max_attemptsinteger
    delivery_idstring
    idempotency_keystring
    agent_actionobject
    agent_run_idstring · required
    ticket_idstring · required
    outcomestring

    Business result reported by the destination on successful HTTP delivery.

    Values sent, skipped

    reasonstring

    Values customer_replied, ticket_closed, no_longer_needed

    last_errorstring
    created_atstring · date-time
    updated_atstring · date-time
    completed_atstring or null
  • 402Monthly message quota exceeded
  • 404Delivery not found
  • 409Delivery status does not allow replay
  • 422Target 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.

Daily at 09:00 Jakarta time · cURL
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 schedules
    Response fields
    schedulesarray of object
    idstring
    tenant_idstring
    schedule_typestring

    Values one_time, cron

    expressionstring
    timezonestring
    target_urlstring
    http_methodstring
    payload_size_bytesinteger
    retry_policyobject
    aws_schedule_idstring
    statusstring

    Values active, paused, canceled

    sync_statusstring

    Values pending_sync, synced, pending_delete, deleted, sync_error

    sync_errorstring
    last_synced_atstring · date-time
    created_atstring · date-time
    updated_atstring · date-time
post/v1/schedulesCreate a one-time, cron, or rate schedule

Access schedules:write

JSON body (required)

schedule_typestring · required

Values one_time, cron

expressionstring · required

RFC3339 or `at(...)` for `one_time`; `cron(...)` or `rate(...)` for `cron`.

timezonestring

IANA timezone; invalid values are rejected.

urlstring · uri · required
methodstring

Values GET, POST, PUT, PATCH, DELETE, HEAD

Default POST

headersobject
bodyJSON

Arbitrary JSON payload or string body.

retryobject
max_attemptsinteger

Capped by the tenant's `limits.max_attempts` (10 for standard tenants).

Default 5

initial_backoff_msinteger

Default 1000

max_backoff_msinteger

Default 300000

Responses

  • 201Schedule created
    Response fields
    idstring
    tenant_idstring
    schedule_typestring

    Values one_time, cron

    expressionstring
    timezonestring
    target_urlstring
    http_methodstring
    payload_size_bytesinteger
    retry_policyobject
    max_attemptsinteger
    initial_backoff_msinteger
    max_backoff_msinteger
    backoff_multipliernumber
    aws_schedule_idstring
    statusstring

    Values active, paused, canceled

    sync_statusstring

    Values pending_sync, synced, pending_delete, deleted, sync_error

    sync_errorstring
    last_synced_atstring · date-time
    created_atstring · date-time
    updated_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 details
    Response fields
    idstring
    tenant_idstring
    schedule_typestring

    Values one_time, cron

    expressionstring
    timezonestring
    target_urlstring
    http_methodstring
    payload_size_bytesinteger
    retry_policyobject
    max_attemptsinteger
    initial_backoff_msinteger
    max_backoff_msinteger
    backoff_multipliernumber
    aws_schedule_idstring
    statusstring

    Values active, paused, canceled

    sync_statusstring

    Values pending_sync, synced, pending_delete, deleted, sync_error

    sync_errorstring
    last_synced_atstring · date-time
    created_atstring · date-time
    updated_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)

expressionstring
timezonestring
urlstring · uri
statusstring

Values active, paused

headersobject
bodyJSON

Arbitrary JSON payload or string body.

Responses

  • 200Schedule updated
    Response fields
    idstring
    tenant_idstring
    schedule_typestring

    Values one_time, cron

    expressionstring
    timezonestring
    target_urlstring
    http_methodstring
    payload_size_bytesinteger
    retry_policyobject
    max_attemptsinteger
    initial_backoff_msinteger
    max_backoff_msinteger
    backoff_multipliernumber
    aws_schedule_idstring
    statusstring

    Values active, paused, canceled

    sync_statusstring

    Values pending_sync, synced, pending_delete, deleted, sync_error

    sync_errorstring
    last_synced_atstring · date-time
    created_atstring · date-time
    updated_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 canceled
    Response fields
    idstring
    tenant_idstring
    schedule_typestring

    Values one_time, cron

    expressionstring
    timezonestring
    target_urlstring
    http_methodstring
    payload_size_bytesinteger
    retry_policyobject
    max_attemptsinteger
    initial_backoff_msinteger
    max_backoff_msinteger
    backoff_multipliernumber
    aws_schedule_idstring
    statusstring

    Values active, paused, canceled

    sync_statusstring

    Values pending_sync, synced, pending_delete, deleted, sync_error

    sync_errorstring
    last_synced_atstring · date-time
    created_atstring · date-time
    updated_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 · required
passwordstring · password · required
namestring
workspace_namestring

Responses

  • 201Account created; session cookie set
    Response fields
    userobject
    idstring
    emailstring
    namestring
    tenantobject
    idstring
    namestring
    planstring
    statusstring
    limitsobject
    rolestring

    Values owner, admin, developer, viewer

  • 409Email already registered
  • 429Rate 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 · required
passwordstring · password · required

Responses

  • 200Session cookie set
    Response fields
    userobject
    idstring
    emailstring
    namestring
    tenantobject
    idstring
    namestring
    planstring
    statusstring
    limitsobject
    rolestring

    Values owner, admin, developer, viewer

  • 401Invalid credentials
  • 403`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 revoked
  • 503Session 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 acknowledgement
    Response fields
    statusstring · required
    messagestring · required
    dev_reset_tokenstring

    Only available outside production

    expires_atstring · date-time
  • 400Invalid email or JSON
  • 403Request origin rejected
  • 503Password reset delivery is unavailable.
post/v1/auth/reset-passwordSet a new password using a reset token

Access Public

JSON body (required)

tokenstring · required
new_passwordstring · password · required

Responses

  • 200Password reset. Sign in again with the new password.
  • 400Invalid or expired reset token, invalid password, or malformed JSON
  • 403Request origin rejected
get/v1/auth/workspacesList workspaces (tenants) the current user belongs to

Access Workspace session

Responses

  • 200Workspace list with the active tenant
    Response fields
    workspacesarray of object
    tenantobject
    rolestring

    Values 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 updated
    Response fields
    tenantobject
    idstring
    namestring
    planstring
    statusstring
    limitsobject
    rolestring

    Values 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 principal
    Response fields
    auth_typestring
    tenantobject
    idstring
    namestring
    planstring
    statusstring
    limitsobject
    api_key_idstring
    permissionsarray of string
    rolestring

    Values owner, admin, developer, viewer

    userobject
    idstring
    emailstring
    namestring
  • 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 list
    Response fields
    api_keysarray of object
    idstring
    namestring
    environmentstring
    key_prefixstring
    permissionsarray of string
    statusstring
    created_atstring · date-time
    expires_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)

namestring
environmentstring

Values live, test

permissionsarray of string
expires_atstring or null

Responses

  • 201API key created (raw key returned once)
    Response fields
    idstring
    namestring
    environmentstring
    key_prefixstring
    permissionsarray of string
    statusstring
    created_atstring · date-time
    expires_atstring or null
    api_keystring

    Raw 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 revoked
  • 409`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 members
    Response fields
    membersarray of object
    user_idstring
    emailstring
    namestring
    rolestring

    Values 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 · required
rolestring

Values owner, admin, developer, viewer

Default developer

Responses

  • 201Member added
    Response fields
    user_idstring
    emailstring
    namestring
    rolestring

    Values owner, admin, developer, viewer

    created_atstring · date-time
  • 400Invalid role, email, or JSON
  • 404No registered user found for this email
  • 409User 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 · required

Values owner, admin, developer, viewer

Responses

  • 200Updated user_id and role
    Response fields
    user_idstring
    rolestring

    Values owner, admin, developer, viewer

  • 400Invalid role or JSON
  • 404Member not found
  • 409The 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 removed
  • 404Member not found
  • 409The last workspace owner cannot be removed
get/v1/workspace-invitesList pending workspace invitations

Access Owner or admin session

Responses

  • 200Pending invitations
    Response fields
    invitesarray of object
    idstring · required
    tenant_idstring · required
    emailstring · email · required
    rolestring · required

    Values admin, developer, viewer

    created_atstring · date-time · required
    expires_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 · required
rolestring · required

Values admin, developer, viewer

send_emailboolean

Default false

Responses

  • 201Invitation and one-time-visible token
    Response fields
    inviteobject
    idstring · required
    tenant_idstring · required
    emailstring · email · required
    rolestring · required

    Values admin, developer, viewer

    created_atstring · date-time · required
    expires_atstring · date-time · required
    tokenstring
    email_deliverystring

    Present 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 revoked
  • 404Pending 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 workspace
    Response 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 entries
    Response fields
    audit_logsarray of object
    idstring
    tenant_idstring
    actor_idstring
    actionstring
    resource_typestring
    resource_idstring
    metadataobject
    created_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 settings
    Response fields
    enabledboolean · required
    retention_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 settings
    Response fields
    enabledboolean · required
    retention_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-time
toquery · string · date-time

Responses

  • 200Aggregated usage metrics by metric type
    Response fields
    tenant_idstring
    metricsobject
get/v1/billingGet the current plan, subscription status, limits, and monthly usage

Access API key or workspace session

Responses

  • 200Workspace billing summary
    Response fields
    planstring
    subscription_statusstring
    has_portalboolean
    polar_enabledboolean
    can_upgradeboolean

    The caller can manage an active paid subscription

    can_downgradeboolean

    The caller can schedule a downgrade on an active paid subscription

    scheduled_changeJSON
    messages_used_monthinteger
    period_startstring · date-time

    Start of the current UTC month

    limitsobject
    namestring
    monthly_message_limitinteger
    hard_cap_messagesboolean
    max_queuesinteger
    max_schedulesinteger
    log_retention_daysinteger
    default_rpsnumber
    default_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 · required

Values payg, pro, business

success_urlstring · uri

Responses

  • 201Checkout session created
    Response fields
    checkout_idstring
    urlstring · uri
  • 400Invalid or unconfigured plan, or invalid JSON
  • 409The workspace must start checkout on the Developer plan
  • 501Polar checkout is not configured
  • 502Polar could not create the checkout session
  • 503The 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 · required

Values pro, business

expected_planstring · required

Values payg, pro

Responses

  • 204Polar confirmed the requested plan on the existing subscription
  • 400Invalid JSON or upgrade plan
  • 403The caller must use a workspace owner or admin session
  • 409The subscription is inactive, changing, or on a different plan than expected
  • 501Polar billing or webhook signing is not configured
  • 502Polar could not confirm the subscription upgrade
  • 503SendMQ 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 · required

Values developer, payg, pro

expected_planstring · required

Values payg, pro, business

Responses

  • 202Polar confirmed the scheduled change
    Response fields
    planstring · required

    Values developer, payg, pro, business

    effective_atstring · date-time · required
  • 400Invalid JSON or downgrade plan
  • 403The caller must use a workspace owner or admin session
  • 409The subscription is inactive, already changing, or on a different plan than expected
  • 501Polar billing or webhook signing is not configured
  • 502Polar could not confirm the scheduled change
  • 503SendMQ 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 created
    Response fields
    urlstring · uri
  • 400The workspace has no Polar billing customer
  • 501Polar billing is not configured
  • 502Polar 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 ready
  • 503Dependencies 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 · required
webhook-timestampheader · string · required
webhook-signatureheader · string · required

JSON body (required)

object

Responses

  • 200Event acknowledged
  • 400Invalid body or event payload
  • 401Request signature could not be verified
  • 501Polar 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)