curl 'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/alert/${ALERT_ID}' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
-H 'content-type: application/json' \
-X PATCH \
--data-raw '{"name":"Successful transaction in My new contract name","color":"#33d9b2","description":"Temporarily disabled while contract is migrated","simple_type":"successful_tx","enabled":false,"expressions":[{"type":"contract_address","expression":{"address":"0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c"}},{"type":"network","expression":{"network_id":"1"}},{"type":"tx_status","expression":{"transaction_success":true}}],"delivery_channels":[{"enabled":true,"id":"b16b4b75-e034-44c9-a053-f10d769a1d64"}]}' \
--compressedconst options = {
method: 'PATCH',
headers: {'X-Access-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Successful transaction in My new contract name',
simple_type: 'successful_tx',
expressions: [
{
type: 'contract_address',
expression: {address: '0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c'}
},
{type: 'network', expression: {network_id: '1'}},
{type: 'tx_status', expression: {transaction_success: true}}
],
delivery_channels: [{enabled: true, id: 'b16b4b75-e034-44c9-a053-f10d769a1d64'}]
})
};
fetch('https://api.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/alert/{alertId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/alert/{alertId}"
payload = {
"name": "Successful transaction in My new contract name",
"simple_type": "successful_tx",
"expressions": [
{
"type": "contract_address",
"expression": { "address": "0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c" }
},
{
"type": "network",
"expression": { "network_id": "1" }
},
{
"type": "tx_status",
"expression": { "transaction_success": True }
}
],
"delivery_channels": [
{
"enabled": True,
"id": "b16b4b75-e034-44c9-a053-f10d769a1d64"
}
]
}
headers = {
"X-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/alert/{alertId}"
payload := strings.NewReader("{\n \"name\": \"Successful transaction in My new contract name\",\n \"simple_type\": \"successful_tx\",\n \"expressions\": [\n {\n \"type\": \"contract_address\",\n \"expression\": {\n \"address\": \"0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c\"\n }\n },\n {\n \"type\": \"network\",\n \"expression\": {\n \"network_id\": \"1\"\n }\n },\n {\n \"type\": \"tx_status\",\n \"expression\": {\n \"transaction_success\": true\n }\n }\n ],\n \"delivery_channels\": [\n {\n \"enabled\": true,\n \"id\": \"b16b4b75-e034-44c9-a053-f10d769a1d64\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Access-Key", "<api-key>")
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))
}{
"alert": {
"id": "510b9e97-5d94-430b-9904-1c6db2a473b2",
"project_id": "dfdc391a-a15d-4590-9aef-8691259c7df4",
"name": "Failed transaction in TetherToken",
"description": "",
"enabled": true,
"color": "#ff5252",
"severity": "danger",
"created_at": "2023-12-13T12:30:57.416129Z",
"delivery_channels": [
{
"delivery_channel_id": "b16b4b75-e034-44c9-a053-f10d769a1d64",
"delivery_channel": {
"id": "b16b4b75-e034-44c9-a053-f10d769a1d64",
"type": "email",
"owner_id": "7d5e8b1f-8bf8-4eae-a70f-fb7d354b1cc2",
"project_id": null,
"label": "Email: vanja@tenderly.co",
"reference_id": "vanja@tenderly.co",
"enabled": true,
"created_at": "2022-04-13T14:30:10.920586Z",
"information": {
"email": "vanja@tenderly.co",
"emails": [
"vanja@tenderly.co"
]
}
},
"enabled": true,
"created_at": "2023-12-13T12:31:04.794397Z"
}
],
"is_editable": true,
"updated_at": "2023-12-13T12:31:04.799929504Z",
"expressions": [
{
"type": "contract_address",
"expression": {
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"transaction_type": null
}
},
{
"type": "network",
"expression": {
"network_id": "1"
}
},
{
"type": "tx_status",
"expression": {
"transaction_success": false
}
}
]
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "bad_request",
"message": "Bad request input parameters"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "unauthorized",
"message": "Unauthorized"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "insufficient_permissions",
"message": "Insufficient permissions"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "resource_not_found",
"message": "The resource you requested could not be found."
}
}{
"error": {
"id": "9a7bbe06-7f6f-4a45-8c78-8d64b9a9d0e1",
"slug": "too_many_requests",
"message": "API Rate limit exceeded."
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "internal_server_error",
"message": "Internal server error"
}
}Update Alert
Update an existing Alert. You need to provide the Alert ID.
curl 'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/alert/${ALERT_ID}' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
-H 'content-type: application/json' \
-X PATCH \
--data-raw '{"name":"Successful transaction in My new contract name","color":"#33d9b2","description":"Temporarily disabled while contract is migrated","simple_type":"successful_tx","enabled":false,"expressions":[{"type":"contract_address","expression":{"address":"0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c"}},{"type":"network","expression":{"network_id":"1"}},{"type":"tx_status","expression":{"transaction_success":true}}],"delivery_channels":[{"enabled":true,"id":"b16b4b75-e034-44c9-a053-f10d769a1d64"}]}' \
--compressedconst options = {
method: 'PATCH',
headers: {'X-Access-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Successful transaction in My new contract name',
simple_type: 'successful_tx',
expressions: [
{
type: 'contract_address',
expression: {address: '0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c'}
},
{type: 'network', expression: {network_id: '1'}},
{type: 'tx_status', expression: {transaction_success: true}}
],
delivery_channels: [{enabled: true, id: 'b16b4b75-e034-44c9-a053-f10d769a1d64'}]
})
};
fetch('https://api.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/alert/{alertId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/alert/{alertId}"
payload = {
"name": "Successful transaction in My new contract name",
"simple_type": "successful_tx",
"expressions": [
{
"type": "contract_address",
"expression": { "address": "0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c" }
},
{
"type": "network",
"expression": { "network_id": "1" }
},
{
"type": "tx_status",
"expression": { "transaction_success": True }
}
],
"delivery_channels": [
{
"enabled": True,
"id": "b16b4b75-e034-44c9-a053-f10d769a1d64"
}
]
}
headers = {
"X-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/alert/{alertId}"
payload := strings.NewReader("{\n \"name\": \"Successful transaction in My new contract name\",\n \"simple_type\": \"successful_tx\",\n \"expressions\": [\n {\n \"type\": \"contract_address\",\n \"expression\": {\n \"address\": \"0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c\"\n }\n },\n {\n \"type\": \"network\",\n \"expression\": {\n \"network_id\": \"1\"\n }\n },\n {\n \"type\": \"tx_status\",\n \"expression\": {\n \"transaction_success\": true\n }\n }\n ],\n \"delivery_channels\": [\n {\n \"enabled\": true,\n \"id\": \"b16b4b75-e034-44c9-a053-f10d769a1d64\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Access-Key", "<api-key>")
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))
}{
"alert": {
"id": "510b9e97-5d94-430b-9904-1c6db2a473b2",
"project_id": "dfdc391a-a15d-4590-9aef-8691259c7df4",
"name": "Failed transaction in TetherToken",
"description": "",
"enabled": true,
"color": "#ff5252",
"severity": "danger",
"created_at": "2023-12-13T12:30:57.416129Z",
"delivery_channels": [
{
"delivery_channel_id": "b16b4b75-e034-44c9-a053-f10d769a1d64",
"delivery_channel": {
"id": "b16b4b75-e034-44c9-a053-f10d769a1d64",
"type": "email",
"owner_id": "7d5e8b1f-8bf8-4eae-a70f-fb7d354b1cc2",
"project_id": null,
"label": "Email: vanja@tenderly.co",
"reference_id": "vanja@tenderly.co",
"enabled": true,
"created_at": "2022-04-13T14:30:10.920586Z",
"information": {
"email": "vanja@tenderly.co",
"emails": [
"vanja@tenderly.co"
]
}
},
"enabled": true,
"created_at": "2023-12-13T12:31:04.794397Z"
}
],
"is_editable": true,
"updated_at": "2023-12-13T12:31:04.799929504Z",
"expressions": [
{
"type": "contract_address",
"expression": {
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"transaction_type": null
}
},
{
"type": "network",
"expression": {
"network_id": "1"
}
},
{
"type": "tx_status",
"expression": {
"transaction_success": false
}
}
]
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "bad_request",
"message": "Bad request input parameters"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "unauthorized",
"message": "Unauthorized"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "insufficient_permissions",
"message": "Insufficient permissions"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "resource_not_found",
"message": "The resource you requested could not be found."
}
}{
"error": {
"id": "9a7bbe06-7f6f-4a45-8c78-8d64b9a9d0e1",
"slug": "too_many_requests",
"message": "API Rate limit exceeded."
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "internal_server_error",
"message": "Internal server error"
}
}Authorizations
An API key is a token that a client provides when making API calls. Send it as the X-Access-Key request header on any endpoint:
curl '<API_ENDPOINT>' \ -H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \ ...
Learn how to generate API access tokens at Tenderly Docs.
Path Parameters
Account slug of the user
Project slug of the account
Alert Id to get info for
Body
Update alert payload
A name of the alert.
"Failed transaction in Contract XYZ"
Alert type.
successful_tx, failed_tx, allowlisted_callers, blocklisted_callers, log_emitted, erc20_transfer_log_emitted, emitted_log_parameter, function_called, called_function_parameter, state_change, eth_balance, tx_value, view_function "failed_tx"
List of conditions that trigger the alert when met
Defines a specific condition to monitor on the blockchain
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
[ { "type": "contract_address", "expression": { "address": "0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c" } }, { "type": "network", "expression": { "network_id": "1" } }, { "type": "tx_status", "expression": { "transaction_success": false } } ]
List of notification channels where alerts will be sent
Show child attributes
Show child attributes
[ { "enabled": true, "id": "b16b4b75-e034-44c9-a053-f10d769a1d64" }, { "enabled": true, "id": "f48f1f9f-1f74-4849-81cf-fce8bd3746b7" } ]
Alert description.
"This alert tracks failed transactions on Mainnet"
Hex color indicating the severity of the alert. It can be one of the following severity types:
- Default: #eeeeee
- Info: #34ace0
- Warning: #ffda79
- Danger: #ff5252
- Success: #33d9b2
#eeeeee, #34ace0, #ffda79, #ff5252, #33d9b2 "#eeeeee"
Whether the alert is currently active and monitoring
true
Response
A successful response.
An object with details about updated alert.