V3 Creatives

Get a creative's counts

Changed on

Returns a creative's Impressions and Clicks per UTC day from from to to (both inclusive), their totals and Click rate, and, with groupBy, the same counts by page or by device type. Read access to the creative's workspace; an unknown or inaccessible creativeId answers 403.

Counts are kept per day, not per event. The web SDK reports what visitors see, and a background job adds it here about once a minute, so a count can lag by up to a minute. An instance running without its BullMQ worker never adds counts. Archived creatives keep their counts, deleting a creative deletes them, and a duplicate starts with none.

400 when from is after to, or the range spans more than 366 days.

get/api/v3/creatives/{creativeId}/stats

Request

  • Base URL
    https://app.formbricks.com
  • URL
    https://app.formbricks.com/api/v3/creatives/{creativeId}/stats
  • Auth
    • API key in cookie next-auth.session-token
    • or API key in header x-api-key
    • or HTTP bearer

Path parameters

creativeIdstring cuid2 required

Creative identifier.

Query parameters

fromstring date

First UTC day, inclusive (YYYY-MM-DD). Defaults to 29 days before to.

tostring date

Last UTC day, inclusive (YYYY-MM-DD). Defaults to today, in UTC.

groupBy'page' | 'device'

Adds a breakdown: page adds pages (host + path), device adds devices (phone, tablet, desktop). Omit for totals and days only.

Response

Counts retrieved successfully

Example response

{
  "data": {
    "pages": [
      {
        "page": "example.com/pricing"
      }
    ]
  }
}

Changes

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status

    • info

      endpoint added