## List Sessions

**get** `/print-mail/v1/template_editor_sessions`

Retrieve a paginated list of Template Editor Sessions.

### Query Parameters

- `limit: optional number`

- `search: optional string`

  You can supply any string to help narrow down the list of resources. For example, if you pass `"New York"` (quoted), it will return resources that have that string present somewhere in their response. Alternatively, you can supply a structured search query. See the documentation on `StructuredSearchQuery` for more details.

- `skip: optional number`

### Returns

- `data: array of object { id, createdAt, live, 7 more }`

  - `id: string`

    A unique ID prefixed with `template_editor_session_`.

  - `createdAt: string`

    The UTC time at which this session was created.

  - `live: boolean`

    `true` if this is a live mode session else `false`.

  - `object: "template_editor_session"`

    Always `template_editor_session`.

    - `"template_editor_session"`

  - `template: string`

    ID of the underlying template that this edits.

  - `url: string`

    A URL that can be iframed or redirected to for editing the template.

  - `backURL: optional string`

    The URL supplied when this editor session was created.

  - `styles: optional object { canvas, panelText, saveButton }`

    Style overrides for the template editor session.

    - `canvas: optional object { backgroundColor }`

      Style overrides for the template editor canvas.

      - `backgroundColor: optional string`

        The canvas background color.

    - `panelText: optional object { color }`

      Style overrides for template editor panel text.

      - `color: optional string`

        The panel text color.

    - `saveButton: optional object { backgroundColor, textColor }`

      Style overrides for the template editor save button.

      - `backgroundColor: optional string`

        The save button background color.

      - `textColor: optional string`

        The save button text color.

  - `title: optional string`

    The title supplied when this editor session was created.

  - `trackers: optional "all" or "none" or array of string`

    Controls which Trackers are displayed in the template editor session.

    - `"all" or "none"`

      - `"all"`

      - `"none"`

    - `array of string`

- `limit: number`

- `object: "list"`

  - `"list"`

- `skip: number`

- `totalCount: number`

### Example

```http
curl https://api.postgrid.com/print-mail/v1/template_editor_sessions \
    -H "X-API-Key: $POSTGRID_PRINT_MAIL_API_KEY"
```

#### Response

```json
{
  "object": "list",
  "limit": 10,
  "skip": 0,
  "totalCount": 1,
  "data": [
    {
      "id": "template_editor_session_bBYRQ5DKu3LJ5yNemoAQ7E3or6E7Yzd7FGNWJSXBRrAfcdoNXNGLvfZxAm2dJYiv9c",
      "object": "template_editor_session",
      "live": false,
      "template": "template_eYxcbMKPZEZPk71ZJPA6Yz",
      "backURL": "https://postgrid.com",
      "title": "My Editor Session",
      "trackers": "none",
      "url": "https://dashboard.postgrid.com/embed/template_editor_sessions/template_editor_session_bBYRQ5DKu3LJ5yNemoAQ7E3or6E7Yzd7FGNWJSXBRrAfcdoNXNGLvfZxAm2dJYiv9c",
      "createdAt": "2023-07-05T19:36:01.369Z"
    }
  ]
}
```
