AudienceRelay

Developer documentation

AudienceRelay API

Submit website forms and retrieve structured responses using the versioned REST API.

Open workspace

Base URL and API version

https://staging.audiencerelay.com/api/v1

All request and response bodies use JSON unless an endpoint states otherwise. Keep integrations on v1 until a later version is explicitly released.

Tokens and authentication

Publishable form token

Each form has a publishable token used only to receive submissions. It is safe to include in browser code. It cannot read forms, contacts, or submissions.

Secret API key

Read endpoints require a secret key created in the workspace. Send it from your server and never place it in browser JavaScript.

Authorization: Bearer ar_live_YOUR_SECRET_KEY

Keys are displayed once, stored as hashes, and can be revoked from the workspace.

POST

Submit form data

https://staging.audiencerelay.com/api/v1/forms/PUBLIC_FORM_TOKEN/submissions

The JSON keys must match the configured field keys. Unknown keys are ignored. Required fields must be present. For waitlist and newsletter forms, set marketing_consent only after the person explicitly agrees to receive email.

Browser example

const response = await fetch(
  "https://staging.audiencerelay.com/api/v1/forms/PUBLIC_FORM_TOKEN/submissions",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      name: "Ada",
      email: "ada@example.com",
      marketing_consent: true
    })
  }
);

const submission = await response.json();

cURL example

curl -X POST \
  "https://staging.audiencerelay.com/api/v1/forms/PUBLIC_FORM_TOKEN/submissions" \
  -H "Content-Type: application/json" \
  -d '{"email":"ada@example.com","marketing_consent":true}'

201 response

{
  "id": 184,
  "created_at": "2026-08-15T12:30:00+00:00"
}

Browser origin protection

Add every website origin that may submit a form, including its scheme. Paths are not origins.

https://example.com
https://www.example.com

Browser preflight requests are supported. An empty origin list allows the hosted form and server-to-server requests, but rejects cross-origin browser requests.

GET

List forms

curl "https://staging.audiencerelay.com/api/v1/forms" \
  -H "Authorization: Bearer ar_live_YOUR_SECRET_KEY"

200 response

{
  "data": [
    {
      "id": 12,
      "name": "Product launch waitlist",
      "type": "waitlist",
      "status": "active",
      "public_token": "PUBLISHABLE_TOKEN"
    }
  ]
}

GET

List submissions

curl "https://staging.audiencerelay.com/api/v1/forms/FORM_ID/submissions?limit=50" \
  -H "Authorization: Bearer ar_live_YOUR_SECRET_KEY"

limit accepts 1–100 and defaults to 50. Results are newest first. When next_cursor is not null, pass it as cursor to request the next page.

GET /api/v1/forms/12/submissions?limit=50&cursor=184

200 response

{
  "data": [
    {
      "id": 183,
      "data": {"email": "ada@example.com"},
      "email": "ada@example.com",
      "marketing_consent": true,
      "created_at": "2026-08-15T12:30:00+00:00"
    }
  ],
  "next_cursor": null
}

Errors and limits

StatusMeaning
400Invalid JSON, missing required data, invalid email, or invalid field option.
401Secret API key is missing, invalid, revoked, or does not have paid access.
403The browser origin is not allowed.
404The form does not exist, is inactive, or belongs to another workspace.
429The form received too many submissions from the same source in one minute.

Error responses use the shape {"error":"Human-readable explanation."}. Public submissions currently allow up to ten requests per form and source per minute.