<!-- https://developers.silktide.com/v1/governance/report-templates/list-report-templates | Governance / Report templates -->

# List report templates

`GET /v1/report-templates`

Returns every report template the API key's user can see, sorted by name, with no paging. Use a template's `reportTemplateId` to [create a report](https://developers.silktide.com/v1/governance/reports/create-report.md) or a [report schedule](https://developers.silktide.com/v1/governance/report-schedules/create-report-schedule.md).

A template's `contextTypeId` says what a report made from it can cover, and so the shape of the `context` you send with it: `website` for one website or section, `websites` for several. See [Context](https://developers.silktide.com/v1/concepts/context.md).

A template's own `context` is not copied into reports made from it. Send the `context` you want each time.

Skip templates whose `isDisabled` is `true`: a live report made from one cannot be read.

## Response

Status `200`.

- `reportTemplates` (list of objects, required): Every report template the API key's user can see, built-in and custom, by name.
  - `reportTemplateId` (string, required, 1 to 16 characters): The template's id, such as `broken-links`.
  - `name` (string, required, at least 1 characters): Its name, as Silktide shows it.
  - `description` (string, required, up to 255 characters): What it is for, as Silktide shows it. Can be empty.
  - `rows` (list of objects, required): Its layout, one entry per row of widgets, top to bottom.
    - `columns` (integer, required, at least 1): How many widgets sit side by side in this row.
  - `created` (integer, required): When it was created.
  - `creatorAssigneeId` (string, required): The assignee who created it: a user (`u:`), an API key (`a:`), or `system` for those Silktide made itself.
  - `contextTypeId` (string, required): What kind of thing a report made from it covers: `website`, `websites`, `account` or `property`. One of: `website`, `websites`, `account`, `property`.
  - `context` (object or map of any JSON or empty list, required): The context its author built it with in Silktide. Reports made from it do not take it: send each report's own `context`. `[]` when it has none.
    - `websiteId` (integer, required, at least 1): The website.
    - `sectionId` (integer, required): One of its sections. `0` for the whole website.
  - `isCustom` (boolean, required): `true` if someone in the account made it, `false` if it comes with Silktide.
  - `isDisabled` (boolean, required): `true` when Silktide has switched it off. Live reports made from it cannot be read until it is switched back on.

## Errors

| Status | Type | When |
| --- | --- | --- |
| 403 | `EditionNotAvailable` | The account does not have Silktide 4. Reports, report schedules and report templates are Silktide 4's, so an account with only Silktide 5 cannot use them. |
| 401 | `NotLoggedIn` | No API key was sent, or it is not a key for this region. |
| 429 | `TooManyRequests` | Too many requests to this path in five seconds. Retry after the number of seconds in the `Retry-After` header, which `properties.retryAfter` repeats. |
| 503 | - | Silktide is busy. Retry after the number of seconds in the `Retry-After` header. |

## Access

- Permission: any user of the account
- Plan feature: none
- Edition: Silktide 4 only
- Cost: free
- Stability: stable, since 1.0.0

## Example: A built-in template and a custom one

```bash
curl "https://api.eu.silktide.com/v1/report-templates" \
  -H "Authorization: silktide token=$SILKTIDE_API_KEY"
```

Response:

```json
{
  "reportTemplates": [
    {
      "reportTemplateId": "broken-links",
      "name": "Broken links",
      "description": "Summary of broken links for a specific website or section.",
      "rows": [
        {
          "columns": 1
        },
        {
          "columns": 1
        }
      ],
      "created": 1790216527,
      "creatorAssigneeId": "system",
      "contextTypeId": "website",
      "context": [],
      "isCustom": false,
      "isDisabled": false
    },
    {
      "reportTemplateId": "accessibility-22",
      "name": "WCAG 2.2 summary",
      "description": "Summarize WCAG 2.2 standards for a specific website or section.",
      "rows": [
        {
          "columns": 1
        },
        {
          "columns": 4
        },
        {
          "columns": 1
        },
        {
          "columns": 5
        }
      ],
      "created": 1704913002,
      "creatorAssigneeId": "u:eu-12",
      "contextTypeId": "website",
      "context": {
        "websiteId": 3,
        "sectionId": 0
      },
      "isCustom": true,
      "isDisabled": false
    }
  ]
}
```
