Register an HTTPS webhook endpoint
curl --request POST \
--url https://revise.io/api/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"url": "https://app.example.com/hooks/revise",
"events": []
}
'import requests
url = "https://revise.io/api/v1/webhooks"
payload = {
"url": "https://app.example.com/hooks/revise",
"events": []
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({url: 'https://app.example.com/hooks/revise', events: []})
};
fetch('https://revise.io/api/v1/webhooks', 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://revise.io/api/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://app.example.com/hooks/revise',
'events' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://revise.io/api/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://app.example.com/hooks/revise\",\n \"events\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.post("https://revise.io/api/v1/webhooks")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://app.example.com/hooks/revise\",\n \"events\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://revise.io/api/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://app.example.com/hooks/revise\",\n \"events\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "wh_21ff52db-63f9-4a1c-a1ab-8d1a9f11c201",
"url": "https://example.com/webhooks/revise",
"events": [
"prompt.completed",
"prompt.failed"
],
"created_at": "2026-09-08T12:00:00Z",
"deleted_at": null,
"signing_secret": "whsec_AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8="
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Webhooks
Create a webhook
Maximum 10 active endpoints. HTTPS port 443 and public addresses only. Signing secret is encrypted at rest. Same key/body replays creation; different body returns 409.
POST
/
v1
/
webhooks
Register an HTTPS webhook endpoint
curl --request POST \
--url https://revise.io/api/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"url": "https://app.example.com/hooks/revise",
"events": []
}
'import requests
url = "https://revise.io/api/v1/webhooks"
payload = {
"url": "https://app.example.com/hooks/revise",
"events": []
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({url: 'https://app.example.com/hooks/revise', events: []})
};
fetch('https://revise.io/api/v1/webhooks', 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://revise.io/api/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://app.example.com/hooks/revise',
'events' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://revise.io/api/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://app.example.com/hooks/revise\",\n \"events\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.post("https://revise.io/api/v1/webhooks")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://app.example.com/hooks/revise\",\n \"events\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://revise.io/api/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://app.example.com/hooks/revise\",\n \"events\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "wh_21ff52db-63f9-4a1c-a1ab-8d1a9f11c201",
"url": "https://example.com/webhooks/revise",
"events": [
"prompt.completed",
"prompt.failed"
],
"created_at": "2026-09-08T12:00:00Z",
"deleted_at": null,
"signing_secret": "whsec_AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8="
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}TypeScript
import { ReviseClient } from "@reviseio/api";
const revise = new ReviseClient({ apiKey: process.env.REVISE_API_KEY! });
const result = await revise.webhooks.create({ url: "https://example.com/hooks/revise", events: ["prompt.completed", "conversion.completed"] }, { idempotencyKey: "webhook-42" });
Authorizations
Revise API key from https://revise.io/console/api-keys. Send Authorization: Bearer .
Headers
Required string length:
1 - 128Body
application/json
Response
Success
Example:
"wh_21ff52db-63f9-4a1c-a1ab-8d1a9f11c201"
Example:
"https://example.com/webhooks/revise"
Required array length:
1 - 7 elementsAvailable options:
prompt.completed, prompt.failed, prompt.cancelled, prompt.paused, conversion.completed, conversion.failed, conversion.cancelled Example:
["prompt.completed", "prompt.failed"]
Example:
"2026-09-08T12:00:00Z"
Example:
null
Returned only on creation and its idempotent replay. Store securely.
Example:
"whsec_AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8="