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

# Update Failed Run Alerts

> Be emailed when a workflow fails, and choose who receives it

Turn failed-run alerts on or off, choose whether each workflow's owner is emailed, and set
extra recipients. When a workflow fails, each recipient gets one email naming the
workflow, how many times it failed, the error, and a link to its runs. An owner hears about
their own workflows; an extra recipient hears about all of them.

> [!NOTE]
>
> **On by default, to the workflow's owner.** The owner is whoever last turned the workflow
> on, else whoever created it. When neither is recorded, or that person is no longer a
> member of the workspace, the email goes to the workspace admins. Addresses are
> de-duplicated across the owner, the admins and the extra recipients.

> [!NOTE]
>
> **At most one email a day per unique failure.** A workflow failing the same way every hour is
> mentioned once; a new way of failing is mentioned on the next check, within fifteen minutes.
> Import jobs and the built-in scans are not covered yet; they stay on the Runs feed and the
> Needs attention lens the email links to.

```bash cURL theme={null}
curl -X PUT https://api.clustr-ai.com/api/public/notifications/failed-runs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled": true, "notify_defaults": true, "recipients": ["ops@example.com"]}'
```

```python Python theme={null}
import requests

requests.put(
    "https://api.clustr-ai.com/api/public/notifications/failed-runs",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"enabled": True, "notify_defaults": True, "recipients": ["ops@example.com"]},
)
```

```javascript JavaScript theme={null}
await fetch("https://api.clustr-ai.com/api/public/notifications/failed-runs", {
  method: "PUT",
  headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({ enabled: true, notify_defaults: true, recipients: ["ops@example.com"] }),
});
```

```json 200 theme={null}
{
  "success": true,
  "data": {
    "enabled": true,
    "notify_defaults": true,
    "recipients": ["ops@example.com"],
    "is_default": false,
    "updated_at": "2026-09-18T09:12:44Z"
  }
}
```

```json 400 theme={null}
{
  "success": false,
  "error": {
    "message": "email the workflow's owner or add at least one recipient to turn failed-run alerts on",
    "code": "BAD_REQUEST"
  }
}
```


## OpenAPI

````yaml PUT /notifications/failed-runs
openapi: 3.1.0
info:
  title: Clustr Public API
  description: >
    Programmatic access to your Clustr network: import connectors, search warm
    intros (opportunities), and manage target accounts.


    ## Authentication

    All endpoints require a Bearer token (API key) in the `Authorization`
    header.


    ```

    Authorization: Bearer <your_api_key>

    ```


    API keys can be created and managed from the [API settings
    page](https://app.clustr-ai.com/api).
  version: '1.0'
  contact:
    name: Clustr Support
    url: https://clustr-ai.com
servers:
  - url: https://api.clustr-ai.com/api/public
    description: Production
security:
  - BearerAuth: []
paths:
  /notifications/failed-runs:
    put:
      tags:
        - Notifications
      summary: Update Failed Run Alerts
      description: >-
        Turns failed-run alerts on or off and sets the recipients. Alerts are on
        by default, and each distinct failure sends at most one email a day.
        Turning alerts on needs `notify_defaults` or at least one recipient.
      operationId: updateFailedRunAlerts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                enabled:
                  type: boolean
                  description: >-
                    Whether failed-run emails go out at all. Turning it on needs
                    `notify_defaults` or at least

                    one recipient.
                recipients:
                  type: array
                  description: >-
                    Extra email addresses that receive the alert in addition to
                    the workflow's owner. Addresses are lower-cased and
                    de-duplicated; an address without an `@` answers `400`.
                  items:
                    type: string
                    format: email
                notify_defaults:
                  type: boolean
                  description: >-
                    Optional. Whether each failing workflow's owner (or the
                    workspace admins when it has none)

                    is emailed. Omit it to keep the saved value, which is `true`
                    until someone changes it.
      responses:
        '200':
          description: The saved setting
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FailedRunAlertsResponse'
        '400':
          description: An address is not an email, or enabling with no recipients
        '401':
          description: Invalid or missing API key
components:
  schemas:
    FailedRunAlertsResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            enabled:
              type: boolean
              description: Whether failed-run alerts are sent. On by default.
            notify_defaults:
              type: boolean
              description: Whether the default people are emailed. On by default.
            recipients:
              type: array
              description: Extra email addresses to notify, on top of the default people.
              items:
                type: string
                format: email
            is_default:
              type: boolean
              description: True when the workspace never saved the setting.
            updated_at:
              type: string
              format: date-time
            workflow:
              type: object
              description: >-
                Present when the request sets `workflow_id`: who that workflow's
                failure email goes to.
              properties:
                clustr_workflow_id:
                  type: string
                  description: >-
                    The Workflow's Clustr ID, for example
                    `wf_jdxgv705z000tzsnj7y221w27a`.
                  example: wf_jdxgv705z000tzsnj7y221w27a
                workflow_id:
                  type: string
                  description: >-
                    Kept for integrations built before Clustr IDs. New
                    integrations should use `clustr_workflow_id`.
                owner:
                  type: object
                  nullable: true
                  description: >-
                    The person who last turned the workflow on, else who created
                    it. Null means the workspace admins.
                  properties:
                    clustr_user_id:
                      type: string
                      description: >-
                        The member's Clustr ID, for example
                        `usr_apcwe3s0d4mhej24sx9wvx7whw`.
                      example: usr_apcwe3s0d4mhej24sx9wvx7whw
                    user_id:
                      type: string
                      description: >-
                        Kept for integrations built before Clustr IDs. New
                        integrations should use `clustr_user_id`.
                    email:
                      type: string
                      format: email
                    name:
                      type: string
                owner_source:
                  type: string
                  enum:
                    - enabled_by
                    - created_by
                    - admins
                admins:
                  type: array
                  items:
                    type: object
                    properties:
                      clustr_user_id:
                        type: string
                        description: >-
                          The member's Clustr ID, for example
                          `usr_apcwe3s0d4mhej24sx9wvx7whw`.
                        example: usr_apcwe3s0d4mhej24sx9wvx7whw
                      user_id:
                        type: string
                        description: >-
                          Kept for integrations built before Clustr IDs. New
                          integrations should use `clustr_user_id`.
                      email:
                        type: string
                        format: email
                      name:
                        type: string
                recipients:
                  type: array
                  items:
                    type: string
                    format: email
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: The API key you created on the API settings page of the Clustr app.

````

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