ReactionSaaS
Documentation

ReactifySDK · Guides

Code examples

Patterns map directly to API reference routes. Replace host and auth with your environment.

Minimal marketing embed

Static HTML
<script src="https://reactify-cdn.s3.us-east-2.amazonaws.com/reactify.js" defer></script>
<reactify-thread template="hot-takes"></reactify-thread>

Try permutations in the SDK playground.

Read a thread (public JSON)

Useful for building custom chrome or SSR previews alongside the embed.

fetch()
const res = await fetch("/api/reactify/threads/thread_123", {
  headers: { Accept: "application/json" },
});
const thread = await res.json();

Create a thread (authenticated)

Dashboard JWTs are issued by the Reactify creator session—see GET /api/reactify/me.

POST /api/reactify/threads
const res = await fetch("/api/reactify/threads", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer YOUR_DASHBOARD_JWT",
  },
  body: JSON.stringify({
    template_slug: "hot-takes",
    title: "Friday drop",
  }),
});
const created = await res.json();

Upload source media (original)

After upload completes, pass original_video_id into thread create or patch—see /reactify/record.

Presigned upload flow
// 1) Mint upload URL (creator-authenticated route)
const u = await fetch("/api/reactify/upload-url", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer YOUR_DASHBOARD_JWT",
  },
  body: JSON.stringify({
    purpose: "original",
    contentType: "video/mp4",
    filename: "source.mp4",
  }),
}).then((r) => r.json());

// 2) PUT file to presigned URL
await fetch(u.uploadUrl, { method: "PUT", body: file, headers: u.headers ?? {} });

// 3) Create thread referencing original_video_id from response

Send telemetry from your shell

No API key is required for anonymous thread analytics; include anonymous_session_id to dedupe sessions.

POST /api/reactify/events
await fetch("/api/reactify/events", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    event_type: "thread_impression",
    thread_id: "thread_123",
    anonymous_session_id: "sess_demo",
  }),
});