pydo.apps.assign_alert_destinations()

Generated on 8 May 2026 from pydo version v0.34.0

Usage

client.apps.assign_alert_destinations(
    app_id="4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf",
    alert_id="5a624ab5-dd58-4b39-b7dd-8b7c36e8a91d",
    body={
        "emails": [...],
        "slack_webhooks": [...],
    },
)
Returns JSONRaises HttpResponseError

Description

Updates the emails and slack webhook destinations for app alerts. Emails must be associated to a user with access to the app.

Parameters

app_id string required

The app ID

alert_id string required

The alert ID

emails array of strings optional

Example: ['[email protected]']

slack_webhooks array of objects optional
Show child properties
url string optional

Example: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

channel string optional

Example: Channel Name

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
    "emails": ["[email protected]"],
    "slack_webhooks": [
        {
            "url": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX",
            "channel": "Channel Name",
        }
    ],
}

post_resp = client.apps.assign_alert_destinations("12345", "24556", req)

Response Example

Show Response Example
{
  "alert": {
    "id": "e552e1f9-c1b0-4e6d-8777-ad6f27767306",
    "spec": {
      "rule": "DEPLOYMENT_FAILED"
    },
    "emails": [
      "[email protected]"
    ],
    "phase": "ACTIVE",
    "progress": {
      "steps": [
        {
          "name": "alert-configure-insight-alert",
          "status": "SUCCESS",
          "started_at": "2020-07-28T18:00:00Z",
          "ended_at": "2020-07-28T18:00:00Z"
        }
      ]
    }
  }
}

More Information

See /v2/apps/{app_id}/alerts/{alert_id}/destinations in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.