Rotate automation trigger webhook token
curl --request POST \
--url https://melso.ai/api/automations/{id}/triggers/{triggerId}/rotate-webhook-token \
--header 'Authorization: Bearer <token>'import requests
url = "https://melso.ai/api/automations/{id}/triggers/{triggerId}/rotate-webhook-token"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://melso.ai/api/automations/{id}/triggers/{triggerId}/rotate-webhook-token', 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://melso.ai/api/automations/{id}/triggers/{triggerId}/rotate-webhook-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://melso.ai/api/automations/{id}/triggers/{triggerId}/rotate-webhook-token"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://melso.ai/api/automations/{id}/triggers/{triggerId}/rotate-webhook-token")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://melso.ai/api/automations/{id}/triggers/{triggerId}/rotate-webhook-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"company_commit_sha": "<string>",
"id": "<string>",
"automation_id": "<string>",
"kind": "<string>",
"enabled": true,
"cron_expression": "<string>",
"timezone": "<string>",
"next_fire_at": "<string>",
"webhook_token": "<string>",
"webhook_path": "<string>",
"webhook_url": "<string>",
"provider": "<string>",
"has_signing_secret": true,
"signing_secret_hint": "<string>",
"label": "<string>",
"last_fired_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"integration_trigger": {
"toolkit_slug": "<string>",
"connected_account_id": "<string>",
"trigger_slug": "<string>",
"trigger_config": {}
},
"integration_status": "<string>",
"integration_error": "<string>",
"provider_trigger_id": "<string>",
"event_filters": [
{
"event": "<string>",
"actions": [
"<string>"
]
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Automations
Rotate automation trigger webhook token
Workspace member with access to this resource.
Request: Path: webhook trigger UUID.
Response: AutomationTriggerResponse with new webhook URL/token.
Status: 200; 400 not webhook trigger; 403 write denied. Authentication and resource-access errors follow Overview.
POST
/
api
/
automations
/
{id}
/
triggers
/
{triggerId}
/
rotate-webhook-token
Rotate automation trigger webhook token
curl --request POST \
--url https://melso.ai/api/automations/{id}/triggers/{triggerId}/rotate-webhook-token \
--header 'Authorization: Bearer <token>'import requests
url = "https://melso.ai/api/automations/{id}/triggers/{triggerId}/rotate-webhook-token"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://melso.ai/api/automations/{id}/triggers/{triggerId}/rotate-webhook-token', 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://melso.ai/api/automations/{id}/triggers/{triggerId}/rotate-webhook-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://melso.ai/api/automations/{id}/triggers/{triggerId}/rotate-webhook-token"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://melso.ai/api/automations/{id}/triggers/{triggerId}/rotate-webhook-token")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://melso.ai/api/automations/{id}/triggers/{triggerId}/rotate-webhook-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"company_commit_sha": "<string>",
"id": "<string>",
"automation_id": "<string>",
"kind": "<string>",
"enabled": true,
"cron_expression": "<string>",
"timezone": "<string>",
"next_fire_at": "<string>",
"webhook_token": "<string>",
"webhook_path": "<string>",
"webhook_url": "<string>",
"provider": "<string>",
"has_signing_secret": true,
"signing_secret_hint": "<string>",
"label": "<string>",
"last_fired_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"integration_trigger": {
"toolkit_slug": "<string>",
"connected_account_id": "<string>",
"trigger_slug": "<string>",
"trigger_config": {}
},
"integration_status": "<string>",
"integration_error": "<string>",
"provider_trigger_id": "<string>",
"event_filters": [
{
"event": "<string>",
"actions": [
"<string>"
]
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
Company API key (mwk_) or personal access token (mel_). A PAT requires X-Workspace-ID on company-scoped routes. An API key implies its own company.
Headers
Company UUID for a personal token on company-scoped operations. A company API key already binds its company.
Path Parameters
id from the corresponding authorized response.
triggerId from the corresponding authorized response.
Response
AutomationTriggerResponse with new webhook URL/token.
Show child attributes
Show child attributes
Show child attributes
Show child attributes