---
openapi: 3.0.3
info:
  title: Braze REST API – Export Canvas list
  description: 'Use this endpoint to export a list of Canvases, including the name, Canvas API identifier and associated tags.

    '
  version: 1.0.0
  contact:
    name: Braze Support
    url: https://www.braze.com/docs/braze_support/
  license:
    name: Braze Documentation
    url: https://www.braze.com/docs/api/home/
servers:
  - url: https://rest.iad-01.braze.com
    description: US-01
  - url: https://rest.iad-02.braze.com
    description: US-02
  - url: https://rest.iad-03.braze.com
    description: US-03
  - url: https://rest.iad-04.braze.com
    description: US-04
  - url: https://rest.iad-05.braze.com
    description: US-05
  - url: https://rest.iad-06.braze.com
    description: US-06
  - url: https://rest.iad-07.braze.com
    description: US-07
  - url: https://rest.iad-08.braze.com
    description: US-08
  - url: https://rest.us-10.braze.com
    description: US-10
  - url: https://rest.fra-01.braze.eu
    description: EU-01
  - url: https://rest.fra-02.braze.eu
    description: EU-02
  - url: https://rest.au-01.braze.com
    description: AU-01
  - url: https://rest.id-01.braze.com
    description: ID-01
  - url: https://rest.jp-01.braze.com
    description: JP-01
  - url: https://rest.kr-01.braze.com
    description: KR-01
security:
- BearerAuth: []
paths:
  "/canvas/list":
    get:
      summary: Export Canvas list
      description: "## Prerequisites\n\nTo use this endpoint, you'll need an [API key]({{site.baseurl}}/api/basics#rest-api-key/) with the `canvas.list` permission.\n\n## Rate limit\n\nFor rate limit details, see [API rate limits]({{site.baseurl}}/api/api_limits/).\n\n## Request parameters\n\nThe following table lists the request parameters for this endpoint.\n\n| Parameter | Required | Data Type | Description |\n| --------- | -------- | --------- | ----------- |\n| `page` | Optional | Integer | The page of Canvases to return, defaults to `0` (returns the first set of up to 100) |\n| `include_archived` | Optional | Boolean | Whether or not to include archived Canvases, defaults to `false`. |\n| `sort_direction` | Optional | String | - Sort creation time from newest to oldest: pass in the value `desc`.<br> - Sort creation time from oldest to newest: pass in the value `asc`. <br><br>If `sort_direction` is not included, the default order is oldest to newest. |\n| `last_edit.time[gt]` | Optional | Time | Filters the results and only returns Canvases that were edited greater than the time provided until now. Format is `yyyy-MM-DDTHH:mm:ss`. |\n\n\n## Example request\n\nThe following sample request shows an example of how to export Canvas list.\n\n```\ncurl --location -g --request GET 'https://rest.iad-01.braze.com/canvas/list?page=1&include_archived=false&sort_direction=desc&last_edit.time[gt]=2020-06-28T23:59:59-5:00' \\\n--header 'Authorization: Bearer YOUR_REST_API_KEY'\n```\n\n## Response\n\nThe following sample response shows an example of the response returned when you export Canvas list.\n\n```json\n{\n  \"canvases\" : [\n  \t{\n  \t\t\"id\" : (string) the Canvas API identifier,\n  \t\t\"last_edited\": (ISO 8601 string) the last edited time for the message,\n  \t\t\"name\" : (string) the Canvas name,\n  \t\t\"tags\" : (array) the tag names associated with the Canvas formatted as strings,\n  \t},\n    ... (more Canvases)\n  ],\n  \"message\": (string) returns 'success' when the request completes without errors\n}\n```\n\n## Response status codes\n\nThe following table lists the responses for this endpoint, the error message you may receive, and how to resolve it.\n\n| Status code | Meaning | Error message | How to resolve |\n| --- | --- | --- | --- |\n| `200 OK` | The request succeeded and the response body includes the Canvas list. | `success` | No action needed. |\n| `400 Bad Request` | The `page` value isn't an integer. | `page must be an integer` | Pass a non-negative integer for `page`, then retry. |\n| `401 Unauthorized` | The REST API key is missing, malformed, or sent to the wrong REST endpoint. | `Invalid API key` | Send the key as `Authorization: Bearer YOUR_REST_API_KEY` to the correct [REST endpoint]({{site.baseurl}}/api/basics/#endpoints). For more causes, see [Errors and responses]({{site.baseurl}}/api/errors/#fatal-errors). |\n| `403 Access Denied` | The REST API key doesn't have the required permission. | `Access Denied` | Use a REST API key that has the `canvas.list` permission. |\n| `429 Rate Limited` | You exceeded the rate limit for this endpoint. | `Over rate limit` | Slow your request rate and retry with exponential backoff. See [API rate limits]({{site.baseurl}}/api/api_limits/). |\n| `5XX Internal Server Error` | An unexpected error occurred on the Braze server. | `Internal Server Error` | Retry with exponential backoff. If the error persists, contact [Support]({{site.baseurl}}/braze_support/). |\n\n**Tip:**\nFor help with CSV and API exports, visit [Export troubleshooting]({{site.baseurl}}/user_guide/data/distribution/export_braze_data/export_troubleshooting/).\n\n"
      operationId: get_canvas_list_get_canvases
      tags:
      - Export
      responses:
        '200':
          description: The request succeeded and the response body includes the Canvas list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CanvasesResponse'
        '400':
          description: The `page` value isn't an integer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The REST API key is missing, malformed, or sent to the wrong REST endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: The REST API key doesn't have the required permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: You exceeded the rate limit for this endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '5XX':
          description: An unexpected error occurred on the Braze server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      parameters:
      - name: page
        in: query
        required: false
        description: The page of Canvases to return, defaults to `0` (returns the first set of up to 100)
        schema:
          type: integer
          minimum: 0
          default: 0
      - name: include_archived
        in: query
        required: false
        description: Whether or not to include archived Canvases, defaults to `false`.
        schema:
          type: boolean
          default: false
      - name: sort_direction
        in: query
        required: false
        description: "- Sort creation time from newest to oldest: pass in the value `desc`.  - Sort creation time from oldest to newest: pass in the value `asc`.   If `sort_direction` is not included, the default order is oldest to newest."
        schema:
          type: string
          enum:
          - desc
          - asc
      - name: last_edit.time[gt]
        in: query
        required: false
        description: Filters the results and only returns Canvases that were edited greater than the time provided until now. Format is `yyyy-MM-DDTHH:mm:ss`.
        schema:
          type: string
components:
  schemas:
    CanvasesResponse:
      type: object
      properties:
        canvases:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: The Canvas API identifier.
              last_edited:
                type: string
                description: The last edited time for the message.
              name:
                type: string
                description: The Canvas name.
              tags:
                type: array
                items:
                  type: string
                description: The tag names associated with the Canvas formatted as strings.
        message:
          type: string
          description: Returns 'success' when the request completes without errors.
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: The error message describing why the request failed.
        errors:
          type: array
          description: Non-fatal errors encountered while processing the request. Data unaffected by these errors is still processed.
          items:
            type: object
            properties:
              type:
                type: string
                description: The error type.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: REST API key
