Update destination
curl --request PUT \
--url https://api.coreweave.com/v1/notifications/destinations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"displayName": "<string>",
"credentialId": "<string>",
"config": "<string>"
}
'import requests
url = "https://api.coreweave.com/v1/notifications/destinations/{id}"
payload = {
"id": "<string>",
"displayName": "<string>",
"credentialId": "<string>",
"config": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
displayName: '<string>',
credentialId: '<string>',
config: '<string>'
})
};
fetch('https://api.coreweave.com/v1/notifications/destinations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coreweave.com/v1/notifications/destinations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'displayName' => '<string>',
'credentialId' => '<string>',
'config' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coreweave.com/v1/notifications/destinations/{id}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"displayName\": \"<string>\",\n \"credentialId\": \"<string>\",\n \"config\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.coreweave.com/v1/notifications/destinations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"displayName\": \"<string>\",\n \"credentialId\": \"<string>\",\n \"config\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coreweave.com/v1/notifications/destinations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"displayName\": \"<string>\",\n \"credentialId\": \"<string>\",\n \"config\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"destination": {
"id": "<string>",
"orgUid": "<string>",
"channel": "<string>",
"displayName": "<string>",
"credentialId": "<string>",
"config": "<string>",
"credentialType": "<string>",
"credentialStatus": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Update destination
Change the display name, credential, or config of a CoreWeave Alerts destination.
PUT
/
v1
/
notifications
/
destinations
/
{id}
Update destination
curl --request PUT \
--url https://api.coreweave.com/v1/notifications/destinations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"displayName": "<string>",
"credentialId": "<string>",
"config": "<string>"
}
'import requests
url = "https://api.coreweave.com/v1/notifications/destinations/{id}"
payload = {
"id": "<string>",
"displayName": "<string>",
"credentialId": "<string>",
"config": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
displayName: '<string>',
credentialId: '<string>',
config: '<string>'
})
};
fetch('https://api.coreweave.com/v1/notifications/destinations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coreweave.com/v1/notifications/destinations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'displayName' => '<string>',
'credentialId' => '<string>',
'config' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coreweave.com/v1/notifications/destinations/{id}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"displayName\": \"<string>\",\n \"credentialId\": \"<string>\",\n \"config\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.coreweave.com/v1/notifications/destinations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"displayName\": \"<string>\",\n \"credentialId\": \"<string>\",\n \"config\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coreweave.com/v1/notifications/destinations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"displayName\": \"<string>\",\n \"credentialId\": \"<string>\",\n \"config\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"destination": {
"id": "<string>",
"orgUid": "<string>",
"channel": "<string>",
"displayName": "<string>",
"credentialId": "<string>",
"config": "<string>",
"credentialType": "<string>",
"credentialStatus": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Requires the Alerts Admin role.
Send only the fields you want to change. An empty
displayName or config keeps the
current value. Omit credentialId to keep the current credential. An empty credentialId
fails with INVALID_ARGUMENT. The channel of a destination can’t change. To switch channels, create a
new destination and delete the old one.
Example request
curl -X PUT https://api.coreweave.com/v1/notifications/destinations/[DESTINATION-ID] \
-H "Authorization: Bearer [API-ACCESS-TOKEN]" \
-H "Content-Type: application/json" \
-d '{"displayName": "Ops webhook (primary)"}'
Authorizations
CoreWeave API access token sent as a bearer token.
Path Parameters
Body
application/json
The ID of the destination to update.
A new display name, up to 255 characters. Empty keeps the current name.
The ID of a replacement credential. Omit it to keep the current credential.
Replacement channel configuration as a JSON-encoded string. Empty keeps the current config.
Response
OK
A place CoreWeave Alerts delivers to.
Show child attributes
Show child attributes
Was this page helpful?