Skip to content
JavaScript or API integration

Post JSON. Get a checked, routed submission.

Send submissions from your app, your backend or a custom form with one request. Formpik answers with a clear result, runs your flows and keeps every submission on record.

JavaScript
const response = await fetch("https://formpik.com/api/in/src_7hk2p9", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "name": "Jane Cooper",
    "email": "jane@example.com",
    "message": "Hi, we would like to talk about a new website for our team. Could you share your availability next week?"
  })
})

if (!response.ok) {
  // Show your own error message here
}

With JavaScript or API

What changes when it sends to Formpik.

  • 01

    Answers you can use

    A 200 with the submission id, or a 422 with an error for each field that breaks a rule, ready to show next to the input.

  • 02

    Safe to retry

    Send an Idempotency-Key and a retry never stores the same submission twice.

  • 03

    The rest of the API

    Create forms, sources and flows, read submissions and test flows with an API key.

Setup

Connect JavaScript or API in 3 steps.

The dashboard shows the same steps with your own address and field names filled in.

  1. 01

    Send a POST request with a JSON body to the endpoint URL.

  2. 02

    Use the field keys below as JSON property names.

  3. 03

    A 200 response means the submission was accepted and your flows are running.

Then

Every submission takes the same path.

  • 01

    Checked

    Field rules, a hidden spam trap and an optional bot check run first. Spam is held aside, never delivered.

  • 02

    Read

    An Ask AI step can summarize the message, pick a category or pull out the details you name.

  • 03

    Routed and delivered

    Each submission goes down the path its answers point to: email, Slack, Teams, Discord or a webhook, plus a reply to the sender.

Questions

JavaScript or API questions.

Can I call it from the browser?
Yes, the submission endpoint answers CORS requests from the websites you allow. Keep API keys on your server.
Can I check answers before sending?
Yes. The validate address runs the same checks and stores nothing, so your form can show errors while the visitor types.