Set an hmac webhook secret
/automation/{id}/webhook/{triggerKey}/secret
hmac endpoints only; the secret is the sender’s own. Never echoed back. The previous secret keeps verifying for `grace_seconds` (0 to 86400, default 86400); 0 cuts it off immediately. 503 `automation_unavailable` means the new secret could not be applied to the live endpoint yet: retry.
Path Parameters
Resource id
Webhook trigger key within the workflow
Request Body
Response Body
standardhmactoken
unrevealedrevealedprovidedmissing
activeneeds_secretdraft_only
curl -X PUT 'https://api.elaichi.ai/automation/<id>/webhook/<triggerKey>/secret' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"secret":"your_secret","grace_seconds":0}'const body = {
"secret": "your_secret",
"grace_seconds": 0
};
const response = await fetch('https://api.elaichi.ai/automation/<id>/webhook/<triggerKey>/secret', {
method: 'PUT',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/automation/<id>/webhook/<triggerKey>/secret"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
payload = {
"secret": "your_secret",
"grace_seconds": 0
}
response = requests.put(url, headers=headers, json=payload)
print(response.json())