analytics
<Warning>

This API is currently provided as a preview. Be aware of the following:

  • There might be unannounced breaking changes.
  • Any breaking changes to preview APIs won't produce a new API version.
  • Public apps that use preview APIs will not pass the review process, and can't be made available to all Canva users.
</Warning> <Availability> To use this API, your app must act on behalf of a user who is a member of a [Canva Enterprise](https://www.canva.com/enterprise/) organization. </Availability>

Lists the page-level view duration data for a design.

The request body can include page filters and pagination controls.

post/v1/designs/{designId}/analytics/page-views

Request

  • Base URL: https://api.canva.com/rest
  • URL: https://api.canva.com/rest/v1/designs/{designId}/analytics/page-views
  • Auth: OAuth 2 (authorization code, authorization URL https://www.canva.com/api/oauth/authorize, token URL https://api.canva.com/rest/v1/oauth/token, scopes: design:content:read)

Path parameters

designIdstring required

The design ID.

Request body

page_idsstring[] required

The design page IDs to retrieve view duration data for.

limitinteger

The maximum number of page results to return per page.

continuationstring

If the success response contains a continuation token, there are more page results you can list. You can use this token in the request body and retrieve more page results from the list.

To retrieve all page results, you might need to make multiple requests.

Example request

{
  "page_ids": [
    "PBBKfZml7MRHRQVw",
    "PBBKfZml7Mghjsdg"
  ],
  "limit": 50,
  "continuation": "RkFGMgXlsVTDbMd:MR3L0QjiaUzycIAjx0yMyuNiV0OildoiOwL0x32G4NjNu4FwtAQNxowUQNMMYN",
  "filter": {
    "type": "by_viewer",
    "link_id": "hddb98a3716",
    "viewer_id": "b2d44753-f996-46ff-8f01-d4143911550f"
  }
}

Response

OK

continuationstring

If the success response contains a continuation token, there are more page results you can list. You can use this token in the request body and retrieve more page results from the list.

To retrieve all page results, you might need to make multiple requests.

Example response

{
  "items": [
    {
      "page_id": "PBBKfZml7MRHRQVw",
      "total_view_duration_seconds": 1860,
      "average_duration_seconds": 21.5,
      "unique_view_count": 87
    }
  ],
  "continuation": "RkFGMgXlsVTDbMd:MR3L0QjiaUzycIAjx0yMyuNiV0OildoiOwL0x32G4NjNu4FwtAQNxowUQNMMYN"
}

Changes

    • warning

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

    • warning

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

    • warning

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

    • warning

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

    • warning

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

    • warning

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

    • warning

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

    • warning

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

    • warning

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

    • warning

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

    • warning

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

    • warning

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