Partner integration · v1
RelayIt Webhook Integration
Embed RelayIt’s voice-to-CRM pipeline into your product. Your users record voice debriefs, RelayIt extracts structured updates, and signed webhooks land in your endpoint ready to write into your CRM. This guide walks you through the OAuth Connect flow, webhook verification, and the full payload contract.
Architecture
Five surfaces. RelayIt is the OAuth provider; you are the OAuth client and the eventual webhook destination. End users authenticate against RelayIt, not against you.
After token exchange, a crm_connectionis auto-created on RelayIt’s side that wires the user’s debriefs into your webhook_url. From that moment, every voice note the user records flows through Phase A’s signed delivery pipeline into your endpoint.
Prerequisites
- A reachable HTTPS endpoint that will receive RelayIt webhooks (your
webhook_url). - A reachable HTTPS callback URL on your app to receive OAuth redirects (your
redirect_uri). - Your partner credentials from RelayIt: client_id, client_secret, webhook_signing_secret. Request via your RelayIt point of contact.
- The ability to compute HMAC-SHA256 in your stack.
Step 1 · Receive partner credentials
RelayIt issues three values when you’re registered as a partner. They are shown only once and cannot be retrieved later. Store all three in your secrets manager immediately.
POST /api/admin/partners/{id}/rotate. Old values stop working immediately — coordinate the rotation with your deploy.Step 2 · OAuth Connect flow
2.1 Redirect the user to RelayIt
Add a “Connect RelayIt” button to your app. When the user clicks it, send their browser to:
RelayIt validates client_id, checks redirect_uri against the exact-match whitelist on your partner record, then redirects the user to the consent page on relayitiq.com.
2.2 Consent screen
RelayIt renders a consent page that shows your partner name and logo. The user logs in or signs up, then clicks Approve. RelayIt issues a single-use authorization code and redirects the browser back to your redirect_uri:
2.3 Exchange the code for a token
Server-side, exchange the code for a long-lived connection_token. Form-urlencoded body, never query string. The code is single-use and expires in 10 minutes.
access_token against your internal user record. It does not expire by default — use DELETE /api/oauth/disconnect to revoke.Step 3 · Receive and verify webhooks
From the moment a user completes consent, every debrief they record fires a signed POST to your webhook_url. Verify every request before trusting it.
Headers RelayIt sends
Verification rules
- Reject if
X-RelayIt-Timestampis more than 5 minutes off your server clock. This blocks replay attacks. - Compute
HMAC-SHA256(webhook_signing_secret, "{timestamp}.{raw_body}")and constant-time-compare to the hex value aftersha256=in the signature header. - Dedupe by
X-RelayIt-Idempotency-Key. Retries reuse the same key — record processed keys for 24 hours and ignore duplicates. - Always respond
2xxwithin 30 seconds. Non-2xx responses trigger automatic retries (5 attempts total, exponential backoff [1s, 2s, 4s, 8s]).
Webhook payload reference
Three actions cover the structured outputs of a RelayIt debrief. Every payload is compact JSON serialized with no whitespace (this is what we sign).
create_note
Attach a meeting note to a CRM record (typically the user’s opportunity or contact).
update_opportunity
Update opportunity / deal fields. Field names are passed through unchanged from the user’s configured field schema.
create_activity
Log a completed activity / task against a record.
Expected response
Return 200 OK with an optional JSON body containing an id field that RelayIt will store for audit. Any 2xx is accepted.
Error events
If RelayIt exhausts all 5 delivery attempts to your webhook, we fire a final signed event to your configured error_url (optional — omit it from your partner registration to opt out).
Use the idempotency_key to correlate the failed event back to the original delivery attempts. The :err suffix on the error event’s own idempotency key lets you dedupe error events independently from successful writes.
Signature verification — copy-paste samples
Drop these into your webhook handler. Both implement the same constant-time comparison RelayIt uses internally.
Token-authenticated API reference
Your connection_token is a Bearer token. It is scoped to one user and one partner (you). The set of endpoints you can call with it is explicitly allowlisted. Anything outside the allowlist returns 403 even with a valid token.
Example: introspecting a token
Rate limits
Two limits apply to token-authenticated endpoints, both rolling 60-second windows:
- Per-user (per-token): default
30 req/min. Counted per (partner, user) pair. This is the primary brake — it scales linearly with your user base. One user’s runaway loop cannot starve your other users. - Partner-wide ceiling: default
2,000 req/min. Counts every request from every user under your partner record. This is the anti-DoS backstop.
Both limits return 429 when exceeded. The response clarifies which one you tripped. Cache /mepartner-side — there’s no reason to call it more than once per session.
Webhook delivery from RelayIt to your endpoint is not rate-limited from your end — we throttle ourselves based on user activity. Size your receiver for bursts.
Need higher limits at scale? Ask. We tune per-partner based on integration shape.
Security model
Five layers protect both sides of the integration:
- Surface minimization. Your token can hit
/meand/disconnect. Nothing else. - Output-only data. You never receive raw transcripts, prompts, model versions, or internal field schemas. Only the structured CRM-bound payload.
- Per-partner rate limit + audit log. Every token-authenticated request is logged with your partner ID, endpoint, IP, response code. Bulk enumeration patterns trigger automatic suspension.
- Token scoping.One user, one partner, one token. A compromised token contains the blast radius to one user’s flow.
- Mutual signing. RelayIt signs every webhook to you; replay-protection via the timestamp header. You verify every request before trusting it.
Support
Integration questions, sandbox setup, or rate-limit changes — reach out via your RelayIt point of contact. For incident-level escalation, use the email shown on your partner agreement.
This document is versioned with the API. The current API version is 1; breaking changes ship under a new version with 90-day notice.