Build on Rex AI

A REST API and signed webhooks so your ERP, accounting, BI or dispatch tools stay in step with your customers, assets and work orders.

Authentication

An owner or administrator creates a key in Settings → API & Webhooks. The full key is shown once. Send it as a bearer token on every request.

curl https://rexaihq.com/api/v1/work-orders?status=scheduled&limit=25 \
  -H "Authorization: Bearer rex_live_…"
  • Scopes: read allows GET requests; write also allows creating, updating and deleting.
  • A key acts with the permissions of the person who created it, and only sees your organization's data.
  • Keys can't reach sign-in, billing, users, organization settings, API keys or webhooks. Manage those in the app.
  • Revoking a key stops it immediately.

Resources

Every endpoint lives under https://rexaihq.com/api/v1/. Lists are paginated with page and limit.

customerscustomer-locationsassetswork-ordersmaintenance-plansquotesinventorywarehousesarticlescategoriesanalyticsusers (read only)
curl -X POST https://rexaihq.com/api/v1/work-orders \
  -H "Authorization: Bearer rex_live_…" \
  -H "Content-Type: application/json" \
  -d '{"title": "Replace condenser fan motor", "customer_id": "…", "priority": "high"}'

Rate limits

120 requests per minute per key. Responses include X-RateLimit-Limit and X-RateLimit-Remaining; over the limit you get 429 with a Retry-After header.

Webhooks

Add an HTTPS endpoint and choose events. Each delivery is a JSON POST, retried up to three times if your endpoint doesn't answer with a 2xx. The delivery log in Settings shows every attempt.

EventWhen
customer.createdA customer was added
asset.createdAn asset was added
work_order.createdA work order was created
work_order.updatedA work order changed (status, schedule, assignee…)
work_order.completedA work order was completed
quote.approvedA quote was approved, in the app or the customer portal
pingTest event sent from Settings → API & Webhooks
{
  "id": "evt_8f2c…",
  "type": "work_order.completed",
  "created_at": "2026-11-15T14:03:22Z",
  "organization_id": "…",
  "data": { "id": "…", "work_order_number": 1042, "title": "…", "status": "completed", … }
}

Verify the signature

Every request carries X-Rex-Signature: t=<timestamp>,v1=<hex>, where v1 is HMAC-SHA256 of "<timestamp>.<raw body>" using your endpoint's signing secret.

import crypto from 'node:crypto'

// rawBody: the request body exactly as received (string)
export function verifyRexSignature(rawBody, header, secret) {
  const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')))
  const age = Math.abs(Date.now() / 1000 - Number(parts.t))
  if (age > 300) return false // reject events older than 5 minutes
  const expected = crypto
    .createHmac('sha256', secret)
    .update(`${parts.t}.${rawBody}`)
    .digest('hex')
  return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1))
}
import hashlib, hmac, time

def verify_rex_signature(raw_body: str, header: str, secret: str) -> bool:
    parts = dict(p.split("=", 1) for p in header.split(","))
    if abs(time.time() - int(parts["t"])) > 300:
        return False  # reject events older than 5 minutes
    expected = hmac.new(secret.encode(), f"{parts['t']}.{raw_body}".encode(),
                        hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts["v1"])

Full reference

Every endpoint, parameter and response shape is in the interactive API reference, generated from the live API (OpenAPI JSON).