Documentation
Authenticate with a bearer token, send JSON, get JSON. Fully versioned and backwards compatible.
Overview v3
RTAPI lets you publish events and deliver them to webhooks and realtime subscribers. The base URL for all requests is https://api.rt-api.tech/v3.
Quickstart
Three steps to your first delivered event:
# 1. Export your key
export RTAPI_KEY="sk_live_xxx"
# 2. Publish an event
curl https://api.rt-api.tech/v3/events \
-H "Authorization: Bearer $RTAPI_KEY" \
-H "Content-Type: application/json" \
-d {"channel":"orders","type":"order.created","data":{"id":"ord_9F2"}}
# 3. -> 202 Accepted { "id": "evt_7Ka1", "status": "queued" }Authentication
All requests use a bearer token in the Authorization header. Keys are scoped per environment and can be rotated instantly from the dashboard.
Authorization: Bearer sk_live_xxx
Publish an event
Send a POST to /v3/events with a channel, a type and a JSON payload.
// JavaScript SDK
import { RTAPI } from "@rtapi/node";
const rt = new RTAPI(process.env.RTAPI_KEY);
await rt.events.publish({
channel: "orders",
type: "order.created",
data: { id: "ord_9F2", total: 4990 }
});# Python SDK
from rtapi import Client
rt = Client(api_key=os.environ["RTAPI_KEY"])
rt.events.publish(channel="orders", type="order.created", data={"id": "ord_9F2"})Webhooks
Register an endpoint and RTAPI will POST every matching event to it. Verify the X-RTAPI-Signature header with your signing secret.
POST https://api.rt-api.tech/v3/webhooks
{ "url": "https://yourapp.com/hooks", "channels": ["orders"] }Failed deliveries retry with exponential backoff for up to 24 hours; every attempt is visible in the delivery log.
SDKs
Official libraries: JavaScript / TypeScript, Python, Go, PHP. Each ships typed models and a signature helper.
Errors
RTAPI uses standard HTTP status codes. Errors return a JSON body with error.code and error.message.
{ "error": { "code": "invalid_channel", "message": "Channel not found" } }