FormHam / developersAgency API · Hooks & webhooks · Manage API keys →

Agency API · v1

Your clients.
Your systems.

Manage FormHam from your own software and AI tools: amend client settings, configure forms, work with leads, manage teams and connect integrations using your current app permissions.

Base URL: https://app.formham.co.uk/api/agency/v1

This is the customer API. Access is per business, requires an eligible Agency or Enterprise plan, and stays off until an owner or admin enables it. It does not grant platform administration or extra permissions.

Get started

  1. Sign in to FormHam → API Tokens.
  2. Select the client business. In “All businesses”, use the client selector on the API Tokens screen.
  3. Choose Enable Agency API and confirm the access you are granting. If your plan is ineligible, the screen shows the upgrade route.
  4. Choose New token, give it a name such as “Private AI assistant”, and choose Agency API.
  5. Copy the token into your system’s secret store. It is shown once. Repeat for each client you want that system to access.

Verify the key before changing anything:

export FORMHAM_API_TOKEN='replace-with-your-secret'
curl --fail-with-body https://app.formham.co.uk/api/agency/v1/me \
  -H "Authorization: Bearer $FORMHAM_API_TOKEN" \
  -H 'Accept: application/json'

/me returns the current user, accessible businesses and businesses_unavailable explanations. Never put a real key in a URL, screenshot, source repository or public AI chat.

Keys, client selection and permissions

Every request requires Authorization: Bearer TOKEN and should send Accept: application/json. Writes use Content-Type: application/json. Browser login cookies and plugin/integration keys do not replace an agency key.

Keys created in the app are pinned to one client. For the management routes under /app, that client is selected automatically. You may send X-Business-Id: 93 explicitly. An unscoped agency key must select a business for management requests. Every supplied header, query or body business selector must agree; conflicting selectors are refused.

Agency credentials work only under /api/agency/v1. They cannot use older /api/my-forms, /api/v1 or administrator endpoints to bypass the agency checks. Use the intended integration credential for those separate APIs.

Membership, role, plan, API opt-in and credential validity are checked on requests. Owners/admins can manage sensitive settings, credentials and data exports. Members retain ordinary app permissions; a token never upgrades its user. Removing membership or revoking a token removes its authority. Expiry is returned with issued credentials and shown in the token list.

An owner’s agency key is powerful. It can create other API/plugin credentials, change delivery destinations and perform permitted erasure. Disabling agency access blocks agency keys; independently issued plugin/integration credentials must be revoked separately. Revoking one key does not revoke all other keys.

Read and amend a client

GET /app/business reads the selected client. PATCH /app/business accepts partial settings. Unspecified fields stay unchanged.

curl --fail-with-body -X PATCH \
  https://app.formham.co.uk/api/agency/v1/app/business \
  -H "Authorization: Bearer $FORMHAM_API_TOKEN" \
  -H 'Accept: application/json' -H 'Content-Type: application/json' \
  --data '{"name":"Example client","contact_email":"hello@example.com"}'
SettingsJSON fields
Identityname, website, contact_email, from_name, from_email
Deliveryemail_provider: agency_mailgun, custom_mailgun or smtp; mailgun_domain, mailgun_secret, smtp_host, smtp_port (1–65535), smtp_username, smtp_password, smtp_encryption (tls, ssl, none)
Working hoursoffice_hours_start, office_hours_end, timezone, business_days (array of weekday numbers 1–7)
Privacygdpr_mode, submission_retention_days (1–3650), purge_test_submissions, hide_technical_fields
Brandingbrand_color (#RRGGBB), brand_logo_url, email_footer_text
Domains and integrationsallowed_domains (public hostnames), mailchimp_api_key, mailchimp_server_prefix (for example us21)

Use GET /app/customer-api to inspect entitlement and access state; PATCH /app/customer-api with {"enabled":false} disables agency access for this client. Re-enabling after disabling requires the app, because the disabled API refuses further agency requests.

Forms and notifications

GET /app/forms lists forms. POST /app/forms creates a form and requires name. GET and PATCH /app/forms/{id} use the numeric form ID. The sync routes outside /app use form UUIDs instead.

POST /api/agency/v1/app/forms
{"name":"Website enquiries","is_active":true,"email_notifications":true,
 "spam_protection":"challenge","allowed_domains":["example.com"]}

PATCH /api/agency/v1/app/forms/123
{"name":"Sales enquiries","is_active":false}

Form settings include redirect_url, reply_to_field, email_notifications, webhook_url, sms_enabled, whatsapp_enabled, notification_phone, allowed_domains, recaptcha_enabled, spam_protection, mailing_list_id, mailing_list_email_field, mailing_list_first_name_field, mailing_list_last_name_field, form_schema and form_styles. Plan and destination restrictions still apply. Mailing lists must belong to the selected client.

POST /app/forms/{id}/test runs the app’s test flow. It may trigger delivery; use a test client and destinations you control.

Notification templates

GET/POST /app/forms/{id}/notifications; PATCH/DELETE /app/forms/{id}/notifications/{notificationId}. Both create and update require recipient_type (admin, custom, respondent), reply_to_mode (none, static, field), subject (max 500) and body (max 50,000). Optional fields: name, recipient_email, recipient_field, reply_to_email, reply_to_field, include_all_fields, delay_minutes (0–20160), respect_business_hours, is_active. Choosing a new custom recipient requires owner/admin permission.

Leads, attachments and privacy

GET /app/submissions returns a standard paginator with data, current_page, last_page and total. It uses 50 rows per page. Pass page, from and to (date strings). all=true returns at most 500 rows and is not an unbounded export.

Follow-up: PUT /app/submissions/{id}/lead-status with {"status":"contacted"} sets a lead's status; GET/POST /app/submissions/{id}/notes read and add internal team notes ({"body":"…"}), and DELETE /app/submissions/{id}/notes/{noteId} removes one (its author, or an owner/admin). An erased lead refuses new notes with 409.

GET /app/submissions/{id} returns one submission by numeric ID. Attachment links use GET /app/submission-files/{submissionFile} with the bearer header; never forward the agency key to another host. GET /app/logs, GET /app/logs/failed-count and POST /app/logs/{id}/retry expose the app’s delivery tools; retrying can send a message.

Owner/admin data exports: GET /app/submissions/export supports from/to, or a subject email for a subject access export. GET /app/forms/{id}/export/panel exports one form. These may return file downloads rather than JSON. HEAD is refused on audited export routes. Streamed downloads recheck current access before emitting data.

Destructive operations: POST /app/submissions/{id}/erase erases one submission; POST /app/submissions/erase-by-email with {"email":"person@example.com"} erases matching subject data within the selected client. These are audited and role restricted. Require explicit human approval in your own AI workflow before invoking them.

Team and credential management

GET /app/business/members lists members. POST /app/business/members takes email and optional role (admin or member). It may send an invitation. PATCH /app/business/members/{userId} takes role; role changes require an owner. DELETE removes the member, subject to the app’s owner protections. The last owner cannot be removed or demoted.

GET /app/tokens inventories the current user’s keys for this client; it does not return usable secrets. POST /app/tokens takes name (max 100) and scope (agency or business, default business). The 201 response includes id, token, scope, abilities and expiry metadata. Store the secret immediately. DELETE /app/tokens/{id} revokes it. You cannot manage another client’s keys through a scoped credential.

Lists, sending domains, plugins and billing

GET/POST /app/mailing-lists; creation requires name and accepts description. PATCH /app/mailing-lists/{id} changes those fields; DELETE removes a list. GET /app/mailing-lists/{id}/subscribers lists its subscribers. GET /app/mailing-lists/{id}/export and /export/all download subscriber exports.

GET /app/mailing-list-destination-providers lists available providers and configuration requirements. Create a destination with POST /app/mailing-lists/{id}/destinations, supplying provider, optional label and provider-specific config. PATCH /app/mailing-lists/{id}/destinations/{destinationId} updates label, is_active or config; DELETE removes it. POST .../{destinationId}/backfill queues existing subscribers for that destination. This can transmit personal data externally.

GET /app/sending-domain reads DNS/provisioning status. POST /app/sending-domain takes domain; POST /app/sending-domain/verify rechecks it. These use the same provider, plan and owner/admin checks as the app.

POST /app/plugin-token requires business_id matching the selected client and issues/rotates that client’s plugin credential. POST /app/download-plugin downloads a client-configured ZIP containing a separate plugin credential; protect the archive as a secret.

GET /app/billing reads billing. POST /app/billing/checkout takes business_id, plan and optional period (month or year) and returns checkout details. POST /app/billing/portal returns portal_url. A person follows the hosted billing link; the API does not bypass payment approval or directly replace subscription webhooks.

GET /app/dashboard and GET /app/onboarding-progress provide the app’s summary views. GET /app/businesses lists accessible clients within this key’s scope.

Bulk sync into your own systems

The original sync API remains available alongside management. GET /businesses lists reachable clients. GET /usage?month=2026-10 reads usage. GET /forms accepts business_id and is_active; GET /forms/{uuid} reads a form. POST /forms requires business_id and name. PATCH /forms/{uuid} supports the sync settings; use the management endpoint for full app settings.

GET /submissions accepts since, until, form_uuid, business_id, lead_status (new, contacted, won, lost or spam; new means never triaged), limit (max 500) and cursor. Every lead carries its lead_status. Use ISO-8601 timestamps, store receipt_id to deduplicate and follow next_cursor until it is null. Keep other filters fixed while paging. GET /submissions/{receiptId} reads one lead and its delivery attempts. Numeric management IDs, UUIDs and receipt IDs are different identifiers.

Deleting a lead (“remove my details”)

DELETE /submissions/{receiptId} permanently deletes one lead: the submission row, its uploaded files, its delivery logs and email index, pending scheduled notifications, and any mailing-list subscriber captured from it. It is not a redaction and cannot be undone. Your key needs the owner or admin role on the lead’s business.

StatusMeaning
204Deleted. Also returned when the same receipt id was already deleted through this endpoint, so retrying after a timeout is safe.
404Unknown receipt id, or one belonging to a business this key cannot reach. The two are indistinguishable.
403Your role on that business is member; deletion needs owner or admin.
503The deletion could not be recorded or completed (for example, file storage refused). Retry.

Each deletion is audited with who made it, the business, a hash of the receipt id and the number of records removed, never the lead’s content.

curl --fail-with-body -X DELETE \
  https://app.formham.co.uk/api/agency/v1/submissions/0b6c1f9e-7d1a-4a5e-9f4e-2c8d3b1a6e70 \
  -H "Authorization: Bearer $FORMHAM_API_TOKEN" -H 'Accept: application/json'
curl --fail-with-body --get \
  https://app.formham.co.uk/api/agency/v1/submissions \
  -H "Authorization: Bearer $FORMHAM_API_TOKEN" -H 'Accept: application/json' \
  --data-urlencode 'since=2026-10-01T00:00:00Z' --data-urlencode 'limit=100'

Do not assume every response has the same wrapper: app list endpoints can return arrays or standard Laravel pagination; sync list endpoints return data, next_cursor and has_more. Inspect and handle the endpoint’s actual response.

Rate limits, errors and retries

The API baseline is 120 requests/minute/user or IP. Agency traffic also has a per-token budget of 120/minute and 3,000/hour. Management has separate per-user limits: 120 reads/minute, 30 standard writes/minute (including team changes), 12 sensitive operations/minute and 6 provider/credential operations/minute. Limits layer; a lower remaining budget wins. Keys belonging to the same user share the baseline and management budgets.

StatusHandling
401Missing, expired or revoked authentication. Check/reissue the key.
402 / 403Plan, API opt-in, scope, role or membership refuses this action. Do not loop retries.
404Resource absent or unavailable within this client’s scope.
409State conflict, such as issuing an agency key before enabling API access.
413Request exceeds the server’s management payload limit.
422Invalid input. Read message/error and any errors field validation details.
429Wait for Retry-After; use bounded backoff.
5xxTemporary server/provider issue. Use bounded retries for safe reads; inspect state before replaying writes.

Every error is JSON with the same envelope: {"error":"…","message":"…","request_id":"…"}, plus errors on a 422. Branch on error; quote request_id (also in the X-Request-Id header) when you contact support. You may send your own X-Request-Id to correlate with your logs. Successful responses carry X-RateLimit-Limit and X-RateLimit-Remaining.

Safe retries with Idempotency-Key

Create endpoints marked Idempotency-Key in the reference below accept a key you choose (for example a UUID per logical create). Retrying with the same key and the same request within 24 hours returns the first response, with Idempotent-Replayed: true, instead of creating a second form, list, note or invitation. Reusing a key for a different request is refused with 422 idempotency_key_reused; a retry while the first attempt is still running gets 409 idempotency_request_in_progress. Other writes (delivery tests, retries, backfills) have no key: check the resulting state before replaying them.

curl --fail-with-body -X POST https://app.formham.co.uk/api/agency/v1/forms \
  -H "Authorization: Bearer $FORMHAM_API_TOKEN" -H 'Accept: application/json' \
  -H 'Content-Type: application/json' -H "Idempotency-Key: $(uuidgen)" \
  --data '{"business_id":93,"name":"Website enquiries"}'

Using the API safely with AI

The server hashes stored API tokens, checks tenant scope and current authority, audits sensitive actions and refuses private-network outbound targets through its guarded transports. These controls reduce risk; they are not a promise that software is invulnerable.

API reference

All 84 operations below are generated from the OpenAPI 3.1 document that the test suite checks against the deployed routes. Download it for code generation or import the collection into Postman or Bruno:

Identity

Who the token is and what it can reach.

GET /api/agency/v1/meWho this token is and what it can reach

The first call to make. Lists reachable businesses and, for the token user's other businesses, why each is unavailable.

Responses

200 application/json

Identity.

FieldTypeDescription
userobject
user.idinteger
user.namestring
user.emailstring (email)
tokenobject
token.namestring | null
token.scoped_to_business_idinteger | null

Set when the token is pinned to one business.

businessesarray of object
businesses[].idinteger
businesses[].namestring
businesses[].slugstring | null
businesses[].planstring

Internal plan key (e.g. agency, enterprise); see plan_label for the display name.

businesses[].plan_labelstring
businesses_unavailablearray of object
businesses_unavailable[].idinteger
businesses_unavailable[].namestring
businesses_unavailable[].reasonstring (one of: plan_does_not_include_api, api_not_enabled, token_scoped_to_another_business)

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

429 application/json

A rate limit was exceeded. Wait for Retry-After.

Sync

Cursor-paginated, cross-business reads and the form create used by build pipelines.

GET /api/agency/v1/businessesEvery business this token can reach

Responses

200 application/json

Businesses, ordered by name.

FieldTypeDescription
dataarray of object
data[].idinteger
data[].namestring
data[].slugstring | null
data[].websitestring | null
data[].contact_emailstring | null
data[].planstring

Internal plan key (e.g. agency, enterprise); see plan_label for the display name.

data[].plan_labelstring
data[].formsinteger

Number of forms.

data[].allowed_domainsarray of string
data[].created_atstring | null (date-time)

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/formsForms across every reachable business

Parameters

NameInTypeDescription
business_idqueryinteger

Restrict to one business. 403 business_not_accessible if the token cannot reach it.

is_activequeryboolean
limitqueryinteger (min 1; max 500; default 100)

Rows per page.

cursorqueryinteger (min 0)

The next_cursor from the previous page. Omit (or 0) for the first page.

Responses

200 application/json

A page of forms, ordered by internal id.

FieldTypeDescription
dataarray of object
data[].uuidstring
data[].namestring
data[].is_activeboolean
data[].business_idinteger
data[].business_namestring | null
data[].submit_urlstring (uri)

Where an HTML form posts.

data[].created_atstring | null (date-time)
next_cursorinteger | null

Pass as cursor for the next page; null on the last page.

has_moreboolean

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/formsCreate a form on one of your businesses

Stands a client's form up from a build script. Email notifications default on; spam protection is the proof-of-work challenge (suitable for sites you build). Omitting fields creates name/email/message. 422 form_limit_reached when the plan's form ceiling is hit.

Parameters

NameInTypeDescription
Idempotency-Keyheaderstring (min length 1; max length 255)

Makes a retried create safe. See "Idempotency" above. Kept for 24 hours.

Request body application/json

FieldTypeDescription
business_idrequiredinteger
namerequiredstring (max length 255)
is_activeboolean (default true)
email_notificationsboolean (default true)
notification_emailsarray of string (email; max length 255) (max items 20)
redirect_urlstring | null (uri; max length 2048)

Must be https.

fieldsarray of object (max items 100)
fields[].typerequiredstring (max length 40)
fields[].namerequiredstring (max length 100)
fields[].labelstring | null (max length 255)
fields[].placeholderstring | null (max length 255)
fields[].requiredboolean

Responses

201 application/json

Created.

FieldTypeDescription
dataobject
data.uuidstring
data.namestring
data.is_activeboolean
data.business_idinteger
data.business_namestring | null
data.submit_urlstring (uri)

Where an HTML form posts.

data.created_atstring | null (date-time)
data.email_notificationsboolean
data.notification_emailsarray of string (email)
data.redirect_urlstring | null
data.fieldsarray of object
data.fields[].typestring
data.fields[].namestring | null
data.fields[].labelstring | null
data.fields[].requiredboolean

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

409 application/json

The resource's state does not allow this, or an Idempotency-Key request is still in flight.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/forms/{uuid}One form, with its field list

Parameters

NameInTypeDescription
uuidrequiredpathstring

Responses

200 application/json

The form.

FieldTypeDescription
dataobject
data.uuidstring
data.namestring
data.is_activeboolean
data.business_idinteger
data.business_namestring | null
data.submit_urlstring (uri)

Where an HTML form posts.

data.created_atstring | null (date-time)
data.email_notificationsboolean
data.notification_emailsarray of string (email)
data.redirect_urlstring | null
data.fieldsarray of object
data.fields[].typestring
data.fields[].namestring | null
data.fields[].labelstring | null
data.fields[].requiredboolean

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

PATCH /api/agency/v1/forms/{uuid}Rename, pause or re-route a form

There is no DELETE here by design — is_active=false stops a form accepting submissions. 422 nothing_to_update for an empty body. Use /app/forms/{id} for the full settings.

Parameters

NameInTypeDescription
uuidrequiredpathstring

Request body application/json

FieldTypeDescription
namestring (max length 255)
is_activeboolean
email_notificationsboolean
notification_emailsarray of string (email; max length 255) | null (max items 20)
redirect_urlstring | null (uri; max length 2048)

Must be https.

Responses

200 application/json

The updated form.

FieldTypeDescription
dataobject
data.uuidstring
data.namestring
data.is_activeboolean
data.business_idinteger
data.business_namestring | null
data.submit_urlstring (uri)

Where an HTML form posts.

data.created_atstring | null (date-time)
data.email_notificationsboolean
data.notification_emailsarray of string (email)
data.redirect_urlstring | null
data.fieldsarray of object
data.fields[].typestring
data.fields[].namestring | null
data.fields[].labelstring | null
data.fields[].requiredboolean

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/submissionsLeads across every reachable business

Keyset-paginated on the internal id: follow next_cursor until it is null, keeping the other filters fixed. Store receipt_id to de-duplicate. Quarantined (held) leads are excluded unless include_quarantined=1.

Parameters

NameInTypeDescription
business_idqueryinteger
form_uuidquerystring (max length 64)

404 if the form is not reachable.

sincequerystring (date-time)

Created at or after (ISO-8601).

untilquerystring (date-time)

Created at or before (ISO-8601).

include_quarantinedqueryboolean (default false)
lead_statusquerystring (one of: new, contacted, won, lost, spam)

new means never triaged.

limitqueryinteger (min 1; max 500; default 100)

Rows per page.

cursorqueryinteger (min 0)

The next_cursor from the previous page. Omit (or 0) for the first page.

Responses

200 application/json

A page of leads.

FieldTypeDescription
dataarray of object
data[].submission_idinteger
data[].receipt_idstring
data[].formobject
data[].form.uuidstring | null
data[].form.namestring | null
data[].submitted_atstring | null (date-time)
data[].source_urlstring | null
data[].page_titlestring | null
data[].dataobject

The submitted fields, flattened (field name → value).

data[].filesarray of object
data[].files[].filenamestring
data[].files[].bytesinteger
data[].files[].mimestring | null
data[].files[].download_urlstring | null

Time-limited signed URL.

data[].business_idinteger
data[].quarantinedboolean
data[].quarantine_reasonstring | null
data[].lead_statusstring (one of: new, contacted, won, lost, spam)
next_cursorinteger | null

Pass as cursor for the next page; null on the last page.

has_moreboolean

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/submissions/{receiptId}One lead by receipt id, with its delivery attempts

Parameters

NameInTypeDescription
receiptIdrequiredpathstring

The submission's receipt id (36 characters of hex and hyphens).

Responses

200 application/json

The lead.

FieldTypeDescription
dataobject

The outbound webhook's payload shape (minus event and sample) plus sync-only keys, so a backfill maps onto the same fields.

data.submission_idinteger
data.receipt_idstring
data.formobject
data.form.uuidstring | null
data.form.namestring | null
data.submitted_atstring | null (date-time)
data.source_urlstring | null
data.page_titlestring | null
data.dataobject

The submitted fields, flattened (field name → value).

data.filesarray of object
data.files[].filenamestring
data.files[].bytesinteger
data.files[].mimestring | null
data.files[].download_urlstring | null

Time-limited signed URL.

data.business_idinteger
data.quarantinedboolean
data.quarantine_reasonstring | null
data.lead_statusstring (one of: new, contacted, won, lost, spam)
data.deliveriesarray of object
data.deliveries[].typestring

Channel (email, webhook, sms, ...).

data.deliveries[].statusstring
data.deliveries[].messagestring | null
data.deliveries[].atstring | null (date-time)

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

DELETE /api/agency/v1/submissions/{receiptId}Permanently delete one lead ("remove my details")

Irreversible: removes the submission, its files, delivery logs, email index, pending scheduled notifications and any mailing-list subscriber captured from it. Audited without personal data. 204 also when the same receipt id was already deleted here, so a retry after a timeout is safe. 403 insufficient_role for a member; 503 audit_unavailable / delete_failed — retry.

Roles: owner, admin

Parameters

NameInTypeDescription
receiptIdrequiredpathstring

The submission's receipt id (36 characters of hex and hyphens).

Responses

204

Deleted (or already deleted).

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

503 application/json

A temporary failure (audit store, file storage, provider). Retry with backoff.

GET /api/agency/v1/usageSubmission counts per business for a month

For reconciling what you bill clients against what arrived. A month that does not parse falls back to the current month.

Parameters

NameInTypeDescription
monthquerystring

Defaults to the current month.

Responses

200 application/json

Counts.

FieldTypeDescription
monthstring
dataarray of object
data[].business_idinteger
data[].business_namestring
data[].submissionsinteger
totalinteger

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

429 application/json

A rate limit was exceeded. Wait for Retry-After.

Workspace

GET /api/agency/v1/app/businessRead the selected business's settings

The selected business's settings. Secrets (mailgun_secret, mailchimp_api_key, recaptcha_secret_key) come back masked as ***, or null when not set. can_manage and my_role describe the caller's own authority, so a client can hide controls the caller is not allowed to use.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The business settings.

FieldTypeDescription
idinteger
namestring
slugstring
websitestring | null
contact_emailstring | null
from_namestring | null
from_emailstring | null
email_providerstring (one of: agency_mailgun, custom_mailgun, smtp)
mailgun_domainstring | null
mailgun_secretstring | null

*** when set, otherwise null.

smtp_hoststring | null
smtp_portinteger | null
smtp_usernamestring | null
smtp_encryptionstring

Defaults to tls.

office_hours_startstring

HH:MM, default 09:00.

office_hours_endstring

HH:MM, default 17:00.

timezonestring

Defaults to UTC.

business_daysarray of integer (min 1; max 7)

ISO weekday numbers (1 = Monday); always a concrete list.

gdpr_modeboolean
submission_retention_daysinteger | null
purge_test_submissionsboolean
hide_technical_fieldsboolean
lead_digest_enabledboolean
brand_colorstring | null
brand_logo_urlstring | null
email_footer_textstring | null
mailchimp_api_keystring | null

*** when set, otherwise null.

mailchimp_server_prefixstring | null
planstring

Internal plan key.

can_manageboolean

Whether the caller is owner/admin (may change privileged settings).

my_rolestring | null (one of: owner, admin, member, null)
allowed_domainsarray of string
formspark_form_idstring | null
recaptcha_enabledboolean
recaptcha_site_keystring | null
recaptcha_secret_keystring | null

*** when set, otherwise null.

recaptcha_versionstring (one of: v2, v3)

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

PATCH /api/agency/v1/app/businessUpdate the selected business's settings

A partial update; send only the fields you want to change. Any member can change the day-to-day fields (name, website, branding, office hours, business days, timezone, hide_technical_fields, email_footer_text). The privileged fields (BusinessSettingsService::PRIVILEGED_FIELDS: mail transport, from_name/from_email, contact_email, GDPR/retention, Mailchimp, reCAPTCHA, allowed_domains, formspark_form_id, lead_digest_enabled) need owner or admin. Touching one as a member returns 403 with a fields list naming them.

Sending *** for mailgun_secret, mailchimp_api_key or recaptcha_secret_key keeps the stored secret. Mail-transport changes are checked by MailTransportSettings, which can refuse with 403 or 422 and an errors object keyed by the field. Saving allowed_domains also pushes the domains to the platform reCAPTCHA key's allowed-domain list. The change is audited (business_settings_updated). 409 means the data changed during the save; retry.

Roles: owner, admin, memberExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
namestring (max length 255)
websitestring | null (uri; max length 2048)
contact_emailstring | null (email; max length 255)

Privileged.

from_namestring | null (max length 255)

Privileged.

from_emailstring | null (email; max length 255)

Privileged.

email_providerstring (one of: agency_mailgun, custom_mailgun, smtp)

Privileged.

mailgun_domainstring | null (max length 255)

Privileged.

mailgun_secretstring | null (max length 255)

Privileged. *** keeps the stored value.

smtp_hoststring | null (max length 255)

Privileged.

smtp_portinteger | null (min 1; max 65535)

Privileged.

smtp_usernamestring | null (max length 255)

Privileged.

smtp_passwordstring | null (max length 255)

Privileged. Write-only.

smtp_encryptionstring | null (one of: tls, ssl, none, null)

Privileged.

office_hours_startstring | null (max length 5)
office_hours_endstring | null (max length 5)
timezonestring | null (max length 64)
business_daysarray of integer (min 1; max 7) | null

ISO weekday numbers (1 = Monday .. 7 = Sunday). An empty array clears it.

gdpr_modeboolean

Privileged.

submission_retention_daysinteger | null (min 1; max 3650)

Privileged.

purge_test_submissionsboolean

Privileged.

hide_technical_fieldsboolean
lead_digest_enabledboolean

Privileged.

brand_colorstring | null (max length 7)
brand_logo_urlstring | null (uri; max length 2048)
email_footer_textstring | null (max length 1000)
mailchimp_api_keystring | null (max length 500)

Privileged. *** keeps the stored value.

mailchimp_server_prefixstring | null

Privileged. Mailchimp data-centre prefix, e.g. us21.

allowed_domainsarray of string | null

Privileged. Also synced to the platform reCAPTCHA key.

formspark_form_idstring | null

Privileged.

recaptcha_enabledboolean

Privileged.

recaptcha_site_keystring | null (max length 500)

Privileged.

recaptcha_secret_keystring | null (max length 500)

Privileged. *** keeps the stored value.

recaptcha_versionstring | null (one of: v2, v3, null)

Privileged.

Responses

200 application/json

Saved.

FieldTypeDescription
okboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

409 application/json

The resource's state does not allow this, or an Idempotency-Key request is still in flight.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/app/businessesList the businesses this token can act on

Every business the caller belongs to, filtered to the ones this agency token may use (AgencyApiAccess::businessIdsFor), with trial and billing state attached so a client can show a "trial ending" or "payment failed" banner without asking again.

This route stays open when billing is lapsed, so it never returns 402. It is not exempt from suspension: if the selected business is suspended you get 423 business_suspended.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The businesses, sorted by name.

FieldTypeDescription
[].idinteger
[].namestring
[].slugstring
[].rolestring | null (one of: owner, admin, member, null)
[].billing_statusobject
[].billing_status.past_dueboolean
[].billing_status.billing_portal_availableboolean
[].billing_status.statusstring | null
[].billing_status.portal_urlstring | null (uri)
[].billing_status.billed_by_agencyboolean
[].billing_status.free_accessboolean

True during free early access.

[].billing_status.free_untilstring | null (date)
[].trial_statestring (one of: none, active, ending_soon, grace, lapsed)
[].trial_ends_atstring | null (date-time)
[].trial_ends_onstring | null

Human date, e.g. "4 December 2026".

[].trial_days_remaininginteger | null
[].trial_setup_completeboolean

Whether this trial has earned the setup bonus.

[].trial_setup_bonus_daysinteger
[].trial_lapses_atstring | null (date-time)

When the lapsed-trial restriction actually applies (grace plus any bonus).

[].trial_lapses_onstring | null
[].trial_restricts_writes_onlyboolean

True when a lapsed trial only blocks writes (reads and exports still work).

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/app/dashboardDashboard stats and things needing attention

Today's counts, 30-day spam and untriaged-lead figures, delivery success rate, form health and an attention list of problems (no forms, failed notifications, bouncing recipients, quiet forms, unfinished sending domain, held leads).

Cached per business for 45 seconds, so a new submission can take that long to show. delivery_rate and send_success_rate are null when nothing has been sent today. can_manage is true only when an attention item offers a fix and the caller is owner or admin.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The dashboard payload.

FieldTypeDescription
business_namestring
date_labelstring
statsobject
stats.spam_blocked_30dinteger
stats.leads_awaiting_30dinteger
stats.forms_liveinteger
stats.forms_activeinteger
stats.forms_pausedinteger
stats.forms_totalinteger
stats.submissions_todayinteger
stats.sub_trendnumber

Percent change in submissions vs yesterday (0 when yesterday had none).

stats.delivery_ratenumber | null

Legacy alias of send_success_rate.

stats.send_success_ratenumber | null

Percent of today's send attempts that did not fail; null when none.

stats.delivery_attemptsinteger
stats.failed_channelsinteger

Failed send attempts today.

stats.heldinteger

Leads held for review.

stats.attention_countinteger
stats.attention_summarystring | null
attentionarray of object
attention[].typestring (one of: warning, error)
attention[].screenstring

App screen the item points at (e.g. onboarding, logs, forms, sending-domain, submissions).

attention[].form_idinteger

Present on "no recent submissions" items.

attention[].titlestring
attention[].subtitlestring
attention[].actionstring
attention[].fixobject

A one-click fix (owner/admin), currently only for bouncing recipients.

attention[].fix.kindstring (one of: replace_recipient)
attention[].fix.recipientstring (email)
recent_submissionsarray of object (max items 5)
recent_submissions[].idinteger
recent_submissions[].formstring
recent_submissions[].emailstring
recent_submissions[].namestring
recent_submissions[].statusstring
recent_submissions[].time_agostring
recent_submissions[].receipt_idstring | null
formsarray of object
forms[].idinteger
forms[].namestring
forms[].subs_todayinteger
forms[].statusstring (one of: live, paused, atRisk)
can_manageboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/notification-recipients/replaceReplace a notification email address everywhere it is used

Swaps from for to across the business's form notifications, per-form recipients, contact_email and default notification emails. It never changes a team member's login; team_member in the response says whether from is also one. Clears the dashboard cache.

422 when from and to are the same address, or when from is not used anywhere any more (and is not a team member's address).

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
fromrequiredstring (email; max length 254)

The address to replace.

torequiredstring (email; max length 254)

The new address (validated with email:rfc,filter).

Responses

200 application/json

Where the address was replaced.

FieldTypeDescription
replacedinteger

Total places changed.

notificationsinteger
formsinteger
contact_emailboolean
default_notification_emailsboolean
team_memberboolean

Whether the old address is also a team member's login (never changed here).

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/app/setupSetup choices

What the business said during setup and can change under "Your setup": hidden menu entries, which emails are sent, what the website is built with, and the choices on offer.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The current choices.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

PATCH /api/agency/v1/app/setupChange setup choices

A partial update; send only what changes. emails.enquiry switches enquiry emails on every form of the business. Owner or admin only.

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
platformstring (one of: html, wordpress, react, builder, none)
hidden_featuresarray of string (one of: followup, lists, integrations, team, developer, sending_domain)
emailsobject
emails.enquiryboolean
emails.followupboolean
emails.summaryboolean
decline_offerboolean

Responses

200 application/json

The choices after the change.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/app/onboarding-progressSetup checklist progress

The four setup steps (create a form, choose recipients, lock forms to your domain, get a first lead), worked out from the business's real state. Read-only: there is no way to mark a step done by hand.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The checklist.

FieldTypeDescription
stepsarray of object
steps[].idstring

Step key (form, recipients, domain, live).

steps[].titlestring
steps[].doneboolean
steps[].bodystring
steps[].detailstring | null
steps[].detail_labelstring | null
steps[].actionstring
steps[].screenstring
completeinteger
totalinteger
percentinteger
finishedboolean
nextone of
next.idstring

Step key (form, recipients, domain, live).

next.titlestring
next.doneboolean
next.bodystring
next.detailstring | null
next.detail_labelstring | null
next.actionstring
next.screenstring
business_namestring

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

Team

GET /api/agency/v1/app/business/membersList the business's team members

Everyone with access to the selected business, sorted by name, with their role.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The members.

FieldTypeDescription
[].idinteger
[].namestring
[].emailstring (email)
[].is_adminboolean

Platform administrator flag.

[].rolestring (one of: owner, admin, member)

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/business/membersAdd or invite a team member

If the email belongs to an existing FormHam account, that person gets access straight away. Otherwise an invitation email is sent (valid 7 days; sending again refreshes it). The response is the same either way, so it cannot be used to find out who has an account.

Only an owner's role is honoured; when an admin adds someone they always join as member. owner cannot be granted here. 402 when the plan's max_team_members limit (members plus pending invitations) is reached. Audited.

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Idempotency-Keyheaderstring (min length 1; max length 255)

Makes a retried create safe. See "Idempotency" above. Kept for 24 hours.

Request body application/json

FieldTypeDescription
emailrequiredstring (email)

Lower-cased and trimmed before use.

rolestring (one of: admin, member)

Only used when the caller is an owner. Defaults to member.

Responses

200 application/json

Access granted or invitation sent (deliberately indistinguishable).

FieldTypeDescription
okboolean
messagestring

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

PATCH /api/agency/v1/app/business/members/{userId}Change a team member's role

Owner only. Demoting the business's last owner is refused with 422. 404 when the user is not a member of this business. Audited when the role actually changes.

Roles: ownerExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

userIdrequiredpathinteger

The user's id (from the members list).

Request body application/json

FieldTypeDescription
rolerequiredstring (one of: owner, admin, member)

Responses

200 application/json

Role set.

FieldTypeDescription
okboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

DELETE /api/agency/v1/app/business/members/{userId}Remove a team member

Removes the person's access to the selected business. An admin can remove only members, not owners or other admins. You cannot remove yourself, and the business must always keep at least one owner (both 422). Removing someone who is not a member succeeds and changes nothing. Audited.

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

userIdrequiredpathinteger

The user's id (from the members list).

Responses

200 application/json

Removed (or was not a member).

FieldTypeDescription
okboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

API access & credentials

GET /api/agency/v1/app/customer-apiAgency API status for this business

Whether the plan includes the agency API, whether it is switched on, and where its docs live.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The agency API state, plus whether the caller may change it.

FieldTypeDescription
business_idinteger
entitledboolean

Whether the plan includes the agency API.

enabledboolean
enabled_atstring | null (date-time)
planstring
plan_labelstring
required_plansarray of string

Sold names of the plans that include it.

base_urlstring (uri)
docs_urlstring (uri)
can_manageboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

PATCH /api/agency/v1/app/customer-apiTurn the agency API on or off

Switching it on opens programmatic read access to every lead this business holds, so it is owner/admin only and recorded on the business (who and when). Turning it on needs a plan that includes it (402 otherwise). Turning it off does not revoke tokens, but they stop working immediately because access is checked on every request.

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
enabledrequiredboolean

Responses

200 application/json

The new state.

FieldTypeDescription
business_idinteger
entitledboolean

Whether the plan includes the agency API.

enabledboolean
enabled_atstring | null (date-time)
planstring
plan_labelstring
required_plansarray of string

Sold names of the plans that include it.

base_urlstring (uri)
docs_urlstring (uri)

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/download-pluginDownload the WordPress plugin for this business

Returns a file download (application/zip): the FormHam WordPress plugin, pre-configured for the selected business. Each call mints a new plugin token and builds it into the package, so treat the zip as a credential. No request body is needed; the business comes from X-Business-Id.

Roles: owner, admin, memberExtra rate limits: customer_read, customer_external

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/zip

The plugin package. Sent with Cache-Control no-store.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/plugin-tokenMint a WordPress plugin token and download link

Mints a new plugin token for the business and returns a single-use download link for the plugin package (the link carries a nonce, not the token, and lasts 24 hours). Plugin tokens for this business that have already gone stale are removed first; live ones are kept.

business_id in the body must be the selected business (a mismatch with X-Business-Id is 403).

Roles: owner, admin, memberExtra rate limits: customer_read, customer_external

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
business_idrequiredinteger (min 1)

Must exist and match the selected business.

Responses

200 application/json

The download link.

FieldTypeDescription
business_idinteger
business_namestring
download_urlstring (uri)

Single-use plugin download link (24h nonce).

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/app/tokensList your API tokens for this business

The caller's own API tokens that are scoped to the selected business (access-business:{id}). Tokens for other clients are never listed. The token secret is never returned, only its last four characters.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

Newest first.

FieldTypeDescription
[].idinteger
[].namestring
[].last_fourstring
[].last_used_atstring | null

Relative, e.g. "2 hours ago".

[].created_atstring | null

e.g. "18 Nov 2026".

[].expires_atstring | null (date-time)
[].expires_onstring | null
[].expiredboolean
[].scopestring (one of: agency, admin, business)
[].business_idinteger | null
[].business_namestring | null

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/tokensCreate an API token for this business

Mints a Sanctum token scoped to the selected business. The plaintext token is returned only in this response; store it now.

scope: agency also grants the agency API ability. That needs a plan with the agency API (402 otherwise) and the agency API switched on for the business (409 otherwise, see PATCH /app/customer-api).

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
namerequiredstring (max length 100)
scopestring (one of: business, agency; default 'business')

Responses

201 application/json

The new token, including its plaintext secret.

FieldTypeDescription
idinteger
namestring
tokenstring

The plaintext token. Only ever returned here.

scopestring (one of: business, agency)
abilitiesarray of string
created_atstring | null

e.g. "18 Nov 2026".

expires_atstring | null (date-time)
expires_onstring | null
expiredboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

409 application/json

The resource's state does not allow this, or an Idempotency-Key request is still in flight.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

DELETE /api/agency/v1/app/tokens/{id}Revoke one of your API tokens

Deletes one of the caller's own tokens. Irreversible: anything using that token stops working at once. Returns 404 unless the token belongs to the caller and is scoped to the selected business. Audited.

Roles: owner, admin, memberExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

idrequiredpathinteger

The token id (from the tokens list).

Responses

200 application/json

Revoked.

FieldTypeDescription
okboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

Sending domain

GET /api/agency/v1/app/sending-domainCustom sending domain status

The business's custom sending domain, its DNS records and verification status, and whether the plan includes it.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The sending domain state.

FieldTypeDescription
root_domainstring | null
sending_domainstring | null
statusstring | null (one of: dns_pending, verifying, active, failed, null)
dns_managedboolean
recordsarray of object

DNS records to add.

verified_atstring | null (date-time)
planstring
entitledboolean
required_plansarray of string
plan_labelstring
can_manageboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/sending-domainSet up a custom sending domain

Registers the domain with Mailgun and returns the DNS records to add at your DNS host (calls an external API). Changes where this business's lead emails come from. Only a platform admin's request writes the records into a Bunny DNS zone automatically.

403 when the caller is not owner/admin, or when the plan does not include white_label_email. 422 when provisioning fails.

Roles: owner, adminExtra rate limits: customer_read, customer_external

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
domainrequiredstring (max length 255)

Responses

200 application/json

The sending domain state after provisioning.

FieldTypeDescription
root_domainstring | null
sending_domainstring | null
statusstring | null (one of: dns_pending, verifying, active, failed, null)
dns_managedboolean
recordsarray of object

DNS records to add.

verified_atstring | null (date-time)
planstring
entitledboolean
required_plansarray of string
plan_labelstring
can_manageboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/sending-domain/verifyRe-check sending domain verification

Asks Mailgun to re-check the domain's DNS and returns the updated state (calls an external API). 422 when the check fails.

Roles: owner, adminExtra rate limits: customer_read, customer_external

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The sending domain state after the check.

FieldTypeDescription
root_domainstring | null
sending_domainstring | null
statusstring | null (one of: dns_pending, verifying, active, failed, null)
dns_managedboolean
recordsarray of object

DNS records to add.

verified_atstring | null (date-time)
planstring
entitledboolean
required_plansarray of string
plan_labelstring
can_manageboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

Billing

POST /api/agency/v1/app/account/deleteDelete your own login

Irreversible. Deletes the calling user's account, including all of their API tokens (so the token used for this request stops working). Requires the current password (an account with no password is refused with 422). Refused with 422 while the caller is the last owner of any workspace, and for platform administrator accounts. Reachable when billing is lapsed.

Roles: owner, admin, memberExtra rate limits: customer_read, customer_sensitive

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
passwordstring | null (max length 1024)

The caller's current password. Nullable in validation, but required in practice.

Responses

200 application/json

Deleted.

FieldTypeDescription
okboolean

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/app/billingPlan, subscription, usage and limits

Everything the billing screen needs: current plan and price, the full plan catalogue, subscription and trial state, this month's usage against plan limits, and who pays (a client workspace shows its agency in billed_by).

Stays reachable when billing is lapsed (never 402), so a client can always show how to pay.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The billing state.

FieldTypeDescription
trial_statestring (one of: none, active, ending_soon, grace, lapsed)
trial_ends_atstring | null (date-time)
trial_ends_onstring | null

Human date, e.g. "4 December 2026".

trial_days_remaininginteger | null
trial_setup_completeboolean

Whether this trial has earned the setup bonus.

trial_setup_bonus_daysinteger
trial_lapses_atstring | null (date-time)

When the lapsed-trial restriction actually applies (grace plus any bonus).

trial_lapses_onstring | null
trial_restricts_writes_onlyboolean

True when a lapsed trial only blocks writes (reads and exports still work).

business_idinteger
business_namestring
can_manageboolean
planstring
plan_labelstring
price_labelstring
price_unitstring | null
plansarray of object
plans[].keystring
plans[].sold_keystring
plans[].namestring
plans[].price_labelstring
plans[].price_unitstring | null
plans[].blurbstring | null
plans[].featuredboolean
plans[].featuresarray of string
plans[].limitsobject
plans[].entitlementsarray of string
plans[].purchasableboolean
plans[].annualobject | null
plans[].annual.purchasableboolean
plans[].annual.monthly_equivalent_labelstring
plans[].annual.yearly_labelstring
plans[].annual.saving_labelstring | null
plans[].annual.saving_percentinteger | null
plans[].per_siteboolean
subscription_statusstring | null
subscription_activeboolean
on_trialboolean
renews_atstring | null

Human date of the current Stripe period end; null unless subscribed.

portal_urlstring (uri)

Browser route to the Stripe portal.

has_subscriptionboolean
free_accessboolean

True during free early access: nothing is charged and every trial date is null.

free_untilstring | null (date)
free_until_labelstring | null

Human date free early access ends.

free_until_monthstring | null

Human month free early access ends.

purchasable_plansarray of string
billing_statusobject
billing_status.past_dueboolean
billing_status.billing_portal_availableboolean
billing_status.statusstring | null
billing_status.portal_urlstring | null (uri)
billing_status.billed_by_agencyboolean
billing_status.free_accessboolean

True during free early access.

billing_status.free_untilstring | null (date)
prices_exclude_vatboolean
billed_byobject | null
billed_by.idinteger
billed_by.namestring
is_ownerboolean
usageobject
usage.submissionsinteger

This calendar month.

usage.formsinteger
usage.team_membersinteger

Members plus pending invitations.

limitsobject
limits.submissionsinteger | null
limits.formsinteger | null
limits.team_membersinteger | null

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/billing/checkoutStart a Stripe Checkout session

Returns a Stripe Checkout URL for the chosen plan. It changes nothing on the account: the plan only changes when Stripe's webhook confirms payment. The price comes from server config, never the request. Per-site (Agency) plans are priced by the current billable site count.

business_id must be the selected business (a mismatch with X-Business-Id is 403). 422 when the workspace is billed through its agency, the plan is unknown, or the plan has no self-service price for that period. 503 when Stripe is unavailable. Reachable when billing is lapsed.

Roles: owner, adminExtra rate limits: customer_read, customer_sensitive

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
business_idrequiredinteger (min 1)

Must exist and match the selected business.

planrequiredstring (max length 50)

Plan key, by its sold name (e.g. individual, agency) or internal key.

periodstring (one of: month, year; default 'month')

Responses

200 application/json

Where to send the customer to pay.

FieldTypeDescription
checkout_urlstring (uri)

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

503 application/json

A temporary failure (audit store, file storage, provider). Retry with backoff.

POST /api/agency/v1/app/billing/client-workspacesAdd a client workspace under your Agency subscription

Creates a new workspace billed through the paying Agency workspace, with the caller as its owner. It copies the payer's plan and subscription status and its sites join the payer's billable count, which can change what the agency pays: a Stripe quantity sync is queued.

Only an owner of a paying, active (or trialing) per-site Agency workspace that is not itself a client workspace may do this (403 otherwise). website must be a public domain (422 otherwise).

Roles: ownerExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Idempotency-Keyheaderstring (min length 1; max length 255)

Makes a retried create safe. See "Idempotency" above. Kept for 24 hours.

Request body application/json

FieldTypeDescription
namerequiredstring (min length 2; max length 120)
websitestring | null (max length 255)

The client site's public domain, e.g. client.co.uk.

Responses

201 application/json

The new workspace.

FieldTypeDescription
idinteger
namestring
slugstring

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/billing/close-workspaceClose the selected workspace

Irreversible. Cancels the Stripe subscription and removes everyone's access immediately (including this token's access to the workspace), then erases its submissions, files, forms and subscribers in the background; the owners are emailed when that has finished. Owner only. Confirmed twice: confirm_name must match the workspace name and password must be the caller's current password (an account with no password, e.g. Google sign-in, is refused with 422).

422 when the workspace still pays for open client workspaces. 502 when the subscription could not be cancelled; then nothing has changed. Reachable when billing is lapsed.

Roles: ownerExtra rate limits: customer_read, customer_sensitive

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
confirm_namerequiredstring (max length 255)

The workspace name, typed exactly (compared after trimming).

passwordstring | null (max length 1024)

The caller's current password. Nullable in validation, but required in practice.

Responses

202 application/json

Closing: access is removed, erasure is still running.

FieldTypeDescription
okboolean
statusstring
subscription_cancelledboolean

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

502 application/json

The Stripe subscription could not be cancelled, so nothing was changed.

POST /api/agency/v1/app/billing/portalGet a Stripe billing portal link

Creates a Stripe billing portal session (calls an external API) and returns its URL. The portal can cancel the subscription and shows invoices, so it is owner/admin only. A business that has never paid has no Stripe customer; then portal_url is the app's own billing screen (/#/billing) instead. Reachable when billing is lapsed.

Roles: owner, adminExtra rate limits: customer_read, customer_external

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The portal (or billing screen) URL.

FieldTypeDescription
portal_urlstring (uri)

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/app/billing/sitesBillable sites under the subscription

What an Agency (per-site) subscription is counting, workspace by workspace, for the workspace that pays (the agency, if the selected business is a client workspace). Includes the monthly estimate and whether the caller may add client workspaces. Reachable when billing is lapsed.

Roles: owner, adminExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The site count.

FieldTypeDescription
per_siteboolean
payerobject
payer.idinteger
payer.namestring
countinteger
sitesarray of string

Every distinct billable site key, sorted.

monthly_estimate_labelstring | null
workspacesarray of object
workspaces[].idinteger
workspaces[].namestring
workspaces[].is_payerboolean
workspaces[].sitesarray of string
can_create_workspacesboolean

401 application/json

Missing, expired or revoked credential.

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

Forms (management)

GET /api/agency/v1/app/formsList the business's forms

Every (non-deleted) form in the selected business, newest first, with its submission count, public endpoint URL and the number of leads held in the last 7 days because they arrived with no reCAPTCHA token (tokenless_held_7d, the signature of a plain HTML form posting to a reCAPTCHA-mode form). Not paginated. slack_webhook_url, recaptcha_secret_key and webhook_secret are never returned.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The business's forms.

FieldTypeDescription
[].idinteger
[].business_idinteger
[].parent_form_idinteger | null
[].user_idinteger | null
[].namestring
[].pretty_namestring | null
[].uuidstring (uuid)
[].endpointstring (uri)

The public submission URL: https://app.formham.co.uk/submit/{uuid}.

[].redirect_urlstring | null
[].email_notificationsboolean
[].notification_emailsarray of string | null
[].reply_to_fieldstring | null
[].sms_enabledboolean
[].whatsapp_enabledboolean
[].notification_phonestring | null
[].webhook_urlstring | null
[].uploads_enabledboolean
[].allowed_domainsarray of string | null
[].field_mappingobject | array of any | null
[].form_schemaarray of any | object | null

Normalised form-builder field definitions.

[].form_stylesobject | array of any | null
[].recaptcha_enabledboolean | integer | null
[].recaptcha_site_keystring | null
[].recaptcha_versionstring | null
[].spam_protectionstring | null (one of: challenge, recaptcha, both, off, null)
[].spam_pow_difficultyinteger | null
[].is_activeboolean
[].max_fieldsinteger | null
[].mailing_list_idinteger | null
[].mailing_list_email_fieldstring | null
[].mailing_list_first_name_fieldstring | null
[].mailing_list_last_name_fieldstring | null
[].created_atstring | null (date-time)
[].updated_atstring | null (date-time)
[].deleted_atstring | null (date-time)
[].submissions_countinteger
[].tokenless_held_7dinteger

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/formsCreate a form

Creates a form with a fresh UUID endpoint. Defaults to is_active: true and spam_protection: challenge unless supplied. A default notification is created automatically. Writes an audit event when delivery fields are set.

A member may create a form, but any security fields they send (allowed_domains, recaptcha_enabled, spam_protection, is_active, redirect_url) are silently ignored, and delivery fields are inherited from the business defaults: sending a delivery value that differs from the business default returns 403. Enabling sms_enabled/whatsapp_enabled while that platform channel is off returns 422. allowed_domains is capped across the whole business (422 when exceeded). mailing_list_id must be a live list in this business. 409 if the data changed during the operation.

Roles: owner, admin, memberExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Idempotency-Keyheaderstring (min length 1; max length 255)

Makes a retried create safe. See "Idempotency" above. Kept for 24 hours.

Request body application/json

FieldTypeDescription
namerequiredstring (max length 255)
redirect_urlstring | null (uri; max length 2048)
reply_to_fieldstring | null (max length 100)
is_activeboolean
email_notificationsboolean
webhook_urlstring | null (uri; max length 2048)
sms_enabledboolean

Cannot be turned on while the platform SMS channel is off (422).

whatsapp_enabledboolean

Cannot be turned on while the platform WhatsApp channel is off (422).

notification_phonestring | null (max length 30)
allowed_domainsarray of string (hostname) | null

Public hostnames (e.g. example.com; no wildcards). Capped across the whole business.

recaptcha_enabledboolean
spam_protectionstring (one of: challenge, recaptcha, both, off)

Which spam defence runs. Defaults to challenge on create.

mailing_list_idinteger | null

A non-deleted mailing list belonging to this business.

mailing_list_email_fieldstring | null (max length 100)
mailing_list_first_name_fieldstring | null (max length 100)
mailing_list_last_name_fieldstring | null (max length 100)
form_schemaarray of any | null

Form-builder field list; normalised before storage.

form_stylesobject | null

Form-builder style map; normalised before storage.

Responses

201 application/json

The created form.

FieldTypeDescription
idinteger
business_idinteger
parent_form_idinteger | null
user_idinteger | null
namestring
pretty_namestring | null
uuidstring (uuid)
endpointstring (uri)

The public submission URL: https://app.formham.co.uk/submit/{uuid}.

redirect_urlstring | null
email_notificationsboolean
notification_emailsarray of string | null
reply_to_fieldstring | null
sms_enabledboolean
whatsapp_enabledboolean
notification_phonestring | null
webhook_urlstring | null
uploads_enabledboolean
allowed_domainsarray of string | null
field_mappingobject | array of any | null
form_schemaarray of any | object | null

Normalised form-builder field definitions.

form_stylesobject | array of any | null
recaptcha_enabledboolean | integer | null
recaptcha_site_keystring | null
recaptcha_versionstring | null
spam_protectionstring | null (one of: challenge, recaptcha, both, off, null)
spam_pow_difficultyinteger | null
is_activeboolean
max_fieldsinteger | null
mailing_list_idinteger | null
mailing_list_email_fieldstring | null
mailing_list_first_name_fieldstring | null
mailing_list_last_name_fieldstring | null
created_atstring | null (date-time)
updated_atstring | null (date-time)
deleted_atstring | null (date-time)

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

409 application/json

The resource's state does not allow this, or an Idempotency-Key request is still in flight.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/app/forms/{id}Show one form

One form with its submission count (polled by the editor's go-live panel to notice the first submission), public endpoint, its default notification template and tokenless_held_7d.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
idrequiredpathinteger

Form id (numeric primary key, not the UUID).

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The form.

FieldTypeDescription
idinteger
business_idinteger
parent_form_idinteger | null
user_idinteger | null
namestring
pretty_namestring | null
uuidstring (uuid)
endpointstring (uri)

The public submission URL: https://app.formham.co.uk/submit/{uuid}.

redirect_urlstring | null
email_notificationsboolean
notification_emailsarray of string | null
reply_to_fieldstring | null
sms_enabledboolean
whatsapp_enabledboolean
notification_phonestring | null
webhook_urlstring | null
uploads_enabledboolean
allowed_domainsarray of string | null
field_mappingobject | array of any | null
form_schemaarray of any | object | null

Normalised form-builder field definitions.

form_stylesobject | array of any | null
recaptcha_enabledboolean | integer | null
recaptcha_site_keystring | null
recaptcha_versionstring | null
spam_protectionstring | null (one of: challenge, recaptcha, both, off, null)
spam_pow_difficultyinteger | null
is_activeboolean
max_fieldsinteger | null
mailing_list_idinteger | null
mailing_list_email_fieldstring | null
mailing_list_first_name_fieldstring | null
mailing_list_last_name_fieldstring | null
created_atstring | null (date-time)
updated_atstring | null (date-time)
deleted_atstring | null (date-time)
submissions_countinteger
tokenless_held_7dinteger
default_notificationone of
default_notification.idinteger
default_notification.form_idinteger
default_notification.namestring | null
default_notification.recipient_typestring (one of: admin, custom, respondent)
default_notification.recipient_emailstring | null
default_notification.recipient_fieldstring | null
default_notification.reply_to_modestring (one of: none, static, field)
default_notification.reply_to_emailstring | null
default_notification.reply_to_fieldstring | null
default_notification.subjectstring
default_notification.bodystring
default_notification.is_activeboolean
default_notification.is_defaultboolean
default_notification.include_all_fieldsboolean | null
default_notification.delay_minutesinteger
default_notification.respect_business_hoursboolean
default_notification.created_atstring | null (date-time)
default_notification.updated_atstring | null (date-time)

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

PATCH /api/agency/v1/app/forms/{id}Update a form

Partial update. Any member may edit cosmetic fields (name, form_schema, form_styles), but changing a delivery field (webhook_url, notification_phone, sms_enabled, whatsapp_enabled, email_notifications, reply_to_field, mailing_list_*) or a security field (allowed_domains, recaptcha_enabled, spam_protection, is_active, redirect_url) returns 403 for a member; resending an unchanged value is allowed. Delivery changes are audited. Enabling SMS or WhatsApp while the platform channel is off returns 422 (unless already on). allowed_domains is capped across the whole business (422). 409 if the data changed during the operation.

Roles: owner, admin, memberExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Form id (numeric primary key, not the UUID).

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
namestring (max length 255)
redirect_urlstring | null (uri; max length 2048)
reply_to_fieldstring | null (max length 100)
is_activeboolean
email_notificationsboolean
webhook_urlstring | null (uri; max length 2048)
sms_enabledboolean

Cannot be turned on while the platform SMS channel is off (422).

whatsapp_enabledboolean

Cannot be turned on while the platform WhatsApp channel is off (422).

notification_phonestring | null (max length 30)
allowed_domainsarray of string (hostname) | null

Public hostnames (e.g. example.com; no wildcards). Capped across the whole business.

recaptcha_enabledboolean
spam_protectionstring (one of: challenge, recaptcha, both, off)

Which spam defence runs. Defaults to challenge on create.

mailing_list_idinteger | null

A non-deleted mailing list belonging to this business.

mailing_list_email_fieldstring | null (max length 100)
mailing_list_first_name_fieldstring | null (max length 100)
mailing_list_last_name_fieldstring | null (max length 100)
form_schemaarray of any | null

Form-builder field list; normalised before storage.

form_stylesobject | null

Form-builder style map; normalised before storage.

Responses

200 application/json

The updated form (re-read from the database).

FieldTypeDescription
idinteger
business_idinteger
parent_form_idinteger | null
user_idinteger | null
namestring
pretty_namestring | null
uuidstring (uuid)
endpointstring (uri)

The public submission URL: https://app.formham.co.uk/submit/{uuid}.

redirect_urlstring | null
email_notificationsboolean
notification_emailsarray of string | null
reply_to_fieldstring | null
sms_enabledboolean
whatsapp_enabledboolean
notification_phonestring | null
webhook_urlstring | null
uploads_enabledboolean
allowed_domainsarray of string | null
field_mappingobject | array of any | null
form_schemaarray of any | object | null

Normalised form-builder field definitions.

form_stylesobject | array of any | null
recaptcha_enabledboolean | integer | null
recaptcha_site_keystring | null
recaptcha_versionstring | null
spam_protectionstring | null (one of: challenge, recaptcha, both, off, null)
spam_pow_difficultyinteger | null
is_activeboolean
max_fieldsinteger | null
mailing_list_idinteger | null
mailing_list_email_fieldstring | null
mailing_list_first_name_fieldstring | null
mailing_list_last_name_fieldstring | null
created_atstring | null (date-time)
updated_atstring | null (date-time)
deleted_atstring | null (date-time)

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

409 application/json

The resource's state does not allow this, or an Idempotency-Key request is still in flight.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

DELETE /api/agency/v1/app/forms/{id}Delete a form (soft)

Soft-deletes the form and deactivates it. Its public endpoint answers 410 Gone from then on; its submissions are kept for export and the retention sweep. The name is rewritten to "<name> (deleted #<id>)" (the original is kept as pretty_name if none was set) so a new form can reuse the name. Not restorable through this API. Owner/admin only.

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Form id (numeric primary key, not the UUID).

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

Deleted.

FieldTypeDescription
okboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/forms/{id}/duplicateDuplicate a form

Copies the form's fields, settings and every notification template under a new UUID endpoint. The copy is named "<name> (copy)", "(copy 2)" and so on. Owner/admin only, because the copy carries the source's delivery and security settings. No request body. 409 if the data changed during the operation.

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Id of the source form.

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Idempotency-Keyheaderstring (min length 1; max length 255)

Makes a retried create safe. See "Idempotency" above. Kept for 24 hours.

Responses

201 application/json

The new form.

FieldTypeDescription
idinteger
business_idinteger
parent_form_idinteger | null
user_idinteger | null
namestring
pretty_namestring | null
uuidstring (uuid)
endpointstring (uri)

The public submission URL: https://app.formham.co.uk/submit/{uuid}.

redirect_urlstring | null
email_notificationsboolean
notification_emailsarray of string | null
reply_to_fieldstring | null
sms_enabledboolean
whatsapp_enabledboolean
notification_phonestring | null
webhook_urlstring | null
uploads_enabledboolean
allowed_domainsarray of string | null
field_mappingobject | array of any | null
form_schemaarray of any | object | null

Normalised form-builder field definitions.

form_stylesobject | array of any | null
recaptcha_enabledboolean | integer | null
recaptcha_site_keystring | null
recaptcha_versionstring | null
spam_protectionstring | null (one of: challenge, recaptcha, both, off, null)
spam_pow_difficultyinteger | null
is_activeboolean
max_fieldsinteger | null
mailing_list_idinteger | null
mailing_list_email_fieldstring | null
mailing_list_first_name_fieldstring | null
mailing_list_last_name_fieldstring | null
created_atstring | null (date-time)
updated_atstring | null (date-time)
deleted_atstring | null (date-time)

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

409 application/json

The resource's state does not allow this, or an Idempotency-Key request is still in flight.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/app/forms/{id}/export/panelDownload a form's submissions

Streams every submission of one form as a file download (CSV by default, or JSON). Sensitive values are masked unless the caller is allowed to see them unmasked (platform administrators, or when submission masking is disabled). Every attempt, refusal and outcome is written to the data-access audit log. HEAD is rejected with 405.

On the agency API the business and requester are taken from the token and X-Business-Id; the browser panel's signed-link parameters do not apply. 403 Export access unavailable. when current authority cannot be confirmed; 422 Export options invalid. for a bad format; 503 when the audit trail cannot be written (no download starts). These bodies use a message key rather than error.

Roles: owner, admin, memberExtra rate limits: customer_read, customer_sensitiveSecurity: admin MFA and IP allowlist enforced for platform admins

Parameters

NameInTypeDescription
idrequiredpathinteger

Form id. Soft-deleted forms in the business can still be exported.

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

formatquerystring (one of: csv, json; default 'csv')
fromquerystring (date)

Earliest submission date (inclusive, from start of day). Any date string Carbon can parse; empty means no lower bound.

toquerystring (date)

Latest submission date (inclusive, to end of day). Empty means no upper bound.

Responses

200 text/csv

File download. Content-Disposition names it submissions-<form-slug>-<Ymd-His>.<csv|json>. Sent with Cache-Control: private, no-store, max-age=0.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

503 application/json

A temporary failure (audit store, file storage, provider). Retry with backoff.

POST /api/agency/v1/app/forms/{id}/testSend a test submission through a form

Stores a real submission (receipt id TEST-XXXXXXXX, data {name: "Test Submission", email: "test@example.com", _test: true}) and queues the form's live delivery channels for it: the notification emails if enabled, the webhook if one is set, and SMS/WhatsApp if enabled with a phone number. Sends real messages to the configured recipients. No request body.

Roles: owner, admin, memberExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Form id.

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The test submission was stored and its deliveries queued.

FieldTypeDescription
okboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/app/forms/{id}/webhook-secretShow the form's webhook signing secret

The per-form secret receivers use to verify X-Formham-Signature-V2. It is a credential, so owner/admin only. May generate and store a secret if the form does not yet have one. Re-reads the stored secret; does not rotate it.

Roles: owner, adminExtra rate limits: customer_read

Parameters

NameInTypeDescription
idrequiredpathinteger

Form id.

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The secret.

FieldTypeDescription
secretstring

HMAC key for verifying X-Formham-Signature-V2.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/forms/{id}/webhook-secret/rotateRotate the form's webhook signing secret

Generates and stores a new signing secret and returns it. Irreversible: the old secret stops being used immediately, so receivers verifying with it will reject deliveries until updated. Owner/admin only. No request body.

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Form id.

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The new secret.

FieldTypeDescription
secretstring

HMAC key for verifying X-Formham-Signature-V2.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/forms/{id}/webhook-testSend a signed sample to a webhook URL

POSTs a sample payload, signed exactly like a real delivery (plus X-Formham-Test: 1), to url if given or else the form's saved webhook_url, and reports what came back. Makes an outbound HTTP request to a customer-chosen address (public addresses only, pinned DNS, no redirects, 10 s timeout). Nothing is stored. A connection failure still returns 200 with ok: false. 422 when no URL is available or the URL is not a public http(s) address. Owner/admin only.

Roles: owner, adminExtra rate limits: customer_read, customer_external

Parameters

NameInTypeDescription
idrequiredpathinteger

Form id.

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
urlstring | null (uri; max length 2048)

URL to test instead of the saved webhook_url (e.g. one about to be saved).

Responses

200 application/json

The outcome of the test request.

FieldTypeDescription
okboolean

True when the receiver answered 2xx.

statusinteger | null

HTTP status returned, or null if the request could not be made.

latency_msinteger
errorstring | null

Why the request could not be made (null when a response came back).

bodystring | null (max length 500)

First 500 characters of the response body.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

Notifications

GET /api/agency/v1/app/forms/{id}/notificationsList a form's notification templates

Every email notification template on the form, the system-managed default one first, then by id.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
idrequiredpathinteger

Form id.

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The form's notifications.

FieldTypeDescription
[].idinteger
[].form_idinteger
[].namestring | null
[].recipient_typestring (one of: admin, custom, respondent)
[].recipient_emailstring | null
[].recipient_fieldstring | null
[].reply_to_modestring (one of: none, static, field)
[].reply_to_emailstring | null
[].reply_to_fieldstring | null
[].subjectstring
[].bodystring
[].is_activeboolean
[].is_defaultboolean
[].include_all_fieldsboolean | null
[].delay_minutesinteger
[].respect_business_hoursboolean
[].created_atstring | null (date-time)
[].updated_atstring | null (date-time)

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/forms/{id}/notificationsAdd a notification template to a form

Creates an additional (non-default) notification; is_active defaults to true. Future submissions to the form will send this email. A member may create notifications addressed to the business's recipients (admin) or the submitter (respondent), but recipient_type: custom or reply_to_mode: static names a fixed destination and returns 403 for a member. Audited. 409 if the data changed during the operation.

Roles: owner, admin, memberExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Form id.

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Idempotency-Keyheaderstring (min length 1; max length 255)

Makes a retried create safe. See "Idempotency" above. Kept for 24 hours.

Request body application/json

FieldTypeDescription
namestring | null (max length 255)
recipient_typerequiredstring (one of: admin, custom, respondent)

admin = the business's configured recipients; respondent = the submitter; custom = recipient_email (owner/admin only).

recipient_emailstring | null (max length 1000)

Address(es) for recipient_type: custom.

recipient_fieldstring | null (max length 100)
reply_to_moderequiredstring (one of: none, static, field)

static (a fixed reply_to_email) is owner/admin only.

reply_to_emailstring | null (email; max length 255)
reply_to_fieldstring | null (max length 100)
subjectrequiredstring (max length 500)
bodyrequiredstring (max length 50000)
include_all_fieldsboolean
delay_minutesinteger (min 0; max 20160)

Send delay in minutes (max 14 days).

respect_business_hoursboolean
is_activeboolean

Responses

201 application/json

The created notification.

FieldTypeDescription
idinteger
form_idinteger
namestring | null
recipient_typestring (one of: admin, custom, respondent)
recipient_emailstring | null
recipient_fieldstring | null
reply_to_modestring (one of: none, static, field)
reply_to_emailstring | null
reply_to_fieldstring | null
subjectstring
bodystring
is_activeboolean
is_defaultboolean
include_all_fieldsboolean | null
delay_minutesinteger
respect_business_hoursboolean
created_atstring | null (date-time)
updated_atstring | null (date-time)

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

409 application/json

The resource's state does not allow this, or an Idempotency-Key request is still in flight.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

PATCH /api/agency/v1/app/forms/{id}/notifications/{notificationId}Update a notification template

Updates any notification on the form, including the default one. Despite the PATCH verb the same validation as create applies, so recipient_type, reply_to_mode, subject and body are required on every call. A member may edit content, but actually changing the destination to a custom address (or a static reply-to) returns 403. Audited. 409 if the data changed during the operation.

Roles: owner, admin, memberExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Form id.

notificationIdrequiredpathinteger

Notification id (must belong to the form).

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
namestring | null (max length 255)
recipient_typerequiredstring (one of: admin, custom, respondent)

admin = the business's configured recipients; respondent = the submitter; custom = recipient_email (owner/admin only).

recipient_emailstring | null (max length 1000)

Address(es) for recipient_type: custom.

recipient_fieldstring | null (max length 100)
reply_to_moderequiredstring (one of: none, static, field)

static (a fixed reply_to_email) is owner/admin only.

reply_to_emailstring | null (email; max length 255)
reply_to_fieldstring | null (max length 100)
subjectrequiredstring (max length 500)
bodyrequiredstring (max length 50000)
include_all_fieldsboolean
delay_minutesinteger (min 0; max 20160)

Send delay in minutes (max 14 days).

respect_business_hoursboolean
is_activeboolean

Responses

200 application/json

The updated notification.

FieldTypeDescription
idinteger
form_idinteger
namestring | null
recipient_typestring (one of: admin, custom, respondent)
recipient_emailstring | null
recipient_fieldstring | null
reply_to_modestring (one of: none, static, field)
reply_to_emailstring | null
reply_to_fieldstring | null
subjectstring
bodystring
is_activeboolean
is_defaultboolean
include_all_fieldsboolean | null
delay_minutesinteger
respect_business_hoursboolean
created_atstring | null (date-time)
updated_atstring | null (date-time)

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

409 application/json

The resource's state does not allow this, or an Idempotency-Key request is still in flight.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

DELETE /api/agency/v1/app/forms/{id}/notifications/{notificationId}Delete a notification template

Permanently deletes a non-default notification; irreversible. The default notification can never be deleted (422 The default notification cannot be deleted.). Owner/admin only (403 otherwise). Audited. 409 if the data changed during the operation.

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Form id.

notificationIdrequiredpathinteger

Notification id (must belong to the form).

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

Deleted.

FieldTypeDescription
okboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

409 application/json

The resource's state does not allow this, or an Idempotency-Key request is still in flight.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

Delivery logs

GET /api/agency/v1/app/logsList recent delivery log entries

The 200 most recent delivery attempts (email, webhook, Slack, SMS, WhatsApp, mailing list, integration hook) across the business's submissions, newest first. Not paginated and takes no filters. status is the raw stored value; status_group and status_label are the customer-facing outcome (a quarantined lead is labelled Held).

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

Recent delivery log entries.

FieldTypeDescription
[].idinteger
[].typestring

Channel, e.g. email, webhook, slack, sms, whatsapp, mailing_list, hook.

[].statusstring (one of: success, delivered, failed, queued, pending, skipped, superseded, unknown)

Raw stored status.

[].status_groupstring (one of: sent, deferred, delivered, failed, pending, skipped)
[].status_labelstring

Display label, e.g. Sent, Delivered, Deferred, Failed, Queued, Held, Skipped, Superseded, Unknown.

[].recipientstring | null

Display form of the destination.

[].messagestring | null
[].formstring

The form's name, or Unknown.

[].receipt_idstring | null
[].timestring

H:i in the app timezone, or empty.

[].datestring

j M (e.g. 5 Mar), or empty.

[].is_todayboolean
[].atstring | null (date-time)

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/app/logs/failed-countCount today's failed deliveries

Number of delivery log rows with raw status failed created today (server day) for the business's submissions. Drives the failure badge.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The count.

FieldTypeDescription
countinteger (min 0)

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/logs/{id}/retryRetry a failed delivery

Re-dispatches one failed delivery. May send a real email, webhook, Slack message, SMS/WhatsApp or third-party sync. Only a row whose raw status is failed is eligible; the claim is atomic, so a concurrent double retry dispatches once and the loser gets 409.

Per channel: email, slack, mailing_list and a live hook mark this row queued and the job resolves it; webhook leaves this row as is and the job writes a fresh row; sms/whatsapp mark this row superseded and send again when the channel is live, or mark it skipped when the provider is not configured; a hook whose subscription is gone does nothing. No request body.

409 Only a failed delivery can be retried. or That submission no longer exists.

Roles: owner, admin, memberExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Delivery log row id.

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

Retry accepted (or settled with nothing to dispatch).

FieldTypeDescription
okboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

409 application/json

The resource's state does not allow this, or an Idempotency-Key request is still in flight.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

Mailing lists

GET /api/agency/v1/app/mailing-list-destination-providersList the destination types a mailing list can mirror to

Every external provider a list can be mirrored to, with the config keys each one accepts and which of them are secrets (returned masked as *** elsewhere). Static; not business-specific.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The providers.

FieldTypeDescription
[].keystring (one of: mailchimp, contentmate, webhook, google_sheets, brevo, mailerlite, hubspot, pipedrive)
[].labelstring
[].fieldsarray of string

Config keys this provider accepts.

[].secret_fieldsarray of string

Config keys that are secrets (masked as *** on read).

[].boolean_fieldsarray of string

Config keys that are booleans.

[].optional_fieldsarray of string

Config keys that may be left out.

[].testableboolean

Whether the connection test endpoints support this provider.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/app/mailing-listsList the business's mailing lists

Every (non-deleted) mailing list ordered by name, with subscriber counts and its destinations. Destination config secrets are masked as ***. Not paginated.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The mailing lists.

FieldTypeDescription
[].idinteger
[].namestring
[].descriptionstring | null
[].is_activeboolean | null

May be null in the create response, which does not re-read database defaults.

[].subscribersinteger

All subscribers, including unsubscribed.

[].activeinteger

Current (not unsubscribed) subscribers.

[].destinationsarray of object
[].destinations[].idinteger
[].destinations[].providerstring

Provider key, e.g. mailchimp, contentmate, webhook, google_sheets.

[].destinations[].provider_labelstring
[].destinations[].labelstring | null
[].destinations[].is_activeboolean
[].destinations[].configobject

Provider config with every secret key that is set replaced by ***.

[].destinations[].last_synced_atstring | null (date-time)
[].destinations[].last_errorstring | null
[].destinations[].is_failingboolean

True when last_error is set.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/mailing-listsCreate a mailing list

Creates an empty mailing list in the business. Owner/admin only (403 Only an owner or admin can manage mailing lists.).

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Idempotency-Keyheaderstring (min length 1; max length 255)

Makes a retried create safe. See "Idempotency" above. Kept for 24 hours.

Request body application/json

FieldTypeDescription
namerequiredstring (max length 255)
descriptionstring | null (max length 1000)

Responses

201 application/json

The created list (counts are always 0).

FieldTypeDescription
idinteger
namestring
descriptionstring | null
is_activeboolean | null

May be null in the create response, which does not re-read database defaults.

subscribersinteger

All subscribers, including unsubscribed.

activeinteger

Current (not unsubscribed) subscribers.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

PATCH /api/agency/v1/app/mailing-lists/{id}Rename or redescribe a mailing list

Updates the list's name and/or description. Where the list is mirrored to is managed through the destination endpoints instead. Owner/admin only.

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Mailing list id.

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
namestring (max length 255)
descriptionstring | null (max length 1000)

Responses

200 application/json

Updated.

FieldTypeDescription
okboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

DELETE /api/agency/v1/app/mailing-lists/{id}Delete a mailing list (soft)

Soft-deletes the list; it disappears from the API and can no longer be chosen by a form. Not restorable through this API. Owner/admin only.

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Mailing list id.

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

Deleted.

FieldTypeDescription
okboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/mailing-lists/{id}/destinationsMirror a mailing list to an external system

Adds an active destination; every future subscriber on the list is then sent to that third party (use the backfill endpoint for existing ones). config is validated by the chosen provider's own rules (see GET /app/mailing-list-destination-providers) and stored encrypted. label defaults to the provider's label. Audited as a data-sharing event. Owner/admin only. 422 Unknown destination type. (with an allowed list of provider keys) for an unrecognised provider.

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Mailing list id.

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Idempotency-Keyheaderstring (min length 1; max length 255)

Makes a retried create safe. See "Idempotency" above. Kept for 24 hours.

Request body application/json

FieldTypeDescription
providerrequiredstring
labelstring | null (max length 120)
configrequiredobject

api_key and server_prefix are required unless credentials_from: business (use the business's own Mailchimp credentials).

config.audience_idrequiredstring (max length 64)
config.api_keystring | null (max length 128)

Secret.

config.server_prefixstring | null

Data-centre prefix, e.g. us21.

config.credentials_fromstring | null (one of: business, null)
providerrequiredstring
labelstring | null (max length 120)
configrequiredobject
config.base_urlrequiredstring (uri; max length 255)

Must be https.

config.tokenrequiredstring (max length 255)

Secret. Must carry the formham:write ability and be bound to a team.

providerrequiredstring
labelstring | null (max length 120)
configrequiredobject
config.urlrequiredstring (uri; max length 2048)

Must be https.

config.secretstring | null (max length 255)

Secret.

providerrequiredstring
labelstring | null (max length 120)
configrequiredobject
config.urlrequiredstring (max length 2048)

An Apps Script web app URL: https://script.google.com/macros/s/…/exec.

config.secretstring | null (max length 255)

Secret.

providerrequiredstring
labelstring | null (max length 120)
configrequiredobject
config.api_keyrequiredstring (max length 255)

Secret.

config.list_idrequiredstring | integer
providerrequiredstring
labelstring | null (max length 120)
configrequiredobject
config.api_keyrequiredstring (max length 2048)

Secret.

config.group_idstring | integer | null
providerrequiredstring
labelstring | null (max length 120)
configrequiredobject
config.access_tokenrequiredstring (max length 255)

Secret. A private app access token.

config.add_noteboolean | null
providerrequiredstring
labelstring | null (max length 120)
configrequiredobject
config.api_tokenrequiredstring (max length 255)

Secret.

config.company_domainrequiredstring

The acme in acme.pipedrive.com.

config.create_leadboolean | null
config.add_noteboolean | null

Responses

201 application/json

Created.

FieldTypeDescription
okboolean
idinteger

The new destination's id.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

PATCH /api/agency/v1/app/mailing-lists/{id}/destinations/{destinationId}Update a mailing-list destination

Changes the label, active flag or individual config keys. Every config key is optional on update and is merged into the stored config; sending *** for a secret key (what the API returns for it) leaves the stored secret unchanged. The provider cannot be changed. Owner/admin only. 422 Unknown destination type. if the stored provider is no longer supported.

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Mailing list id.

destinationIdrequiredpathinteger

Destination id (must belong to the list).

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
labelstring | null (max length 120)

Null or omitted keeps the current label.

is_activeboolean
configobject

Any subset of the provider's config keys, each validated by the provider's rule for it. *** for a secret key is ignored.

Responses

200 application/json

Updated.

FieldTypeDescription
okboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

DELETE /api/agency/v1/app/mailing-lists/{id}/destinations/{destinationId}Stop mirroring a mailing list to a destination

Deletes the destination and its stored credentials. Subscribers already sent to the third party stay there. Owner/admin only.

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Mailing list id.

destinationIdrequiredpathinteger

Destination id (must belong to the list).

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

Deleted.

FieldTypeDescription
okboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/mailing-lists/{id}/destinations/{destinationId}/backfillPush every existing subscriber to a destination

Queues one sync job per subscriber on the list (an upsert for current subscribers, an unsubscribe for those who have left), sending their details to the third party. Audited with the number queued. Repeating it queues everyone again. No request body. Owner/admin only.

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Mailing list id.

destinationIdrequiredpathinteger

Destination id (must belong to the list).

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

Jobs queued.

FieldTypeDescription
okboolean
queuedinteger (min 0)

Number of subscriber sync jobs queued.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/mailing-lists/{id}/destinations/testTest destination credentials before saving them

Makes one read-only call to the vendor with the supplied config. Nothing is stored and no subscriber data is sent. Only providers whose testable is true. Owner/admin only.

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Mailing list id.

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
providerrequiredstring
configrequiredobject

The same keys as when creating a destination for this provider.

Responses

200 application/json

The test ran; see ok.

FieldTypeDescription
okboolean

Whether the vendor accepted the credentials. A refusal is still HTTP 200.

messagestring

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/mailing-lists/{id}/destinations/{destinationId}/testTest a saved destination's stored credentials

One read-only call to the vendor. Does not change the destination's sync status. Owner/admin only. No request body.

Roles: owner, adminExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
idrequiredpathinteger

Mailing list id.

destinationIdrequiredpathinteger

Destination id (must belong to the list).

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 application/json

The test ran; see ok.

FieldTypeDescription
okboolean

Whether the vendor accepted the credentials. A refusal is still HTTP 200.

messagestring

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/app/mailing-lists/{id}/exportDownload a list's current subscribers as CSV

Streams the list's current (not unsubscribed) subscribers as a CSV file download, columns Email, First name, Last name, Source, Subscribed at (ISO 8601). Bulk personal-data extraction: owner/admin only, and every attempt, refusal and outcome is audited. 503 when the audit trail cannot be written (no download starts). HEAD is rejected with 405.

Roles: owner, adminExtra rate limits: customer_read, customer_sensitiveSecurity: admin MFA and IP allowlist enforced for platform admins

Parameters

NameInTypeDescription
idrequiredpathinteger

Mailing list id.

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 text/csv

File download named list-<id>-subscribers.csv, sent with Cache-Control: private, no-store, max-age=0.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

503 application/json

A temporary failure (audit store, file storage, provider). Retry with backoff.

GET /api/agency/v1/app/mailing-lists/{id}/export/allDownload every subscriber, including unsubscribed, as CSV

Streams all of the list's subscribers, including those who unsubscribed, ordered by subscription date, as a CSV file download with columns Email, First Name, Last Name, Source, Subscribed At, Unsubscribed At (Y-m-d H:i:s). Owner/admin only; audited exactly like the current-subscriber export. 503 when the audit trail cannot be written. HEAD is rejected with 405.

Roles: owner, adminExtra rate limits: customer_read, customer_sensitiveSecurity: admin MFA and IP allowlist enforced for platform admins

Parameters

NameInTypeDescription
idrequiredpathinteger

Mailing list id.

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Responses

200 text/csv

File download named subscribers-<Y-m-d>.csv, sent with Cache-Control: private, no-store, max-age=0.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

503 application/json

A temporary failure (audit store, file storage, provider). Retry with backoff.

GET /api/agency/v1/app/mailing-lists/{id}/subscribersList a mailing list's current subscribers

Current (not unsubscribed) subscribers, most recently subscribed first, 50 per page. subscribed_at is a human-relative string (e.g. 3 days ago), not a timestamp; use the CSV export for exact times.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
idrequiredpathinteger

Mailing list id.

X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

pagequeryinteger (min 1; default 1)

Responses

200 application/json

A page of subscribers.

FieldTypeDescription
dataarray of object
data[].idinteger
data[].emailstring
data[].first_namestring | null
data[].last_namestring | null
data[].sourcestring | null
data[].subscribed_atstring

Human-relative time, e.g. 3 days ago.

current_pageinteger
last_pageinteger
per_pageinteger
totalinteger
frominteger | null
tointeger | null
first_page_urlstring
last_page_urlstring
next_page_urlstring | null
prev_page_urlstring | null
pathstring
linksarray of object
links[].urlstring | null
links[].labelstring
links[].activeboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

Leads (management)

GET /api/agency/v1/app/submission-files/{submissionFile}Download one submission attachment

Streams the stored bytes of one uploaded file as an attachment (Content-Disposition: attachment, Content-Type is the file's sniffed MIME type, X-Content-Type-Options: nosniff). This is the bearer-authenticated equivalent of the browser's signed download link and is the download_url returned by GET /app/submissions/{id}.

The file must belong to a submission of the selected business; a file of another tenant answers 404 exactly like one that does not exist. A file whose stored object was removed by a prune or an erasure also answers 404. Every download is written to the data-access audit log. HEAD is refused with 405.

Roles: owner, admin, memberExtra rate limits: customer_read, 60,1

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

submissionFilerequiredpathinteger (min 1)

Submission file id (route-model bound).

Responses

200 application/octet-stream

The file's bytes.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/app/submissionsList the business's submissions (the inbox)

The inbox list for the selected business, newest first, 50 per page.

Filters only ever narrow the business-scoped query, so a form_id from another tenant simply matches nothing. Without lead_status (and outside view=held) rows already marked spam are left out; pass lead_status=spam to see them. from / to that do not parse are ignored rather than rejected. q is a free-text search applied last (an email address, a receipt id, or text); search in the response says how it was interpreted.

With all=true the response is not paginated: up to 500 rows as {data, total}. held_count (quarantined rows in the business, whatever the filter) is included either way.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

viewquerystring (one of: held)

held lists only quarantined (held-for-review) submissions. Any other value lists everything.

form_idqueryinteger (min 1)

Only submissions of this form (digits only; anything else is ignored).

lead_statusquerystring (one of: new, contacted, won, lost, spam)

Follow-up status filter. new also matches submissions that never had a status set. Unknown values are ignored.

fromquerystring (date)

Inclusive start date (start of day). Unparseable values are ignored.

toquerystring (date)

Inclusive end date (end of day). Unparseable values are ignored.

qquerystring

Free-text search (email address, receipt id, or text in the submission).

allqueryboolean (default false)

Return up to 500 rows unpaginated instead of a page of 50.

pagequeryinteger (min 1; default 1)

Page number (paginated mode only).

Responses

200 application/json

A page of submissions, or (with all=true) up to 500 unpaginated.

FieldTypeDescription
dataarray of object
data[].idinteger
data[].form_idinteger
data[].formstring

Form name, or Unknown.

data[].emailstring

The submission's email field, or —.

data[].namestring

The submission's name field, or —.

data[].statusstring (one of: held, failed, deferred, pending, sent, delivered, stored)

What became of the submission's deliveries: held (quarantined, sent to nobody), then the worst latest outcome across destinations (failed, deferred, pending, sent), delivered when every destination confirmed delivery, stored when there were outcomes but none of the above.

data[].lead_statusstring (one of: new, contacted, won, lost, spam)

Follow-up status. A submission with no status set reads as new.

data[].time_agostring

Short relative age, or —.

data[].receipt_idstring (uuid)
data[].created_atstring

Formatted d M Y, H:i (not ISO 8601), or —.

data[].heldboolean

Quarantined (held for review).

data[].held_reasonstring | null

Plain-English reason written by the ingest pipeline; null unless held.

data[].held_hintstring | null (one of: likely_promotional, possibly_genuine, null)

A triage hint (not a verdict) for held, unerased rows; null otherwise.

current_pageinteger
last_pageinteger
per_pageinteger
totalinteger
frominteger | null
tointeger | null
first_page_urlstring
last_page_urlstring
next_page_urlstring | null
prev_page_urlstring | null
pathstring
linksarray of object
links[].urlstring | null
links[].labelstring
links[].activeboolean
held_countinteger

Quarantined submissions in the business.

searchobject | null

How q was interpreted; null when no q was given.

search.modestring (one of: none, email, receipt, text)
search.scannedinteger

Rows decrypted and scanned for a text search.

search.truncatedboolean

True when the text scan stopped at its cap.

dataarray of object (max items 500)
data[].idinteger
data[].form_idinteger
data[].formstring

Form name, or Unknown.

data[].emailstring

The submission's email field, or —.

data[].namestring

The submission's name field, or —.

data[].statusstring (one of: held, failed, deferred, pending, sent, delivered, stored)

What became of the submission's deliveries: held (quarantined, sent to nobody), then the worst latest outcome across destinations (failed, deferred, pending, sent), delivered when every destination confirmed delivery, stored when there were outcomes but none of the above.

data[].lead_statusstring (one of: new, contacted, won, lost, spam)

Follow-up status. A submission with no status set reads as new.

data[].time_agostring

Short relative age, or —.

data[].receipt_idstring (uuid)
data[].created_atstring

Formatted d M Y, H:i (not ISO 8601), or —.

data[].heldboolean

Quarantined (held for review).

data[].held_reasonstring | null

Plain-English reason written by the ingest pipeline; null unless held.

data[].held_hintstring | null (one of: likely_promotional, possibly_genuine, null)

A triage hint (not a verdict) for held, unerased rows; null otherwise.

totalinteger

Number of rows returned (not the business total).

held_countinteger
searchobject | null

How q was interpreted; null when no q was given.

search.modestring (one of: none, email, receipt, text)
search.scannedinteger

Rows decrypted and scanned for a text search.

search.truncatedboolean

True when the text scan stopped at its cap.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/submissions/bulk/lead-statusSet the follow-up status of up to 100 submissions

Sets the same lead status on every listed submission of the selected business. Ids from another tenant or that do not exist are skipped silently; ids / updated in the response report what was changed. Last write wins on concurrent updates. Day-to-day work: any member may do it.

Roles: owner, admin, memberExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
idsrequiredarray of integer (min 1) (max items 100)
statusrequiredstring (one of: new, contacted, won, lost, spam)

Follow-up status. A submission with no status set reads as new.

Responses

200 application/json

The submissions that were updated.

FieldTypeDescription
updatedinteger
idsarray of integer
lead_statusstring (one of: new, contacted, won, lost, spam)

Follow-up status. A submission with no status set reads as new.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/app/submissions/{id}Show one submission

The full submission for the inbox detail view. Answers are split server-side: fields holds what the visitor answered; technical_fields holds underscore metadata, plugin plumbing (CF7 _wpcf7*, captcha tokens) and, when the business hides technical fields (the default), recognised technical keys. Attachments carry a download_url pointing at GET /app/submission-files/{submissionFile}; preview_url is always null on this transport. A submission of another tenant answers 404.

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

idrequiredpathinteger (min 1)

Submission id (numeric; scoped to the selected business).

Responses

200 application/json

The submission.

FieldTypeDescription
fieldsobject

The visitor's answers, flattened, keyed by field name.

technical_fieldsobject

Underscore metadata and plugin/captcha plumbing.

page_urlstring | null

_source_url reported by the embed/plugin.

ipstring | null
created_atstring | null

Formatted d M Y, H:i.

lead_statusstring (one of: new, contacted, won, lost, spam)

Follow-up status. A submission with no status set reads as new.

erasedboolean

True when the submission was GDPR-redacted.

heldboolean
held_reasonstring | null
filesarray of object
files[].idinteger
files[].filenamestring
files[].bytesinteger
files[].mimestring
files[].download_urlstring (uri)

https://app.formham.co.uk/api/agency/v1/app/submission-files/{id} (bearer-authenticated).

files[].preview_urlnull

Always null on the agency transport.

logsarray of object
logs[].typestring

Delivery channel, e.g. email, webhook, hook, crm.

logs[].statusstring

Raw stored status.

logs[].status_groupstring

Normalised outcome group (e.g. delivered, failed, pending, skipped).

logs[].status_labelstring
logs[].recipientstring | null
logs[].messagestring | null

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

PUT /api/agency/v1/app/submissions/{id}/lead-statusSet one submission's follow-up status

Sets the lead status (new / contacted / won / lost / spam). Marking spam hides the lead from the default inbox list. Last write wins on concurrent updates. Any member may do it.

Roles: owner, admin, memberExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

idrequiredpathinteger (min 1)

Submission id (numeric; scoped to the selected business).

Request body application/json

FieldTypeDescription
statusrequiredstring (one of: new, contacted, won, lost, spam)

Follow-up status. A submission with no status set reads as new.

Responses

200 application/json

The status now stored.

FieldTypeDescription
lead_statusstring (one of: new, contacted, won, lost, spam)

Follow-up status. A submission with no status set reads as new.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

GET /api/agency/v1/app/submissions/{id}/notesList a submission's internal team notes

Internal notes on the submission, oldest first. can_delete says whether the caller may delete each one (its author, or an owner/admin).

Roles: owner, admin, memberExtra rate limits: customer_read

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

idrequiredpathinteger (min 1)

Submission id (numeric; scoped to the selected business).

Responses

200 application/json

The notes.

FieldTypeDescription
[].idinteger
[].bodystring
[].authorstring

Author's name, or Former team member.

[].created_atstring | null

Formatted d M Y, H:i.

[].can_deleteboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/submissions/{id}/notesAdd an internal team note to a submission

Adds a note (trimmed; an all-whitespace body is a 422 The note is empty.) and returns the full, updated note list. An erased (GDPR-redacted) submission takes no new notes: 409 This submission was erased; notes cannot be added to it. Any member may add a note.

Roles: owner, admin, memberExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Idempotency-Keyheaderstring (min length 1; max length 255)

Makes a retried create safe. See "Idempotency" above. Kept for 24 hours.

idrequiredpathinteger (min 1)

Submission id (numeric; scoped to the selected business).

Request body application/json

FieldTypeDescription
bodyrequiredstring (max length 5000)

Responses

201 application/json

Note added; the submission's full note list.

FieldTypeDescription
[].idinteger
[].bodystring
[].authorstring

Author's name, or Former team member.

[].created_atstring | null

Formatted d M Y, H:i.

[].can_deleteboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

409 application/json

The resource's state does not allow this, or an Idempotency-Key request is still in flight.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

DELETE /api/agency/v1/app/submissions/{id}/notes/{noteId}Delete an internal team note

Deletes one note and returns the remaining note list. Its author may delete it; otherwise owner/admin only (403 Only the note's author or a workspace owner/admin can delete it.).

Roles: owner, admin, memberExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

idrequiredpathinteger (min 1)

Submission id (numeric; scoped to the selected business).

noteIdrequiredpathinteger (min 1)

Responses

200 application/json

Note deleted; the remaining notes.

FieldTypeDescription
[].idinteger
[].bodystring
[].authorstring

Author's name, or Former team member.

[].created_atstring | null

Formatted d M Y, H:i.

[].can_deleteboolean

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

POST /api/agency/v1/app/submissions/{id}/releaseRelease a held (quarantined) submission for delivery

Runs the normal delivery pipeline once for a held lead: sends the notification emails, webhooks and integration hooks exactly as if it had arrived cleanly. Idempotent: a lead that is no longer held (already released, by you or a teammate racing you) answers 200 with released: false, already_released: true and nothing is sent again.

409 This lead cannot be released... when it was erased or its upload is still processing. 503 when delivery could not be queued; the lead stays held and nothing was sent. Any member may release.

Roles: owner, admin, memberExtra rate limits: customer_read, customer_write

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

idrequiredpathinteger (min 1)

Submission id (numeric; scoped to the selected business).

Responses

200 application/json

Released, or already released.

FieldTypeDescription
releasedboolean
already_releasedboolean

Present (true) only when the lead was no longer held.

statusstring (one of: held, failed, deferred, pending, sent, delivered, stored)

What became of the submission's deliveries: held (quarantined, sent to nobody), then the worst latest outcome across destinations (failed, deferred, pending, sent), delivered when every destination confirmed delivery, stored when there were outcomes but none of the above.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

409 application/json

The resource's state does not allow this, or an Idempotency-Key request is still in flight.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

503 application/json

A temporary failure (audit store, file storage, provider). Retry with backoff.

Privacy & erasure

Audited, owner/admin-only, irreversible or data-exporting operations. Require human approval in automated workflows.

POST /api/agency/v1/app/submissions/bulk/deletePermanently delete up to 100 submissions

Irreversible. Hard-deletes each listed submission of the selected business (including soft-deleted ones) with its files, delivery logs and linked mailing-list subscribers, and writes a deletion tombstone so a later agency DELETE /submissions/{receiptId} for the same receipt answers "already gone". Ids from another tenant or that do not exist are skipped silently; ids in the response lists what was actually deleted.

Owner/admin only (403 Only an owner or admin can delete submissions.; the refusal is audited). Every row is audited before and after. If an audit write or a deletion fails mid-batch the request stops and answers 503 with the partial result: {error, deleted, ids} naming the rows already deleted.

Roles: owner, adminExtra rate limits: customer_read, customer_sensitiveSecurity: admin MFA and IP allowlist enforced for platform admins

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
idsrequiredarray of integer (min 1) (max items 100)

Responses

200 application/json

What was deleted.

FieldTypeDescription
deletedinteger
idsarray of integer

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

404 application/json

Absent, or not reachable with this token (the two are indistinguishable).

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

503 application/json

Stopped part-way (audit or deletion failure). Rows already deleted are listed.

POST /api/agency/v1/app/submissions/erase-by-emailErase every submission from one email address (GDPR erasure)

Irreversible. Redacts the personal data of every submission in the selected business that belongs to the given address, redacts matching mailing-list subscribers and delivery-log recipients/messages, and deletes attached files. Rows are kept as redacted tombstones (_gdpr_redacted), not deleted.

Owner/admin only (403 Only an owner or admin can erase submission data.; the refusal is audited). The attempt and outcome are audited; if an audit write fails no erasure starts (503), and a failure during erasure answers 503 asking you to reconcile from the audit trail.

Roles: owner, adminExtra rate limits: customer_read, customer_sensitiveSecurity: admin MFA and IP allowlist enforced for platform admins

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

Request body application/json

FieldTypeDescription
emailrequiredstring (email)

Responses

200 application/json

Erasure counts.

FieldTypeDescription
erasedinteger

Same as redacted_submissions.

emailstring

The normalised address that was erased.

business_idinteger
redacted_submissionsinteger
redacted_subscribersinteger
redacted_logsinteger
deleted_filesinteger

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

503 application/json

A temporary failure (audit store, file storage, provider). Retry with backoff.

GET /api/agency/v1/app/submissions/exportExport submissions as CSV, or one data subject's data (DSAR)

Two modes, both owner/admin only (403 Only an owner or admin can export submission data.) and fully audited. Always a file download; HEAD is refused with 405.

  • Without email: a UTF-8 CSV (with BOM) of the business's submissions, one row per submission: Receipt ID, Form, Status, Submitted At, one column per field key seen (underscore keys skipped), then Lead Status last. Narrow with from, to, form_id and ids.
  • With email: a subject-access export for that address within this business. subject-data.json (application/json) or, when any matching submission has attachments, subject-data.zip (application/zip) containing the JSON and the files. An invalid address answers 422 A valid subject email address is required.

If an audit write fails, or preparation fails, nothing is downloaded and the answer is 503.

Roles: owner, adminExtra rate limits: customer_read, customer_sensitiveSecurity: admin MFA and IP allowlist enforced for platform admins

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

emailquerystring (email; max length 254)

Subject email address. Its presence switches to the DSAR export. Max 254 characters.

fromquerystring (date)

CSV mode only. Inclusive start date.

toquerystring (date)

CSV mode only. Inclusive end date.

form_idqueryinteger (min 1)

CSV mode only. Only this form's submissions.

idsquerystring

CSV mode only. Comma-separated submission ids ("export selected"); non-digit entries are dropped, capped at 500.

Responses

200 text/csv

The export file (Cache-Control: private, no-store).

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

503 application/json

A temporary failure (audit store, file storage, provider). Retry with backoff.

POST /api/agency/v1/app/submissions/{id}/eraseErase one submission's personal data (GDPR erasure)

Irreversible. Redacts the submission's data (it remains as a _gdpr_redacted tombstone), redacts its delivery logs and deletes its files. Reaches soft-deleted submissions too.

An id that does not exist in the selected business is not a 404: it answers 200 with redacted_submissions: 0. Owner/admin only (403 Only an owner or admin can erase submission data., audited). Attempt and outcome are audited; an audit failure means no erasure (503), and a failure during erasure answers 503 asking you to reconcile from the audit trail.

Note: unlike the other {id} routes this one has no numeric router constraint; send an integer.

Roles: owner, adminExtra rate limits: customer_read, customer_sensitiveSecurity: admin MFA and IP allowlist enforced for platform admins

Parameters

NameInTypeDescription
X-Business-Idheaderinteger (min 1)

The business this management request acts on. Optional for a token pinned to one business; required otherwise (422 when missing). A business_id query or body value may be used instead, but every selector supplied must agree (403 otherwise).

idrequiredpathinteger (min 1)

Submission id (numeric; scoped to the selected business).

Responses

200 application/json

Erasure result.

FieldTypeDescription
okboolean
business_idinteger

Absent when nothing matched.

redacted_submissionsinteger (one of: 0, 1)

0 when no such submission exists in this business.

redacted_logsinteger
deleted_filesinteger

Absent when nothing matched.

401 application/json

Missing, expired or revoked credential.

402 application/json

The business's subscription or trial has lapsed, or a plan limit was reached (payment_required or a specific code).

403 application/json

The token, plan, opt-in, role or membership refuses this action. Codes include token_not_scoped_for_agency_api, business_not_accessible, insufficient_role and the generic forbidden. Do not retry.

422 application/json

Invalid input (validation_failed with errors), or a specific code such as idempotency_key_reused.

423 application/json

The business is suspended (business_suspended).

429 application/json

A rate limit was exceeded. Wait for Retry-After.

503 application/json

A temporary failure (audit store, file storage, provider). Retry with backoff.