Skip to content

Authentication

FormSentry uses API keys to authenticate requests. Your API keys are available in your dashboard.

  1. Log in to app.formsentry.ai
  2. Navigate to SettingsAPI Keys
  3. Copy your API key
  4. Keep your API key secure - never commit it to version control

Include your API key in the request body when making API calls:

{
"apiKey": "fs_e7a9c4b1f0d6a2c89e5b3d7f4a1c6e2b9085df3a9c4e7b1a6d2f508c9e3b4",
"formId": "your-form-id",
"payload": {
// your form data
}
}

Never hardcode API keys in your source code. Use environment variables instead:

// ✅ Good
const apiKey = process.env.FORMSENTRY_API_KEY;
// ❌ Bad
const apiKey = "fs_e7a9c4b1f0d6a2c89e5b3d7f4a1c6e2b9085df3a9c4e7b1a6d2f508c9e3b4";

Use Different Keys for Different Environments

Section titled “Use Different Keys for Different Environments”

Create separate API key/formID combinations for:

  • Development
  • Staging
  • Production

This allows you to rotate keys without affecting other environments.

For enhanced security, rotate your API keys periodically:

  1. Create a new API key
  2. Update your application
  3. Test thoroughly
  4. Revoke the old key

The verify endpoint is rate limited on a per-form, per-IP basis using a token bucket algorithm. You can configure the burst capacity and refill rate for each form in the dashboard. See Rate Limiting for full details.

{
"error": "Invalid API key",
"code": "INVALID_API_KEY",
"status": 401
}