Skip to main content

Delivery model

DispatchQ sends your job payload to url using the configured method and headers.
  • Any 2xx response marks the job completed.
  • Non-2xx, network errors, and timeouts trigger retries until max_attempts.

Headers DispatchQ sends

X-DispatchQ-Signature
string
required
HMAC signature in format sha256=<hex>.
X-DispatchQ-Job-Id
string
required
Job identifier.
X-DispatchQ-Attempt
integer
required
1-based attempt number.
Content-Type
string
required
Always application/json.

HMAC verification

Use your API key as the secret and the exact JSON body as input.
import { createHmac, timingSafeEqual } from 'node:crypto';

function verifyDispatchQSignature(rawBody: string, signatureHeader: string, apiKey: string): boolean {
  const expected = `sha256=${createHmac('sha256', apiKey).update(rawBody).digest('hex')}`;
  const a = Buffer.from(expected);
  const b = Buffer.from(signatureHeader || '');
  if (a.length !== b.length) return false;
  return timingSafeEqual(a, b);
}

Timeout behavior

Default HTTP request timeout is 30 seconds (WEBHOOK_TIMEOUT_MS=30000). Timeout is treated as a failed attempt and retried.

Retry behavior for non-2xx

DispatchQ retries with exponential backoff and caps delay at 1 hour.

Callback URLs

If callback_url is set on a job, DispatchQ sends a POST notification on terminal outcomes:
  • completed: includes response code/body/duration
  • failed: includes last_error