Developers

Made to be
built on.

A widget you embed with one tag, an API that covers the whole product, and webhooks for everything that happens. No black boxes.

REST · SDKS · WEBHOOKS · SIGNED IDENTITY

Quickstart

Live in four steps.

Install the widget, initialize with your publishable key, sign identity on your server, and listen for events.

01 · Install

terminal
$ npm install @relia/sdk
# or drop in the script tag
<script src="https://cdn.relia.gg/widget.js"></script>

02 · Initialize

app.tsxbrowser
import { Relia } from "@relia/sdk"

Relia.init({
  publishableKey: "pk_live_51Hq…",
  theme: "dark"
})

03 · Sign identity on your server

api/relia-token.tsserver
import { signIdentity } from "@relia/server"

const token = signIdentity({
  userId: "usr_01HQZ8",
  email: user.email
}, process.env.RELIA_SECRET_KEY)

// browser: Relia.identify(token)

04 · Listen for events

webhook handlerserver
// POST https://yourapp.com/webhooks/relia
{
  "event": "ai.handoff",
  "conversation": "cnv_018493",
  "confidence": 0.41,
  "routed_to": "team_payments"
}

API reference

A small API that covers the whole product.

Everything the inbox and widget can do, your code can do. Authenticated with secret keys, scoped to your tenant.

POST/v1/conversationsStart a conversation for a customer
GET/v1/conversations/:idFetch a conversation with messages
POST/v1/conversations/:id/messagesAppend a message
POST/v1/conversations/:id/assignAssign to an agent or team
GET/v1/customers/:idFetch a customer and their history
POST/v1/knowledge/documentsAdd or update a knowledge document
GET/v1/searchQuery conversations and knowledge
GET/v1/analytics/summaryResolution, response and channel metrics

Cursor pagination · Idempotency keys · Versioned · JSON everywhere

Events & keys

React to everything. Trust the right keys.

Webhook events

conversation.created

conversation.assigned

conversation.resolved

message.created

ticket.sla_warning

ai.answered

ai.handoff

customer.verified

Key model

pk_live_…

Publishable. Safe in the browser. Can open conversations, nothing else.

sk_live_…

Secret. Server only. Full API access, signs identity tokens. Rotatable.

whsec_…

Webhook signing secret. Verify every delivery.

SDKs

@relia/sdk@relia/react@relia/serverRESTWebhooks

The browser SDK is framework agnostic; the React package adds hooks like useConversation(). Anything the SDKs do, the REST API does too.

From zero to support in minutes.

01

Create project

pk_live_51Hq…

sk_live_9k2X…

Keys generated

02

Install

<script src="…">

One tag, any stack

03

Go live

Connected

The bubble appears

Ship support this week.

Create a project, grab your keys and put the widget live.