> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squasher.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Summary sections API

> List, add, and remove the custom sections of the weekly summary email. Each custom section runs one reliability report over the week.

The [weekly summary email](/features/reporting#weekly-summary-email) has built-in sections and
custom sections. A custom section runs one [reliability report](/api-reference/reports) over the
summarized week (Monday to Sunday, UTC) and shows the KPIs of that report.

Custom sections belong to the organization of the project. A section covers a list of projects. A
section with an empty `project_ids` list covers every project of the organization. A section that
you add through this API covers only the project in the path.

## Operations

| Operation | Method and path | Access | Purpose |
| - | - | - | - |
| `summarySections.list` | `GET /v1/projects/{project_id}/summary-sections` | `project:read` | List the sections that cover this project. |
| `summarySections.create` | `POST /v1/projects/{project_id}/summary-sections` | `project:write` | Add a custom section about this project. |
| `summarySections.delete` | `DELETE /v1/projects/{project_id}/summary-sections/{section_id}` | `project:write` | Remove a custom section about this project. |

## List the sections

```bash theme={null}
curl --url "https://api.squasher.ai/v1/projects/$SQUASHER_PROJECT_ID/summary-sections" \
  --header "x-squasher-key: $SQUASHER_API_KEY"
```

```json theme={null}
{
  "builtin_sections": [
    { "key": "overview", "title": "Key numbers" },
    { "key": "projects", "title": "Projects" },
    { "key": "monitors", "title": "Monitors" },
    { "key": "incidents", "title": "Longest incidents" },
    { "key": "certificates", "title": "Certificates expiring soon" },
    { "key": "issues", "title": "Most active open issues" }
  ],
  "sections": [
    {
      "id": "8b0f3d52-1c6e-4f2a-9d7b-3e5a1c9f0b21",
      "title": "Checkout SLA",
      "report_id": "sla",
      "project_ids": ["5d2a7c1e-9b3f-4e8a-a1c6-7f0e2b4d9c35"],
      "created_at": "2026-10-08T09:00:00.000Z"
    }
  ]
}
```

`builtin_sections` lists the fixed sections in email order. Each person can hide a section in
their notification preferences. `sections` lists the custom sections that cover this project,
oldest first. The email shows custom sections in this order, after the built-in sections.

## Add a section

The body has two fields:

| Field | Description |
| - | - |
| `title` | The section heading in the email. 1 to 80 characters. |
| `report_id` | A report ID from [`reports.list`](/api-reference/reports#report-ids), such as `sla`. |

```bash theme={null}
curl --request POST \
  --url "https://api.squasher.ai/v1/projects/$SQUASHER_PROJECT_ID/summary-sections" \
  --header "x-squasher-key: $SQUASHER_API_KEY" \
  --header "content-type: application/json" \
  --data '{ "title": "Checkout SLA", "report_id": "sla" }'
```

The response has status `201` and the new section in `section`.

## Remove a section

```bash theme={null}
curl --request DELETE \
  --url "https://api.squasher.ai/v1/projects/$SQUASHER_PROJECT_ID/summary-sections/$SECTION_ID" \
  --header "x-squasher-key: $SQUASHER_API_KEY"
```

The response is `{ "deleted": true }`. You can remove only a section whose `project_ids` is
exactly this project. This API cannot remove a section that covers more projects.

## Errors

| Status | When |
| - | - |
| `400` | The title is empty or longer than 80 characters, or the report ID is not known. |
| `403` | The key does not have the necessary access to the project. |
| `404` | The project does not exist, or no section about exactly this project has the given ID. |
| `409` | The organization already has 10 custom sections. Remove a section before you add one. |

## TypeScript client and CLI

```typescript theme={null}
const { builtin_sections, sections } = await client.summarySections.list();
const { section } = await client.summarySections.create({
  title: "Checkout SLA",
  report_id: "sla",
});
await client.summarySections.delete(section.id);
```

```bash theme={null}
squasher summary-sections list --project <project_id>
squasher summary-sections add --project <project_id> --report sla --title "Checkout SLA"
squasher summary-sections remove --project <project_id> <section_id>
```

`squasher summary-sections remove` asks you to confirm. Add `--yes` to skip the prompt.

## Related guides

* [Reliability reports](/features/reporting)
* [Reports API](/api-reference/reports)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.