Authentication & scopes

One bearer key, two scopes, and a workspace role on top. Plus the CORS answer nobody reads until it bites.

Start in 5 minutes

Create a key in Settings → API keys. Choose readwrite to change anything, readonly to read.

  1. The raw key is shown once, so copy it when it appears. You can also mint one with POST /v1/rest/keys.
  2. Export it in your shell. The API never takes a key in the query string.
  3. Make your first call. Every worked example is executed against a live server.
export JOMFORM_API_KEY="jfk_your_key_here"
A placeholder. This page never prints a real key.

One run covers the flow: authenticate, create a form, publish it, read it back, then read the records it made.

Authentication

Send the key as a bearer token to https://api.jomform.com on every call.

Authorization: Bearer ***

A key belongs to a workspace, not a person. Everything it reads and writes is that workspace's data.

The dashboard also accepts a browser session cookie on these routes. A script should use a key.

The same key drives the MCP server. One credential covers /v1/rest/* and MCP, so see the MCP tool reference.

A missing or revoked key gets 401 before any workspace is resolved, so a broken client fails loudly.

Scopes

A key carries a scope, independent of who created it. It decides what the key may do at all.

  • readonly is read only. Every write is refused with 403.
  • It is also refused on the reads whose handler writes anyway: 3 routes, listed next.
  • readwrite reads and writes.
  • GET /v1/rest/forms/{id}/email-settings — Read a form's email overrides
  • GET /v1/rest/forms/{id}/notifications — List a form's notification rules
  • GET /v1/rest/settings/webhook-key — Read the webhook signing key

Inside a ?workspace=<slug> scope there is a second axis: your role in that workspace. A write needs both the key and the role.

The payment-credential routes need admin. Scope belongs to the credential; role belongs to the person.

Note: The endpoint reference states, per row, which gate applies.

No CORS, server-to-server only

This API is built for server-to-server calls. It sends no CORS headers at all.

There is no Access-Control-Allow-Origin and no Access-Control-Allow-Methods. A preflight OPTIONS is not answered with them.

A fetch() from another origin is blocked by the browser, and the request may not even be sent.

That is deliberate. Call the API from your own backend, where the key stays out of the browser.

An API key shipped in client-side JavaScript is a key you have published.

Tip: If your front end needs data, have it call your server, and let your server call JomForm.

Building and testing against the API

There is no separate sandbox or test key. A key acts on your real workspace.

An integration test against production data is a test that may email a customer.

  1. Create a throwaway workspace. The workspace switcher does it in a click, or POST /v1/workspaces.
  2. Point its CHIP credentials at CHIP's own sandbox if you exercise payments.
  3. Create a key scoped to that workspace.
  4. Delete the workspace when you are done.

A throwaway workspace you can delete is what makes testing without a sandbox safe.

Tip: Use readonly for anything that only reads. It cannot damage real data even if your harness has a bug.