Skip to content

Developer API

Manage forms, submissions and stats programmatically over the Nisuform RPC API with a Bearer API key.

Create an API key

API key created dialog showing a Bearer key starting with nfa_ and a copy button
Keys are shown once at creation. Copy it straight into your secrets.

Open Account > Developer in the dashboard and create a key. Keys start with nfa_, are shown once at creation and are stored hashed. Treat them like passwords: put them in environment variables, never in client-side code.

Authentication

Send the key as a Bearer token on every request:

Authorization: Bearer nfa_YOUR_KEY

Endpoint and protocol

The API is a compact RPC surface at https://api.nisuform.dev/rpc. A procedure call is the base URL plus the procedure name:

  • GET procedures take their input as a URL-encoded JSON data query parameter
  • POST procedures take their input as a JSON request body
  • Responses are plain JSON

Procedures

Forms

ProcedureMethodInputReturns
forms.listGETnone{ forms }
forms.createPOST{ name }Form
forms.getGET{ id }Form
forms.updatePOST{ id, ...fields }Form
forms.deletePOST{ id }{ ok: true }
forms.regenerateKeyPOST{ id }Form

forms.update accepts name, status (active or paused), emoji, notifyEnabled, notifyEmail, notifySubject, notifyFromName and redirectUrl. All fields are optional.

Submissions

ProcedureMethodInputReturns
submissions.listGET{ formId, filter?, limit?, offset? }{ items, total, unreadCount }
submissions.getGET{ formId, id }Submission
submissions.setFlagsPOST{ formId, id, read?, starred?, isSpam? }Submission
submissions.deletePOST{ formId, id }{ ok: true }

filter is one of all, unread, starred, spam. limit is 1 to 100, default 20.

Stats

ProcedureMethodInputReturns
stats.overviewGET{ days?, formId? }{ totals, series }

days is 7, 30 or 90. totals includes accepted submissions and spam blocked; series is a daily count array.

API keys

ProcedureMethodInputReturns
developer.keys.listGETnone{ keys }
developer.keys.createPOST{ name }Key with key value, shown once
developer.keys.revokePOST{ id }{ ok: true }

Examples

List your forms:

curl "https://api.nisuform.dev/rpc/forms.list?data={}" \
  -H "Authorization: Bearer nfa_YOUR_KEY"

Create a form:

curl -X POST "https://api.nisuform.dev/rpc/forms.create" \
  -H "Authorization: Bearer nfa_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Contact form"}'

Read the latest submissions for a form:

curl "https://api.nisuform.dev/rpc/submissions.list?data=%7B%22formId%22%3A%22FORM_ID%22%2C%22limit%22%3A5%7D" \
  -H "Authorization: Bearer nfa_YOUR_KEY"

Errors

Errors return a JSON body with a code and a matching HTTP status:

StatusCodeCause
400BAD_REQUESTInvalid input, check field formats
401UNAUTHORIZEDMissing, invalid or revoked key
404NOT_FOUNDUnknown form, submission or key id

NoteIDs are UUIDs. Copy them from the dashboard URL or from the forms.list response.