curl --request PATCH \
--url https://scribe-api.telepatia.ai/v1/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
"scribe_session.completed",
"scribe_session.error"
],
"isActive": true
}
'import requests
url = "https://scribe-api.telepatia.ai/v1/webhooks/{webhook_id}"
payload = {
"events": ["scribe_session.completed", "scribe_session.error"],
"isActive": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({events: ['scribe_session.completed', 'scribe_session.error'], isActive: true})
};
fetch('https://scribe-api.telepatia.ai/v1/webhooks/{webhook_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://scribe-api.telepatia.ai/v1/webhooks/{webhook_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'events' => [
'scribe_session.completed',
'scribe_session.error'
],
'isActive' => true
]),
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://scribe-api.telepatia.ai/v1/webhooks/{webhook_id}"
payload := strings.NewReader("{\n \"events\": [\n \"scribe_session.completed\",\n \"scribe_session.error\"\n ],\n \"isActive\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://scribe-api.telepatia.ai/v1/webhooks/{webhook_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n \"scribe_session.completed\",\n \"scribe_session.error\"\n ],\n \"isActive\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://scribe-api.telepatia.ai/v1/webhooks/{webhook_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n \"scribe_session.completed\",\n \"scribe_session.error\"\n ],\n \"isActive\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"events": [
"scribe_session.created"
],
"isActive": true,
"name": "<string>",
"event": "scribe_session.created",
"signingSecretPrefix": "<string>",
"signingSecretVersion": 123,
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>"
}Atualizar uma assinatura de webhook
Altera a url, o tipo de evento ou o indicador de atividade de uma assinatura de webhook.
curl --request PATCH \
--url https://scribe-api.telepatia.ai/v1/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
"scribe_session.completed",
"scribe_session.error"
],
"isActive": true
}
'import requests
url = "https://scribe-api.telepatia.ai/v1/webhooks/{webhook_id}"
payload = {
"events": ["scribe_session.completed", "scribe_session.error"],
"isActive": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({events: ['scribe_session.completed', 'scribe_session.error'], isActive: true})
};
fetch('https://scribe-api.telepatia.ai/v1/webhooks/{webhook_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://scribe-api.telepatia.ai/v1/webhooks/{webhook_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'events' => [
'scribe_session.completed',
'scribe_session.error'
],
'isActive' => true
]),
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://scribe-api.telepatia.ai/v1/webhooks/{webhook_id}"
payload := strings.NewReader("{\n \"events\": [\n \"scribe_session.completed\",\n \"scribe_session.error\"\n ],\n \"isActive\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://scribe-api.telepatia.ai/v1/webhooks/{webhook_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n \"scribe_session.completed\",\n \"scribe_session.error\"\n ],\n \"isActive\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://scribe-api.telepatia.ai/v1/webhooks/{webhook_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n \"scribe_session.completed\",\n \"scribe_session.error\"\n ],\n \"isActive\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"events": [
"scribe_session.created"
],
"isActive": true,
"name": "<string>",
"event": "scribe_session.created",
"signingSecretPrefix": "<string>",
"signingSecretVersion": 123,
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>"
}Autorizações
Chave de API enviada como token Bearer
Parâmetros de caminho
Corpo
1 - 2083Optional label. Send a non-empty value to set/replace it, or an empty string to clear it. Omit to leave it unchanged.
100Replace the subscribed event types (at least one). Preferred over event.
Webhook event types exposed to API clients.
Mirrors SynapseWebhookEventType enum in datalayer (camelCase) but
rendered to clients as snake_case dotted strings (closer to Stripe
convention and easier to grep in caller logs).
scribe_session.created, scribe_session.completed, scribe_session.error, scribe_session.updated, scribe_session.cancelled, scribe_session.deleted, appointment.fulfilled, appointment.cancelled Deprecated: a single event type. Use events. When set and events is omitted, it replaces the subscription with a one-element list.
scribe_session.created, scribe_session.completed, scribe_session.error, scribe_session.updated, scribe_session.cancelled, scribe_session.deleted, appointment.fulfilled, appointment.cancelled Pause/resume delivery without deleting the subscription.
Resposta
Resposta bem-sucedida
A single webhook subscription.
Webhook event types exposed to API clients.
Mirrors SynapseWebhookEventType enum in datalayer (camelCase) but
rendered to clients as snake_case dotted strings (closer to Stripe
convention and easier to grep in caller logs).
scribe_session.created, scribe_session.completed, scribe_session.error, scribe_session.updated, scribe_session.cancelled, scribe_session.deleted, appointment.fulfilled, appointment.cancelled Optional human-readable label, or null if unset.
Deprecated: the first subscribed event (events[0]). Use events.
scribe_session.created, scribe_session.completed, scribe_session.error, scribe_session.updated, scribe_session.cancelled, scribe_session.deleted, appointment.fulfilled, appointment.cancelled Display hint for the signing secret (e.g. 'whsec_a1b2c3d4'). The raw secret is only returned at creation/rotation.