Skip to content
RSFlowHub
Developer docs API v1 Stable OpenAPI SDKs Playground
Forms API Reference: Contact Messages and Newsletter Signups

Forms API Reference

Three public endpoints for contact messages and newsletter signups. Authenticate with the public form token, send JSON, and get the same spam protection, limits and privacy tools as the embed.

Prefer a script tag? See the Forms guide. Plans and pricing are on the Forms page. The AI endpoints in the API catalog use a different key and credits.

Overview

MethodEndpointUsed for
GET/api/v1/forms/configRead the form's fields, texts and colours.
POST/api/v1/forms/submissionsSend a contact message (contact forms).
POST/api/v1/forms/subscribersAdd a newsletter signup (newsletter forms).

Base URL: https://rsflowhub.com/api/v1/forms. All bodies and answers are JSON.

Authentication and limits

  • Header: X-Form-Token: fm_sec_.... Copy it from Dashboard → Forms → your form → Install. It is public by design and only works for that one form; it is not your private API key and uses no API credits.
  • Allowed websites: if you restricted the form to your sites, a request must carry a matching Origin or Referer header (browsers add it automatically). Requests without one get 403. Leave the restriction empty for server-to-server calls.
  • Rate limits: reading the config is limited to 60 requests per minute per IP. Sending messages or signups is limited to 5 per minute per IP and 600 per hour per form token; above that you get 429.
  • Plan limits: messages and stored subscribers count against your Forms plan, separate from API credits. Spam is never counted.

Get the form configuration

GET https://rsflowhub.com/api/v1/forms/config. Useful to build your own markup from the fields you defined in the dashboard. The answer is never cached and never contains plan or billing data.

config.sh Bash
curl https://rsflowhub.com/api/v1/forms/config \
  -H "X-Form-Token: fm_sec_YOUR_FORM_TOKEN"

200: configuration

200.json JSON
{
  "status": "success",
  "data": {
    "type": "contact",
    "fields": [
      { "key": "name", "label": "Name", "type": "text", "required": true, "options": [] },
      { "key": "email", "label": "Email", "type": "email", "required": true, "options": [] },
      { "key": "message", "label": "Message", "type": "textarea", "required": true, "options": [] }
    ],
    "submitLabel": "Send message",
    "successMessage": "Thanks! Your message has been sent.",
    "redirectUrl": "",
    "primaryColor": "#4f46e5",
    "theme": "light",
    "consentRequired": false,
    "consentText": "I agree that my details may be stored and used to answer my request.",
    "privacyUrl": "",
    "branding": true
  }
}

Send a contact message

POST https://rsflowhub.com/api/v1/forms/submissions. Only for contact forms; a newsletter form answers 404.

submit.sh
curl -X POST https://rsflowhub.com/api/v1/forms/submissions \
  -H "X-Form-Token: fm_sec_YOUR_FORM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"fields": {"name": "Ann", "email": "ann@example.com", "message": "Hello!"}, "consent": true}'
const res = await fetch('https://YOUR_DOMAIN/api/v1/forms/submissions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Form-Token': 'fm_sec_YOUR_FORM_TOKEN',
  },
  body: JSON.stringify({
    fields: { name: 'Ann', email: 'ann@example.com', message: 'Hello!' },
    consent: true,
  }),
});
const body = await res.json();
if (body.status === 'success') showThanks(body.message);
Body fieldTypeMeaning
fieldsobject, requiredOne value per field, keyed by Field ID (name, email, message, ...). Field types are text, email, tel, textarea and select. Unknown keys are dropped and HTML is stripped.
consentbooleantrue when the visitor accepted your privacy notice. Required when the form asks for it (consentRequired in the config).
websitestring, leave outHidden trap for bots. If it is filled the request is accepted but nothing is stored. Do not render it in your own form.

200: saved

200.json JSON
{
  "status": "success",
  "message": "Thanks! Your message has been sent.",
  "data": { "ref": "FRM-AB12CD" }
}

422: a field is invalid

422.json JSON
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "details": { "fields.email": ["The fields.email field must be a valid email address."] }
  }
}

data.ref is the message reference shown in your inbox. If the form has a redirect URL, data.redirect_url is included. Sending the same content from the same email twice within 10 minutes returns the first reference instead of storing a duplicate.

Add a newsletter subscriber

POST https://rsflowhub.com/api/v1/forms/subscribers. Only for newsletter forms; a contact form answers 404. The body is the same shape as above, with email and an optional name in fields.

subscribe.sh Bash
curl -X POST https://rsflowhub.com/api/v1/forms/subscribers \
  -H "X-Form-Token: fm_sec_YOUR_FORM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"fields": {"email": "reader@example.com", "name": "Sam"}, "consent": true}'

200: accepted

200.json JSON
{
  "status": "success",
  "message": "Thanks! Please check your email to confirm your subscription."
}
Double opt-in
The person is stored as waiting and gets an email with a confirmation link (valid 7 days); only after they click it do they count as a subscriber. The answer is identical for a new, waiting, confirmed or unsubscribed address, so the endpoint cannot be used to find out who is on your list.

Status codes

CodeMeaning
200Accepted. Spam is accepted too (visitors and bots see the same answer); it is kept in your Spam filter.
401Missing, wrong or paused form token.
403The request does not come from one of your allowed websites.
404Wrong endpoint for this form type.
422A field is missing or invalid. error.details maps fields.<id> to messages.
429Too many requests, or a plan limit was reached. For plan limits code is monthly_limit or subscriber_limit.

429: plan limit reached

429.json JSON
{
  "status": "error",
  "code": "monthly_limit",
  "message": "This form is not accepting messages right now. Please try again later."
}

More

  • Webhook payloads, auto-reply and AI helpers are described in the Forms guide.
  • Privacy tools: retention, consent, export and delete by email.
  • Need the AI endpoints (sentiment, intent, translation)? See the API catalog.

Forms API Q&A

The form token (fm_sec_...) in the X-Form-Token header, not your private API key. The token is public by design: it can only send messages or signups to that one form, and you can restrict it to your own websites in the form settings.

No. Forms has its own plans and monthly message and subscriber limits, separate from the AI API credits. Spam is never counted against your limit.

So that bots learn nothing. A message judged as spam is kept in your Spam filter for review and the visitor sees the same success answer as everyone else.

Yes, send the token header from your server. If you restricted the form to allowed websites, requests without an Origin or Referer header are rejected, so leave the restriction empty for server-to-server calls.

Ready to build?

Create your free account and make your first API call in minutes.

RSFlowHub

Sign in to continue

You'll come straight back to this page.

Forgot password?

New to RSFlowHub? Create a free account