dots.v2.apps.byApp_Id().alerts.byAlert_id().destinations.post()

Generated on 5 Nov 2026 from DoTs version v1.23.0

Usage

client.v2.apps.byApp_Id(app_Id).alerts.byAlert_id(alert_id).destinations.post(body: Apps_assign_app_alert_destinations_request, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | Apps_alert_response>

Description

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

Parameters

Path Parameters

app_Id string required

Example: 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf

The app ID

alert_id string required

Example: 5a624ab5-dd58-4b39-b7dd-8b7c36e8a91d

The alert ID

Request Body

emails array of strings optional

Example: ["[email protected]"]

slackWebhooks 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 { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.apps
    .byApp_Id("4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf").alerts
    .byAlert_id("5a624ab5-dd58-4b39-b7dd-8b7c36e8a91d").destinations.post({
    emails: [
        "[email protected]",
    ],
    slackWebhooks: [
        {
            url: "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX",
            channel: "Channel Name",
        },
    ],
});

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.