API reference

API reference

Make contact forms for a static website with an hmuform API key or with no account, then read submissions, send tests and check spam over REST.

The hmuform REST API is at https://app.hmuform.com/api. Send your API key in the header Authorization: Bearer $HMUFORM_API_KEY. Request and response bodies are JSON, and each time in a JSON response is a Unix time in milliseconds. Two kinds of response have no JSON: Export the submissions to CSV returns a CSV file, and a call that answers 204 has an empty body. The form on your site does not use the API or a key: it posts to its form link, https://hmuform.com/f/YOUR_FORM_ID.

The shell examples use these variables: $HMUFORM_API_KEY from Get an API key, $WORKSPACE_ID from Get the workspace ID, $FORM_ID from List the forms, $EMAIL_ID from List the recipient addresses, $SUBMISSION_ID (the id of a submission) and $DELIVERY_ID (the id of a delivery) from Read the submissions, and $FORM_URL and $CLAIM from Set up a form with no account. Set each one before you run an example, for example export FORM_ID=k3x9p2abcd.

Get an API key

Make an API key in the hmuform dashboard:

  1. Sign in at app.hmuform.com.
  2. Open Settings of the workspace. Under API keys, click New key, type a name (for example Claude Code) and click Create key.
  3. Copy the key. It starts with hmu_, and the dashboard shows it only once.
  4. Keep the key in an environment variable, for example HMUFORM_API_KEY.
Request
curl https://app.hmuform.com/api/me \
  -H "Authorization: Bearer $HMUFORM_API_KEY"

A valid key answers 200 with the response of Get the workspace ID, and a wrong key answers 401 with unauthorized. An API key works for one workspace, and it acts as the person who made it. API keys are free on all plans. The key is a secret: never put it in front-end code, in the HTML form or in a commit.

  • To revoke a key, click its revoke button in Settings. The key stops working at once. Only the owner of the workspace or the person who made the key can revoke it.
  • A key also stops working when the person who made it leaves the workspace.
  • An API key cannot make, list or revoke keys, manage members, invitations or billing, delete forever or delete the account. These calls answer 403 with forbidden. Use the dashboard for them.

For coding agents

A coding agent adds an hmuform contact form to a site in one of three ways. Use the first one that fits:

The agent has What the agent does
A form link from the user Puts the form link in the action of the form.
The hmuform MCP server Makes the form with the create_form tool and puts its form link in the action. See MCP server.
HMUFORM_API_KEY in the environment Makes the form with Make a form and puts its url in the action.
No form link and no key Gets a form link with Set up a form with no account, puts formUrl in the action and gives activateUrl to the user.

The HTML of the form is in Add a contact form to a static website. Never write the API key or the activation link into a file of the site or a commit. Activation already makes a test. To check the form again, an agent with an API key uses Send a test, which does not count toward the monthly limit. A form link from Set up a form with no account answers 403 with activation_required until the user turns on the form, so wait for the activation before you test the delivery.

GET https://app.hmuform.com/api/forms/new-link gives a coding agent a new form link and an activation link. The call needs no account and no API key.

Request
curl "https://app.hmuform.com/api/forms/new-link?name=bakery-bloom.com"
Response 200
{
  "formUrl": "https://hmuform.com/f/k3x9p2abcdm7q4w8z2nh6t5r",
  "activateUrl": "https://app.hmuform.com/activate?id=k3x9p2abcdm7q4w8z2nh6t5r&claim=v8d3k9w2m4q7x5p2h6n3t8c4zr&name=bakery-bloom.com"
}
  1. Put formUrl in the action of the form on the site.
  2. Give activateUrl to the user in the chat, and tell the user: “Setup is done. Open this link to sign in and turn on your form. It cannot send messages until then.”
  3. The user opens the activation link, signs in and clicks Turn on form.
  • name is optional, up to 100 characters. It is the name of the form, for example the domain of the site. The activation page shows it. A longer name answers 400 with invalid_request.
  • Each call gives a new form ID. We store nothing for the call, and the links do not expire.
  • In activateUrl, the id parameter is the form ID and the claim parameter is the claim. An agent with an API key can turn on the form link itself with these two values: see Turn on a form link with an API key.
  • The first activation decides the owner: the form goes to the workspace that the person chooses when they turn it on. So the agent puts activateUrl only in the chat, never in a file or a commit.

Before the user turns on the form

The form link refuses each submission with 403 and activation_required. We do not store the submission and send no email, so a submission that a visitor sends before activation is lost. $FORM_URL is the formUrl from Set up a form with no account.

Request
curl -X POST "$FORM_URL" \
  -d "email=ann@example.com" \
  -d "message=Hi"
Response 403
{ "ok": false, "error": "activation_required" }

This answer tells the agent that the form link is correct. A form ID that we did not issue answers 404 with form_not_found. A browser that posts the form gets the page “Message not sent” with “Site owner: open the activation link from your coding agent.”

After the user turns on the form

The activation page makes the form at the same form ID, so the site needs no change. The page shows the form name and the address that gets the submissions: the address of the person who signs in. Then we make one test submission, and the dashboard opens it with its delivery result. The delivery of the test has the normal checks, so a limit or the state of the address can skip the delivery of the test. After that, the form link takes submissions as any other form does.

  • When a member of the workspace of the form clicks Turn on form again, we make nothing new. The dashboard opens the form, or the Trash page of the workspace when the form is in Trash. For a person who is not a member, the page says “This link was already used.”
  • The form ID is never free again, also after the form is deleted forever. Then the form link answers 404 with form_not_found.
  • A turned-on form counts toward the daily form cap of Make a form.

Send a submission to a form link

Post the fields of the form to https://hmuform.com/f/$FORM_ID. The form link needs no API key and accepts requests from any website (CORS *). $FORM_ID is the last part of the form link, on the Setup tab of the form in the dashboard.

Request
curl -X POST https://hmuform.com/f/$FORM_ID \
  -d "name=Ann" \
  -d "email=ann@example.com" \
  -d "message=Hi"
Response 200
{ "ok": true }

The form link accepts application/x-www-form-urlencoded, multipart/form-data and application/json. In a JSON object, an array gives one field for each item, and a number or a boolean becomes text.

The form link answers in JSON to each client that does not ask for HTML: a request with Content-Type: application/json, a request with Accept: application/json, or a request with an Accept header that does not include text/html. So curl and a fetch with no headers get JSON. A browser that posts an HTML <form> gets HTML:

  • The thank-you page (200), or a redirect (303).
  • The redirect in the settings of the form wins (see Set the redirect of a form).
  • Else, the redirect or _next field of the form, only when its host is the same as the host of the site that posted (the Origin header, or the Referer header when there is no Origin). We ignore a link to another host, a subdomain or another port.
  • Spam gets the same page or redirect as a submission in the inbox.
  • A refused post gets an error page with the same status code as the JSON error: “Slow down” for rate_limited, “Form not found” for form_not_found, and “Message not sent” for the other errors.

Limits of the form link:

Limit Value
Posts from one IP address to one form 10 a minute
Body of a request that is not multipart 64 KB
Text parts of a multipart request, together 64 KB
Multipart request: all parts together, with or without files 100 MB
Parts of a multipart request 1,000. A request with more parts answers 400 with invalid_body.
Text fields in a submission 100. We drop the text fields after the 100th.
File names in a submission 100, apart from the text fields. We drop the files after the 100th.
Field name or file name 200 characters. We cut a longer name.
Field value 20,000 characters. We cut a longer value.

Over the monthly limit of the plan, we keep each submission and do not email it. A workspace over its limit takes 100 submissions over the limit in 24 hours. This cap counts the submissions that go to the inbox, also a submission that only the content check caught when Spam is full. Spam does not count. The form link refuses the 101st submission and each later one with 429 and form_full, and stores nothing.

A form link error has the body { "ok": false, "error": "<code>" }:

Status error Why
400 invalid_body We cannot read the body, or a multipart request has more than 1,000 parts.
400 empty All fields are empty, and there is no file.
403 activation_required Nobody turned on this form yet. See Set up a form with no account.
404 form_not_found No form has this ID, or the form is in Trash.
413 too_large The body of a request that is not multipart, or the text parts of a multipart request together, are over 64 KB. Or all parts of a multipart request together are over 100 MB.
429 rate_limited This IP address sent 10 posts to this form in the last minute.
429 form_full The workspace is over its monthly limit and already took 100 submissions over the limit in the last 24 hours.

Field names

Any field name works. A form from Formspree or Web3Forms works after you change its action to the form link. Only these field names have a special effect. Case does not matter.

Field Effect
subject, _subject Sets the email subject, up to 120 characters. Not in the email body.
from_name Sets the sender name of the email as “from_name via form name”, up to 60 characters. Not in the email body.
email, e-mail, replyto, _replyto, reply_to Sets Reply-To to the first valid address.
_gotcha, botcheck Honeypot. Not stored. A value puts the submission in Spam. false or 0 in JSON is not a value.
redirect, _next Not stored. Sends the visitor to this link, only on the site that posted. The redirect in the settings of the form wins.
access_key, h-captcha-response, g-recaptcha-response, cf-turnstile-response Not stored and not emailed.

We do not store other fields whose name starts with _. Without a subject field, the subject is “New message from Ann”, with the value of name, full_name, fullname, your-name, first_name or the email field. When these fields are empty, the subject is “New message”.

Files

hmuform does not save files. A form with <input type="file"> still works: we keep the submission without its files, and the email and the dashboard name each file that we did not save.

Request
curl -X POST https://hmuform.com/f/$FORM_ID \
  -F "email=ann@example.com" \
  -F "cv=@cv.pdf"

Replace cv.pdf with a file on your computer.

Response 200
{ "ok": true, "filesNotSaved": [{ "field": "cv", "name": "cv.pdf" }] }

The size limits of a request with files are in Send a submission to a form link. We skip the bytes of each file. An empty file input is not a file. A submission with only files and no text is kept. In the API, files of a submission lists the same files (see Read the submissions).

Spam

We check each submission for spam on the server, so a visitor never solves a CAPTCHA. Spam that we catch goes to the Spam folder of the form, is not emailed and does not count toward the monthly limit. In a JSON response, the form link says that the submission is spam:

Request
curl -X POST https://hmuform.com/f/$FORM_ID \
  -d "message=Hi" \
  -d "_gotcha=filled"
Response 200
{ "ok": true, "spam": true, "reason": "honeypot" }
reason When
honeypot The hidden _gotcha or botcheck field has a value.
link_markup A field has link code: [url=, [url], [link= or <a … href.
link_in_name A name field (name, full_name, fullname, your-name, your_name, first_name, firstname, last_name, lastname) has http://, https:// or www..
repeated The same fields and file names are already 3 times in the inbox of the form in the last 24 hours.
content An AI check of the text finds spam that gets past the other checks, for example sales pitches, link requests, scams or phishing. It counts only a probability of 90% or more. The check gets each field that is not empty and does not hold only an email address. When the check is not sure, fails, or the names and values of those fields have more than 8,000 characters together, the AI check does not mark the submission as spam.
marked A person or an API key marked the submission as spam (see Mark submissions as spam).
  • A browser that posts the form gets the same thank-you page or redirect as for a submission in the inbox, so a sender cannot see that a submission went to Spam.
  • We delete spam 30 days after it goes to Spam.
  • A form keeps 100 spam submissions in 24 hours. We answer more spam the same way and do not store it. When Spam is full, a submission that only the content check caught goes to the inbox, as a submission that passes the checks does: we email it with the normal delivery checks, and it counts toward the monthly limit.
  • Spam that gets past the checks counts toward the monthly limit. “Mark as spam” does not lower the count.
  • The User-Agent is not a check, so a post from curl gets the same checks as a post from a browser. Change the text in each test, because the 4th copy of the same fields in 24 hours is repeated.
  • A submission that passes the spam checks can still get 429 with form_full when the workspace is over its monthly limit (see Send a submission to a form link).

Get the workspace ID

GET /api/me returns the workspace of your API key. Its id is the $WORKSPACE_ID of the other calls. The call needs only $HMUFORM_API_KEY.

Request
curl https://app.hmuform.com/api/me \
  -H "Authorization: Bearer $HMUFORM_API_KEY"
Response 200
{
  "email": "hello@studio-sun.com",
  "workspaces": [{ "id": "w7k2m9q4x3np", "name": "hello's workspace", "role": "owner", "plan": "free", "seat": true }],
  "invitations": []
}
  • email is the address of the person who made the key.
  • role is owner or member. plan is free, pro or agency.
  • seat is false when the person is a member over the seats of the plan. Then the other calls answer 403 with no_seat.

Read the workspace

GET /api/workspaces/$WORKSPACE_ID returns the workspace with its plan, its billing state, its fit to the limits of the plan, its members and its open invitations. $WORKSPACE_ID comes from Get the workspace ID.

Request
curl https://app.hmuform.com/api/workspaces/$WORKSPACE_ID \
  -H "Authorization: Bearer $HMUFORM_API_KEY"
Response 200
{
  "workspace": { "id": "w7k2m9q4x3np", "name": "hello's workspace", "plan": "free", "role": "owner" },
  "plan": {
    "name": "Free",
    "limits": { "submissions": 250, "recipients": 1, "linkedEmails": 2, "seats": 1 },
    "prices": { "month": 0, "year": 0 }
  },
  "billing": {
    "interval": null,
    "status": null,
    "currentPeriodEnd": null,
    "cancelsAt": null,
    "subscribed": false,
    "canManage": false
  },
  "fit": {
    "plan": "free",
    "linkedEmails": { "used": 1, "limit": 2 },
    "recipients": { "limit": 1, "forms": [] },
    "seats": { "used": 1, "limit": 1 },
    "paused": false,
    "fits": true
  },
  "members": [
    {
      "userId": "u7k2m9q4x3npa8c5d2f6g3h9j4k7m2n5",
      "email": "hello@studio-sun.com",
      "role": "owner",
      "joinedAt": 1793836800000,
      "you": true,
      "seat": true
    }
  ],
  "invitations": []
}
Field Meaning
workspace.role The role of the person who made the key: owner or member.
plan The name, the limits and the prices in USD of the plan. submissions is the monthly limit, and recipients is the limit for each form.
billing.interval, billing.status, billing.currentPeriodEnd, billing.cancelsAt The billing interval (month or year), the Paddle subscription status, the end of the current period and the time of a planned cancel. Each one is null when the workspace never had a subscription.
billing.subscribed true while the workspace has a subscription that is not canceled.
billing.canManage true when the workspace has a Paddle customer, so the owner can open the customer portal in the dashboard.
fit.linkedEmails The linked emails of the workspace and the limit of the plan.
fit.recipients.forms The forms that are not in Trash and have more recipients than the plan allows, with used. A form in Trash does not count.
fit.paused true when the workspace has more linked emails, or a form that is not in Trash has more recipients, than the plan allows. Then each new delivery is skipped with plan_limit, unless the monthly limit skips it first with over_limit or locked. Send deliveries again changes nothing. Retries that already wait still run.
fit.fits true when the workspace is in three limits of the plan: the linked emails, the recipients for each form that is not in Trash, and the seats. The monthly count has no effect on it: it is in usage of List the forms.
members The members, oldest first. you is true for the person who made the key. seat is false for a member over the seats of the plan.
invitations The open invitations, with id, email and sentAt.

Rename the workspace

PATCH /api/workspaces/$WORKSPACE_ID changes the name of the workspace. Only a key of the owner can rename the workspace. $WORKSPACE_ID comes from Get the workspace ID.

Request
curl -X PATCH https://app.hmuform.com/api/workspaces/$WORKSPACE_ID \
  -H "Authorization: Bearer $HMUFORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Studio Sun"}'
Response 200
{ "workspace": { "id": "w7k2m9q4x3np", "name": "Studio Sun", "plan": "free", "role": "owner" } }
  • name has 1 to 100 characters. We change each run of spaces and line breaks to one space.
  • A key of a member answers 403 with forbidden.

Make a form

POST /api/workspaces/$WORKSPACE_ID/forms makes a form and returns its form link in url. Put url in the action of the HTML form. $WORKSPACE_ID comes from Get the workspace ID.

Request
curl -X POST https://app.hmuform.com/api/workspaces/$WORKSPACE_ID/forms \
  -H "Authorization: Bearer $HMUFORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "bakery-bloom.com"}'
Response 201
{ "id": "k3x9p2abcd", "url": "https://hmuform.com/f/k3x9p2abcd", "name": "bakery-bloom.com" }
Field Required Value
name Yes 1 to 100 characters, for example the domain of the site. It is the sender name of the emails.
recipient No The address that gets the submissions of the form. Without it, the recipient is the address of the person who made the key.
id With claim The form ID from an activateUrl. See Turn on a form link with an API key.
claim With id The claim from the same activateUrl.
  • A new recipient address gets a confirmation email and gets submissions only after the person confirms, as Add a recipient address says. It counts toward the linked emails of the plan. An address that is already in the workspace gets no new email. The email caps are in Add a recipient address.
  • A workspace can make 20 forms in 24 hours. Forms in Trash count. More answer 429 with too_many_forms.

Turn on a form link with an API key

Send id and claim from an activateUrl to turn on that form link in the workspace of the key, as Turn on form on the activation page does. The form gets the ID that the site already uses, and we make one test submission and return its testId. The delivery of the test has the normal checks, so a limit or the state of the recipient can skip the delivery of the test (status skipped). In the activateUrl from Set up a form with no account, take the id parameter as $FORM_ID and the claim parameter as $CLAIM.

Request
curl -X POST https://app.hmuform.com/api/workspaces/$WORKSPACE_ID/forms \
  -H "Authorization: Bearer $HMUFORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"bakery-bloom.com\", \"id\": \"$FORM_ID\", \"claim\": \"$CLAIM\"}"
Response 201
{
  "id": "k3x9p2abcdm7q4w8z2nh6t5r",
  "url": "https://hmuform.com/f/k3x9p2abcdm7q4w8z2nh6t5r",
  "name": "bakery-bloom.com",
  "testId": "s8f2k4m9q3hx7c2w"
}
  • testId is the submission ID of the test. Its result is in Read the submissions.
  • When the workspace of the key already turned on this form ID, the answer is 200 with id, url, name, workspaceId and trashed, and we make nothing new. trashed is true when the form is in Trash in the workspace of the key.
  • When another workspace turned on this form ID, or the form was deleted forever, the answer is 409 with link_used.
  • A wrong claim, or id or claim alone, answers 400 with invalid_link.
  • A refusal with too_many_forms keeps the link valid, so you can try again later.

Set the redirect of a form

PATCH /api/forms/$FORM_ID/settings sets the page that a browser goes to after it posts the form. $FORM_ID is the id from List the forms.

Request
curl -X PATCH https://app.hmuform.com/api/forms/$FORM_ID/settings \
  -H "Authorization: Bearer $HMUFORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"redirectUrl": "https://bakery-bloom.com/thanks"}'
Response 200
{ "settings": { "redirectUrl": "https://bakery-bloom.com/thanks" } }

GET /api/forms/$FORM_ID/settings reads the settings:

Request
curl https://app.hmuform.com/api/forms/$FORM_ID/settings \
  -H "Authorization: Bearer $HMUFORM_API_KEY"
Response 200
{ "settings": { "redirectUrl": "https://bakery-bloom.com/thanks" } }
  • redirectUrl is a full http or https link of up to 2,048 characters, or null. A new form has null.
  • The body is a JSON Merge Patch: a field that you leave out does not change, and null clears it. {} changes nothing.
  • An unknown field, a relative link or another protocol answers 400 with invalid_request.
  • The redirect of the settings goes to any host, and it wins over the redirect and _next fields. When redirectUrl is null, a valid redirect or _next field still works, and else the browser gets our thank-you page. A JSON client never gets a redirect. See Send a submission to a form link.

List the forms

GET /api/workspaces/$WORKSPACE_ID/forms lists the forms of the workspace, newest first, with their submission counts and the count of this month toward the monthly limit. $WORKSPACE_ID comes from Get the workspace ID. The id of each form is the $FORM_ID of the other calls.

Request
curl https://app.hmuform.com/api/workspaces/$WORKSPACE_ID/forms \
  -H "Authorization: Bearer $HMUFORM_API_KEY"
Response 200
{
  "forms": [
    {
      "id": "k3x9p2abcd",
      "name": "bakery-bloom.com",
      "url": "https://hmuform.com/f/k3x9p2abcd",
      "createdAt": 1793836800000,
      "total": 3,
      "thisMonth": 3,
      "lastSubmissionAt": 1793923200000,
      "undelivered": 0
    }
  ],
  "usage": { "used": 3, "limit": 250 },
  "trash": 0
}
Field Meaning
total The submissions in the inbox of the form now, not in Trash.
thisMonth The submissions of the form that counted toward the monthly limit this month. A move to Trash does not lower it, so it can be larger than total.
lastSubmissionAt The time of the newest submission that counted toward the monthly limit, or null.
undelivered The deliveries of submissions in the inbox that failed or were skipped, except deliveries skipped with removed. Tests do not count.
usage.used The submissions of the workspace that counted toward the monthly limit this month (UTC), also from deleted forms.
usage.limit The monthly limit of the plan. The limits of each plan are on hmuform.com/pricing.
trash The number of forms in Trash.

Add a recipient address

POST /api/workspaces/$WORKSPACE_ID/emails adds an address to the workspace and sends it a confirmation email. The address gets submissions only after the person opens the link in that email and clicks Confirm my email on the page that opens. $WORKSPACE_ID comes from Get the workspace ID.

Request
curl -X POST https://app.hmuform.com/api/workspaces/$WORKSPACE_ID/emails \
  -H "Authorization: Bearer $HMUFORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email": "owner@bakery-bloom.com"}'
Response 201
{ "email": { "id": "e4p8w2k9mz", "email": "owner@bakery-bloom.com", "confirmed": false, "unsubscribed": false, "member": false } }
  • The confirmation link works for 7 days. The address counts toward the linked emails of the plan from the time that you add it.
  • The address of a workspace member is confirmed at once, gets no email and does not count toward the linked emails.
  • To send the submissions of a form to the address, see Choose the recipients of a form.
  • Errors: 409 exists when the address is already in the workspace, 403 plan_limit with "limit": "linkedEmails", and 429 for the email caps.
  • Email caps for confirmation emails and invitations together: 10 in 24 hours for each workspace and for each sender on Free, 50 on Pro and Agency (too_many_emails). 3 in 24 hours to one address (too_many_emails_to_address). 1 minute between two emails to one address (rate_limited).

Send the confirmation email again

POST /api/workspaces/$WORKSPACE_ID/emails/$EMAIL_ID/resend sends a new confirmation email to an address that is not confirmed. $WORKSPACE_ID comes from Get the workspace ID, and $EMAIL_ID is the id of the address from List the recipient addresses.

Request
curl -X POST https://app.hmuform.com/api/workspaces/$WORKSPACE_ID/emails/$EMAIL_ID/resend \
  -H "Authorization: Bearer $HMUFORM_API_KEY"
Response 204
204 No Content
  • The new link works as long as the first one (see Add a recipient address), and the link of the earlier email stops working.
  • An address that clicked “Stop these emails” can get a confirmation email too. The confirmation ends the stop.
  • A confirmed address that did not stop the emails answers 409 with already_confirmed. An unknown address ID answers 404 with not_found.
  • The email caps of Add a recipient address apply, and answer 429.

List the recipient addresses

GET /api/workspaces/$WORKSPACE_ID/emails lists the addresses of the workspace, the forms that send to each address and the limits of the plan. The id of each address is the $EMAIL_ID of the other calls. $WORKSPACE_ID comes from Get the workspace ID.

Request
curl https://app.hmuform.com/api/workspaces/$WORKSPACE_ID/emails \
  -H "Authorization: Bearer $HMUFORM_API_KEY"
Response 200
{
  "emails": [
    {
      "id": "h9c4t2w7ka",
      "email": "hello@studio-sun.com",
      "confirmed": true,
      "unsubscribed": false,
      "member": true,
      "forms": [{ "id": "k3x9p2abcd", "name": "bakery-bloom.com", "onlyRecipient": true }]
    },
    {
      "id": "e4p8w2k9mz",
      "email": "owner@bakery-bloom.com",
      "confirmed": false,
      "unsubscribed": false,
      "member": false,
      "forms": []
    }
  ],
  "limits": { "recipients": 1, "linkedEmails": 2 }
}
  • unsubscribed is true when the person clicked “Stop these emails” in an email. That address gets no submissions until it confirms again.
  • onlyRecipient is true when the address is the only recipient of that form. Forms in Trash are not in forms.
  • limits.recipients is the number of recipients for each form, and limits.linkedEmails the number of linked emails of the plan.

Choose the recipients of a form

PUT /api/forms/$FORM_ID/recipients sets the recipients of a form. Send the IDs of all recipients: the list replaces the old list. $FORM_ID is the id from List the forms. $EMAIL_ID is the id of an address from List the recipient addresses.

Request
curl -X PUT https://app.hmuform.com/api/forms/$FORM_ID/recipients \
  -H "Authorization: Bearer $HMUFORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"emailIds\": [\"$EMAIL_ID\"]}"
Response 200
{ "recipients": [{ "id": "e4p8w2k9mz", "email": "owner@bakery-bloom.com", "confirmed": false, "unsubscribed": false, "member": false }] }
  • emailIds has 1 to 100 IDs of addresses in the workspace. An ID that is not in the workspace answers 400 with invalid_request.
  • A list that adds an address answers 403 with plan_limit and "limit": "recipients" when it has more addresses than the plan allows for each form. This is also true for a list that is shorter than the old list. A list that adds no address always works, also when it is over the limit after a downgrade.
  • A recipient that did not confirm its address gets no submissions. Its deliveries are skipped with not_confirmed.

Remove a recipient address

DELETE /api/workspaces/$WORKSPACE_ID/emails/$EMAIL_ID removes an address from the workspace and from all its forms. $WORKSPACE_ID comes from Get the workspace ID, and $EMAIL_ID is the id of the address from List the recipient addresses.

Request
curl -X DELETE https://app.hmuform.com/api/workspaces/$WORKSPACE_ID/emails/$EMAIL_ID \
  -H "Authorization: Bearer $HMUFORM_API_KEY"
Response 204
204 No Content
  • The address that is the only recipient of a form answers 409 with last_recipient. Give the form another recipient first with Choose the recipients of a form. A form in Trash does not block the removal.
  • Only the owner or that member can remove the address of a member. Another key answers 403 with member_address.
  • The address of a member that clicked “Stop these emails” stays, so that the stop stays. It answers 409 with member_unsubscribed.
  • Retries to the removed address are not sent. Their deliveries are skipped with removed.
  • An address that is not the address of a member must confirm again when you add it again. An unknown address ID answers 404 with not_found.

Send a test

POST /api/forms/$FORM_ID/test sends a test to the recipients of the form and returns the result for each recipient. Send the fields as one JSON object of text values, as a form sends them. $FORM_ID is the id from List the forms.

Request
curl -X POST https://app.hmuform.com/api/forms/$FORM_ID/test \
  -H "Authorization: Bearer $HMUFORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Ann", "email": "ann@example.com", "message": "Test"}'
Response 201
{
  "id": "s8f2k4m9q3hx7c2w",
  "deliveries": [
    {
      "id": "d2m7k4p9x3vn8f5j",
      "kind": "email",
      "target": "owner@bakery-bloom.com",
      "status": "skipped",
      "attempts": 0,
      "error": "not_confirmed",
      "nextAttemptAt": null,
      "updatedAt": 1793923200000
    }
  ]
}
  • The test goes through the same delivery as a real submission, and the email subject starts with [Test]. The response comes after the first try. The statuses are in Delivery status.
  • A test skips the spam checks and does not count toward the monthly limit. In the submissions, test is true.
  • When the workspace is at or over its monthly limit, a test is not sent: its deliveries are skipped with over_limit on Pro and Agency, or with locked on Free.
  • A form takes 10 tests in 24 hours, also tests that are now in Trash. More answer 429 with too_many_tests.
  • A body with no value answers 400 with invalid_request. A body over the size limit for a body that is not multipart (see Send a submission to a form link) answers 413 with invalid_request.

Read the submissions

GET /api/forms/$FORM_ID returns the form and its submissions, newest first, 50 for each page. $FORM_ID is the id from List the forms.

Request
curl https://app.hmuform.com/api/forms/$FORM_ID \
  -H "Authorization: Bearer $HMUFORM_API_KEY"
Response 200
{
  "form": {
    "id": "k3x9p2abcd",
    "name": "bakery-bloom.com",
    "url": "https://hmuform.com/f/k3x9p2abcd",
    "workspaceId": "w7k2m9q4x3np",
    "recipients": [{ "id": "e4p8w2k9mz", "email": "owner@bakery-bloom.com", "confirmed": true, "unsubscribed": false, "member": false }],
    "createdAt": 1793836800000
  },
  "submissions": [
    {
      "id": "s8f2k4m9q3hx7c2w",
      "fields": [["email", "ann@example.com"], ["message", "Hi"]],
      "files": [],
      "locked": false,
      "folder": "inbox",
      "spamReason": null,
      "test": false,
      "deliveries": [
        {
          "id": "d2m7k4p9x3vn8f5j",
          "kind": "email",
          "target": "owner@bakery-bloom.com",
          "status": "sent",
          "attempts": 1,
          "error": null,
          "nextAttemptAt": null,
          "updatedAt": 1793923201000
        }
      ],
      "createdAt": 1793923200000,
      "deletedAt": null
    }
  ],
  "spam": 0,
  "trash": 0,
  "locked": 0,
  "next": null
}
Query Value
folder inbox (the default), spam or trash.
before, beforeId The createdAt and the id from next, to get the next page.

To get the next page, set $NEXT_CREATED_AT and $NEXT_ID to next.createdAt and next.id when next is not null. Use the same folder as for the first page, because the cursor marks a place in that folder. For a cursor from Spam or Trash, change folder=inbox to folder=spam or folder=trash.

Request
curl "https://app.hmuform.com/api/forms/$FORM_ID?folder=inbox&before=$NEXT_CREATED_AT&beforeId=$NEXT_ID" \
  -H "Authorization: Bearer $HMUFORM_API_KEY"
Field Meaning
id The submission ID, the $SUBMISSION_ID of the calls that move submissions.
fields The fields as [name, value] pairs, in the order of the form.
files The files that the visitor attached and that we did not save, as { "field", "name" }.
locked true for a submission over the monthly limit of Free. Then fields and files are empty until an upgrade. We delete a locked submission 30 days after it arrives.
folder inbox or spam. In Trash, it is the folder that a restore puts the submission back in.
spamReason A reason from Spam, or null.
deliveries One delivery for each recipient. See Delivery status.
deletedAt The time of the move to Trash, or null.
spam, trash The number of submissions in Spam and in Trash.
locked (top level) The number of locked submissions in the inbox.

A form in Trash answers 404 with not_found.

Export the submissions to CSV

GET /api/forms/$FORM_ID/export returns all submissions of one folder of a form as a CSV file, newest first. $FORM_ID is the id from List the forms.

Request
curl "https://app.hmuform.com/api/forms/$FORM_ID/export?folder=inbox" \
  -H "Authorization: Bearer $HMUFORM_API_KEY" \
  -o submissions.csv
Response 200
Date,Status,email,phone,name
2026-11-02T10:00:00Z,Sent,bob@example.com,555 0100,
2026-11-01T09:30:00Z,Retrying,ann@example.com,,Ann
  • folder is inbox (the default), spam or trash. There are no pages: the file has all submissions of the folder.
  • The response is text/csv; charset=utf-8 with a byte order mark, as the attachment <form-slug-or-id>-<folder>-<YYYY-MM-DD>.csv. The slug is the form name in lowercase, with only the letters a to z, digits, . and -: we remove accents and other characters, and each run of spaces, _ and - becomes one -. A form name with no such character gives the form ID. The date is the day of the export in UTC.
  • Date is the time in UTC. Status is the worst delivery state of the submission: Failed, Unsubscribed, Not confirmed, Over limit, Paused, Not sent, Retrying, Sending or Sent. It is empty for a submission with no delivery, for example spam.
  • Then there is one column for each field name, in the order in which the names first come. A file is in the column of its field, with its file name. Values of a field name that repeats are joined with , .
  • A value that starts with =, +, -, @, a tab or a carriage return gets a ' first, so a spreadsheet does not run it as a formula.
  • A locked submission has only its date and status.

Delivery status

Each submission in the inbox gets one delivery for each recipient of the form. A delivery has kind email, the recipient address in target, and one of these values in status:

status Meaning
pending We send it, or we try again at nextAttemptAt. error has the code of the last failed try.
sent The email service accepted the email.
failed All 6 tries failed. error has the code of the last try.
skipped We did not send it. error has the reason.

We try again 1 minute, 5 minutes, 30 minutes, 2 hours and 8 hours after a failed try. A skipped delivery has one of these reasons in error:

error Why
not_confirmed The recipient did not confirm the address yet.
unsubscribed The recipient clicked “Stop these emails”.
removed The address was not a recipient of the form any more at the time of the send.
over_limit The workspace was over its monthly limit on Pro or Agency.
locked The workspace was over its monthly limit on Free. The submission is locked (see Read the submissions).
plan_limit The workspace has more linked emails, or a form that is not in Trash has more recipients, than the plan allows.
spam The submission moved to Spam before the send.
trashed The submission or its form was in Trash at the time of the try.

Send deliveries again

POST /api/forms/$FORM_ID/deliveries/send-again sends failed or skipped deliveries again at once. Send 1 to 100 delivery IDs. $FORM_ID is the id from List the forms. $DELIVERY_ID is the id of a delivery from Read the submissions.

Request
curl -X POST https://app.hmuform.com/api/forms/$FORM_ID/deliveries/send-again \
  -H "Authorization: Bearer $HMUFORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"ids\": [\"$DELIVERY_ID\"]}"
Response 200
{ "queued": 1, "sent": 1, "overLimit": 0, "paused": false }
Field Meaning
queued The deliveries that went back to pending with 0 tries.
sent The queued deliveries that the email service accepted in this call. A delivery that fails again goes to the normal retries.
overLimit The deliveries among the IDs, of submissions in the inbox of the form, that are still skipped with locked, or with over_limit while the count of the month is at or above the monthly limit.
paused true when the workspace is over the linked emails or the recipients of its plan. Then nothing goes back, and the other counts are 0.
  • Only a delivery with status failed or skipped, of a submission in the inbox of the form, goes back. Other IDs change nothing.
  • We send it with the normal checks: a recipient that is still not confirmed is skipped with not_confirmed again.
  • A delivery with over_limit goes back only while the count of the month is under the monthly limit. A delivery with locked never goes back. It unlocks after an upgrade.

Mark submissions as spam, or as not spam

PATCH /api/forms/$FORM_ID/submissions moves submissions to Spam or to the inbox. Send 1 to 100 submission IDs and the folder. $FORM_ID is the id from List the forms. $SUBMISSION_ID is the id of a submission from Read the submissions.

Request
curl -X PATCH https://app.hmuform.com/api/forms/$FORM_ID/submissions \
  -H "Authorization: Bearer $HMUFORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"ids\": [\"$SUBMISSION_ID\"], \"folder\": \"inbox\"}"
Response 200
{ "moved": 1 }
  • folder is inbox or spam. moved counts the submissions that moved. A submission in Trash or in that folder already does not move.
  • To Spam: the reason becomes marked, and the pending deliveries become skipped with spam. The count toward the monthly limit does not change.
  • To the inbox: the deliveries that Spam stopped continue, and each recipient that has no delivery for the submission gets a new delivery. Failed deliveries and deliveries skipped for another reason do not change: use Send deliveries again.
  • To the inbox: a submission that did not count toward the monthly limit yet counts now, except a test. A submission counts only once. When the workspace is over its monthly limit, the new deliveries are skipped with over_limit or locked.

Move submissions to Trash

POST /api/forms/$FORM_ID/submissions/delete moves submissions to Trash. Send 1 to 100 submission IDs. $FORM_ID is the id from List the forms. $SUBMISSION_ID is the id of a submission from Read the submissions.

Request
curl -X POST https://app.hmuform.com/api/forms/$FORM_ID/submissions/delete \
  -H "Authorization: Bearer $HMUFORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"ids\": [\"$SUBMISSION_ID\"]}"
Response 200
{ "moved": 1 }
  • Trash keeps submissions and forms for 30 days, then we remove them. The count toward the monthly limit does not change.
  • Retries that come due while a submission is in Trash are not sent.
  • To remove submissions at once, use “Delete forever” in the dashboard. An API key cannot delete forever.

Restore submissions from Trash

POST /api/forms/$FORM_ID/submissions/restore takes submissions out of Trash. Send 1 to 100 submission IDs. $FORM_ID is the id from List the forms. $SUBMISSION_ID is the id of a submission from Read the submissions with ?folder=trash.

Request
curl -X POST https://app.hmuform.com/api/forms/$FORM_ID/submissions/restore \
  -H "Authorization: Bearer $HMUFORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"ids\": [\"$SUBMISSION_ID\"]}"
Response 200
{ "restored": 1 }
  • Each submission goes back to its folder. A submission in Spam starts its time in Spam again (see Spam).
  • The retries that Trash stopped continue. A restore sends no email that a delivery did not plan, and the count toward the monthly limit does not change.

Move a form to Trash

DELETE /api/forms/$FORM_ID moves a form to Trash, and the form stops at once. $FORM_ID is the id from List the forms.

Request
curl -X DELETE https://app.hmuform.com/api/forms/$FORM_ID \
  -H "Authorization: Bearer $HMUFORM_API_KEY"
Response 204
204 No Content
  • The form link answers 404 with form_not_found and takes no submissions. Retries of its submissions are not sent.
  • The form stays in Trash with its submissions for the time in Move submissions to Trash, then we remove it. To bring it back, see Restore a form from Trash.
  • The count toward the monthly limit does not change.

List the forms in Trash

GET /api/workspaces/$WORKSPACE_ID/trash lists the forms in Trash, last deleted first. $WORKSPACE_ID comes from Get the workspace ID.

Request
curl https://app.hmuform.com/api/workspaces/$WORKSPACE_ID/trash \
  -H "Authorization: Bearer $HMUFORM_API_KEY"
Response 200
{ "forms": [{ "id": "k3x9p2abcd", "name": "bakery-bloom.com", "deletedAt": 1793923200000, "messages": 3 }] }

messages is the number of submissions that come back with a restore. deletedAt is the time of the move to Trash. The time that Trash keeps a form is in Move submissions to Trash.

Restore a form from Trash

POST /api/forms/$FORM_ID/restore takes a form and its submissions out of Trash, and the form link works again. $FORM_ID is the id from List the forms in Trash.

Request
curl -X POST https://app.hmuform.com/api/forms/$FORM_ID/restore \
  -H "Authorization: Bearer $HMUFORM_API_KEY"
Response 200
{ "id": "k3x9p2abcd", "name": "bakery-bloom.com", "url": "https://hmuform.com/f/k3x9p2abcd", "recipientAdded": null }
  • Submissions that you moved to Trash one by one stay in Trash.
  • Spam keeps its own time (see Spam), also while its form is in Trash.
  • The retries that Trash stopped continue.
  • If the form lost all its recipients while in Trash, the address of the owner of the workspace becomes its recipient, and recipientAdded has that address. Else recipientAdded is null.

Errors

An API error has a JSON body with an error code, for example { "error": "unauthorized" }. Errors of the form link are in Send a submission to a form link.

Status error Why
400 invalid_request The body or the query is not valid.
400 invalid_link The id and claim of Turn on a form link with an API key do not match, or one is missing.
401 unauthorized The key is missing, wrong or revoked, or the person who made it left the workspace.
403 forbidden An API key cannot do this call, or only a key of the owner can do it. Use the dashboard. See Get an API key.
403 member_address Only the owner or that member can remove the address of a member.
403 no_seat The person who made the key is a member over the seats of the plan. The body has workspaceId.
403 plan_limit The plan allows no more linked emails, or no more recipients for each form. limit is linkedEmails or recipients.
404 not_found The form, the workspace or the address does not exist, it is not in the workspace of the key, or the form is in Trash.
409 exists The address is already in the workspace.
409 already_confirmed The address is confirmed and did not stop the emails, so it needs no new confirmation email.
409 last_recipient The address is the only recipient of a form. Choose another recipient first.
409 member_unsubscribed The address of a member stopped the emails, so it stays.
409 link_used Another workspace turned on this form link, or the form was deleted forever.
409 recipient_removed Someone removed the recipient address while the form was made. Make the form again.
413 invalid_request The body of a test is over 64 KB.
429 too_many_forms The workspace made 20 forms in the last 24 hours.
429 too_many_tests The form got 10 tests in the last 24 hours.
429 too_many_emails The workspace or the sender reached the daily cap of confirmation emails and invitations. Try again tomorrow.
429 too_many_emails_to_address We sent 3 emails to this address in the last 24 hours. Try again tomorrow.
429 rate_limited We sent an email to this address less than a minute ago.
500 internal_error An error on our side. Try again.

GDPR

For the personal data in the submissions, you are the controller and hmuform is your processor. The data processing agreement is part of our Terms, so you sign nothing more. The database is in the EU. Some providers process data outside the EU, as our Privacy Policy says. The Privacy Policy also lists who processes the submissions and how long we keep them. You decide how you use the data and what you tell your visitors.