Dashboard
Documentation/Integrations

Server integrations

Send submissions from a backend with an environment-specific API key.

Create an API key

Open Forms & APIs, switch to the intended environment, and select the API Key tab. Generate a key and store it in a server environment variable. A key belongs to one workspace and environment.

Use x-api-key for submission authentication. Never embed a workspace API key in a public HTML form or frontend bundle.

Send from your server

POST to /api/v1/leads with a key to create an unassigned lead in the key's workspace. Include formSlug if the submission should belong to a particular form. The form and key must belong to the same workspace and environment.

Terminalbash
curl --request POST "https://server.infraly.online/api/v1/leads" \
  --header "Content-Type: application/json" \
  --header "x-api-key: $INFRALY_API_KEY" \
  --data '{"formSlug":"YOUR_FORM_SLUG","name":"Alex Rivera","email":"alex@example.com","message":"Sent from my server"}'

Production requests

Production workspaces require a configured Production Origin, including for server-to-server requests. A valid matching API key allows server requests that do not send Origin or Referer. If either header is sent, its value must match an allowed origin.

A key authenticated response can include leadId or spamId. Anonymous public form responses omit these internal identifiers.

Rotate a key

Regenerating a key invalidates the previous key. Update your server environment variable and redeploy your integration. Revoking a key prevents future requests using that key; existing lead records remain.

Infraly documentation