Skip to Content
API ReferenceAuthentication

Authentication

All Formtorch API requests require a Bearer token in the Authorization header.

API access requires a Starter or Pro plan. Requests from Free accounts receive 403 plan_required.

Generating an API key

  1. Sign in to app.formtorch.com 
  2. Go to SettingsAPI Keys
  3. Click Create new key
  4. Give it a name and click Create
  5. Copy the key. It’s only shown once.

Store the key in an environment variable. Never commit it to version control.

Using the API key

Include it as a Bearer token in the Authorization header:

curl https://api.formtorch.com/v1/forms \ -H "Authorization: Bearer YOUR_API_KEY"

In JavaScript:

const res = await fetch("https://api.formtorch.com/v1/forms", { headers: { Authorization: `Bearer ${process.env.FORMTORCH_API_KEY}`, }, });

Key scopes

Keys generated from the dashboard have read access to your account’s forms and submissions. Write endpoints and scoped keys are planned for a future release.

Revoking a key

Go to SettingsAPI Keys and click Revoke next to the key. Revoked keys stop working immediately.

If you suspect a key has been compromised, revoke it immediately and generate a replacement. Requests made with a revoked key return 401 Unauthorized.

Error responses

StatusCodeMeaning
401 UnauthorizedunauthorizedMissing or malformed API key
403 Forbiddenplan_requiredAPI access requires Starter or Pro plan
403 ForbiddenforbiddenValid key but insufficient permissions
Last updated on