Reports

Intro

Endpoint: https://api.omnisend.com/api/forms

The Forms Reports API lets you retrieve performance statistics for your forms, list contacts collected through a form, and access A/B test reports for form experiments.

All endpoints are keyed by formID, a 24-character hexadecimal identifier, and require the forms.read scope.

Form summary report

Use GET /api/forms/{formID}/report to retrieve total statistics and a breakdown by device for a form within a date range.

Query parameters

Both date range parameters are required.

ParameterTypeDescription
createdAtFromstringRequired. Start of the date range, inclusive (RFC3339, e.g. 2024-01-01T00:00:00Z)
createdAtTostringRequired. End of the date range, inclusive (RFC3339, e.g. 2024-01-31T23:59:59Z)

Metrics

MetricDescription
viewsNumber of times the form was displayed to a visitor
interactionsNumber of views where the visitor engaged with the form without necessarily completing it
submitsNumber of successful form submissions
signupsNumber of contacts gained through the form

Views, interactions and submits form a funnel, so viewsinteractionssubmits. Signups can differ from submits — a submission by an already known contact does not produce a new contact — so treat the two as related but not interchangeable.

The statisticsByDevice object contains the same metrics grouped by device type (desktop, mobile, tablet). Device buckets without activity in the range are omitted.

Date ranges and time buckets are interpreted in the brand's timezone.

Example: Get form summary report

curl --request GET \
     --url 'https://api.omnisend.com/api/forms/000000000000000000000001/report?createdAtFrom=2024-01-01T00:00:00Z&createdAtTo=2024-01-31T23:59:59Z' \
     --header 'Authorization: Omnisend-API-Key YOUR_API_KEY' \
     --header 'Omnisend-Version: 2026-preview' \
     --header 'accept: application/json'

Response:

{
  "formID": "000000000000000000000001",
  "statistics": {
    "views": 12500,
    "interactions": 3200,
    "submits": 840,
    "signups": 790
  },
  "statisticsByDevice": {
    "desktop": {
      "views": 8000,
      "interactions": 2100,
      "submits": 560,
      "signups": 530
    },
    "mobile": {
      "views": 4000,
      "interactions": 1000,
      "submits": 250,
      "signups": 235
    },
    "tablet": {
      "views": 500,
      "interactions": 100,
      "submits": 30,
      "signups": 25
    }
  }
}

Form periodic report

Use GET /api/forms/{formID}/report/periodic to retrieve time-bucketed statistics for a form within a date range.

Rows carry the same metrics as the summary report, but this endpoint does not return a device breakdown — use the summary report for that.

Query parameters

ParameterTypeDescription
createdAtFromstringRequired. Start of the date range, inclusive (RFC3339, e.g. 2024-01-01T00:00:00Z)
createdAtTostringRequired. End of the date range, inclusive (RFC3339, e.g. 2024-01-31T23:59:59Z)
granularitystringTime bucket granularity. One of hour, day, week, month, year

Granularity

When granularity is omitted it is derived from the length of the requested range:

Date rangeGranularity used
One dayhour
Up to a monthday
Up to two yearsmonth
Longer than two yearsyear

When it is provided, it must be available for the range or the request is rejected with 400:

GranularityAllowed date range
hourOne day
dayLonger than a day, up to a month
weekLonger than a day, up to three months
monthLonger than a month, up to two years
yearLonger than two years

The period value of each row is formatted according to the granularity in effect: RFC3339 for hour, a date for day and week, YYYY-MM for month, and YYYY for year.

Example: Get form periodic report

curl --request GET \
     --url 'https://api.omnisend.com/api/forms/000000000000000000000001/report/periodic?createdAtFrom=2024-01-01T00:00:00Z&createdAtTo=2024-01-07T23:59:59Z&granularity=day' \
     --header 'Authorization: Omnisend-API-Key YOUR_API_KEY' \
     --header 'Omnisend-Version: 2026-preview' \
     --header 'accept: application/json'

Response — one row per time bucket:

{
  "formID": "000000000000000000000001",
  "granularity": "day",
  "rows": [
    {
      "period": "2024-01-01",
      "statistics": {
        "views": 1800,
        "interactions": 450,
        "submits": 120,
        "signups": 110
      }
    },
    {
      "period": "2024-01-02",
      "statistics": {
        "views": 2100,
        "interactions": 520,
        "submits": 140,
        "signups": 132
      }
    }
  ]
}

Form contacts

Use GET /api/forms/{formID}/contacts to retrieve contacts who submitted a specific form.

Query parameters

ParameterTypeDescription
limitintegerMaximum number of contacts per page (default 250, max 250)
sortstringSort field. Currently only createdAt is supported
directionstringSort direction. asc or desc (default desc)
afterstringOpaque cursor for fetching the next page
beforestringOpaque cursor for fetching the previous page

Contacts are ordered by contact creation time embedded in the contact ID. The response submittedAt field reflects when the contact signed up through this form and may differ from the sort key for existing subscribers.

Pagination is cursor-based: read the cursors from paging in the response and pass them to after to fetch the next page or to before to step back. Cursors are opaque — do not construct them.

Contact fields

FieldDescription
idContact identifier
emailContact email address
phoneNumberContact phone number
firstNameFirst name
lastNameLast name
countryCountry
genderGender
discountDiscount code received
submittedAtSignup timestamp on this form
customPropertiesArray of custom properties collected by the form

Each custom property has a name as configured on the form, a type (string, number, bool, date, or list), and a value whose shape follows that type. The set of properties varies per form, and can vary per contact when a field was optional or added after earlier signups.

Example: Get form contacts

curl --request GET \
     --url 'https://api.omnisend.com/api/forms/000000000000000000000001/contacts?limit=50' \
     --header 'Authorization: Omnisend-API-Key YOUR_API_KEY' \
     --header 'Omnisend-Version: 2026-preview' \
     --header 'accept: application/json'

To paginate through results, use the after cursor from the previous response:

curl --request GET \
     --url 'https://api.omnisend.com/api/forms/000000000000000000000001/contacts?limit=50&after=eyJpZCI6ImNhbXAtNDU2In0' \
     --header 'Authorization: Omnisend-API-Key YOUR_API_KEY' \
     --header 'Omnisend-Version: 2026-preview' \
     --header 'accept: application/json'

A/B setup reports

Use GET /api/forms/{formID}/ab-setup/reports to retrieve the A/B setup reports of a form.

Both running (enabled) and finished (completed) setups are included, so a test that is still collecting data is returned with its statistics so far. If the form has no A/B setups, the endpoint responds with 200 OK and an empty reports array.

Report fields

FieldDescription
abSetupIDIdentifier of the A/B setup
statusStatus of the A/B setup
startedAtWhen the A/B setup started
completedAtWhen the A/B setup completed; omitted while the test is running
winnerName of the version selected when the test completed; omitted while the test is running and when no winner was determined
versionStatisticsArray of per-version statistics (see below)

Each entry in versionStatistics contains:

FieldDescription
versionNameName of the version
splitValuePercentage of eligible traffic routed to the version; split values of a setup add up to 100
statisticsPer-version form metrics (see Metrics)

Compare versions using rates derived from views rather than raw counts, because an uneven split gives versions different traffic volumes.

Example: List A/B setup reports

curl --request GET \
     --url 'https://api.omnisend.com/api/forms/000000000000000000000001/ab-setup/reports' \
     --header 'Authorization: Omnisend-API-Key YOUR_API_KEY' \
     --header 'Omnisend-Version: 2026-preview' \
     --header 'accept: application/json'

Response:

{
  "reports": [
    {
      "abSetupID": "000000000000000000000010",
      "status": "completed",
      "startedAt": "2024-01-01T00:00:00Z",
      "completedAt": "2024-01-15T00:00:00Z",
      "winner": "Version A",
      "versionStatistics": [
        {
          "versionName": "Version A",
          "splitValue": 50,
          "statistics": {
            "views": 6000,
            "interactions": 1500,
            "submits": 420,
            "signups": 400
          }
        },
        {
          "versionName": "Version B",
          "splitValue": 50,
          "statistics": {
            "views": 6000,
            "interactions": 1300,
            "submits": 360,
            "signups": 340
          }
        }
      ]
    },
    {
      "abSetupID": "000000000000000000000011",
      "status": "enabled",
      "startedAt": "2024-02-01T00:00:00Z",
      "versionStatistics": [
        {
          "versionName": "Version A",
          "splitValue": 60,
          "statistics": {
            "views": 1200,
            "interactions": 300,
            "submits": 90,
            "signups": 85
          }
        },
        {
          "versionName": "Version B",
          "splitValue": 40,
          "statistics": {
            "views": 800,
            "interactions": 190,
            "submits": 55,
            "signups": 52
          }
        }
      ]
    }
  ]
}

See also