Skip to content

Forms, newsletter and publish webhooks

Render and submit forms through your app's own route, newsletter sign-up with double opt-in, and verify REM Blogs' signed publish webhook.

Forms

GET /api/public/{product}/forms/{key} returns a form's definition (fields and labels) to render. Submissions go from the browser to your app's route (the SDK's formsRoute), which forwards them with the token:

POST https://blogs.remplatforms.com/api/public/self/forms/contact
Authorization: Bearer rct_...
X-REM-Client-IP: 203.0.113.7
Content-Type: application/json

{"data": {"name": "Asha", "email": "asha@example.com", "message": "Pricing for 20 seats?"},
 "utm": {"source": "newsletter"}, "page_url": "https://yourapp.com/contact",
 "_hp": "", "_started_at": 1763455000000}

Answer

Meaning

200 {"ok": true, "message": "..."}

Stored (encrypted) and, if configured, forwarded to the CRM

422 {"detail": "...", "fields": {...}}

A field is missing or invalid

429

Too many submissions from that address

503

Forms are not available

_hp is the honeypot (must stay empty) and _started_at the time the form was shown (a form filled in under a few seconds is treated as a bot). _captcha carries the Turnstile or hCaptcha answer when the product uses one.

Newsletter

POST /api/public/{product}/newsletter with an e-mail (and topics). The address gets a confirmation mail and is subscribed only after the link is opened. The SDK's NewsletterSignup does it for you.

Publish webhook

When something your product shows is published or changed, REM Blogs POSTs to the app's revalidate route (default <base_url>/api/rem-content/revalidate):

X-REM-Content-Signature: t=<unix>,v1=<hex HMAC-SHA256(key = sha256hex(token), "<t>." + body)>

{"event": "...", "product": "rempayments", "kind": "post|doc|page|brand", "slug": "...", "paths": ["/blog/..."], "url": "...", "ts": 1763455000}

The key is the SHA-256 hex of your service token, so the app needs no extra secret. revalidateRoute() verifies it and drops the rem-content:<product> cache tag. Brand and product-setting changes send kind: "brand" with paths: ["/"].

Verify by hand (Node):

import { verifyWebhook } from '@rem/content-react/webhook';
const event = verifyWebhook(rawBody, req.headers.get('x-rem-content-signature'), process.env.REM_CONTENT_TOKEN);

Last updated 18 Nov 2026

Forms, newsletter and publish webhooks · REM Platforms Blog