curl --request POST \
--url https://api.pyai.com/v1/integrations/zapier/hooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target_url": "<string>"
}
'import requests
url = "https://api.pyai.com/v1/integrations/zapier/hooks"
payload = { "target_url": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({target_url: '<string>'})
};
fetch('https://api.pyai.com/v1/integrations/zapier/hooks', 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://api.pyai.com/v1/integrations/zapier/hooks",
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([
'target_url' => '<string>'
]),
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://api.pyai.com/v1/integrations/zapier/hooks"
payload := strings.NewReader("{\n \"target_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.pyai.com/v1/integrations/zapier/hooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"target_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/integrations/zapier/hooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"target_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"object": "integration.destination",
"id": "idst_9fK2mQ7xR4wLpN8vTzA1",
"kind": "slack",
"name": "<string>",
"events": [
"recap.call.completed"
],
"status": "active",
"last_delivery_at": 123,
"last_error": "<string>",
"config": {},
"created_at": 123,
"updated_at": 123
}{
"title": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "invalid_request_error",
"param": "<string>"
}
}Subscribe a Zapier REST hook
Zapier REST-hook subscribe: delivers every completed call of the given event type to target_url as {id, type, occurred_at, data}, signed with X-PyAI-Signature and carrying an Idempotency-Key. Idempotent on (org, event, target_url) — re-subscribing refreshes in place (HTTP 201 with the same id). Deliveries are durable: bounded retries with backoff, then a visible dead letter. Any active key may call this.
curl --request POST \
--url https://api.pyai.com/v1/integrations/zapier/hooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target_url": "<string>"
}
'import requests
url = "https://api.pyai.com/v1/integrations/zapier/hooks"
payload = { "target_url": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({target_url: '<string>'})
};
fetch('https://api.pyai.com/v1/integrations/zapier/hooks', 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://api.pyai.com/v1/integrations/zapier/hooks",
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([
'target_url' => '<string>'
]),
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://api.pyai.com/v1/integrations/zapier/hooks"
payload := strings.NewReader("{\n \"target_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.pyai.com/v1/integrations/zapier/hooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"target_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/integrations/zapier/hooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"target_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"object": "integration.destination",
"id": "idst_9fK2mQ7xR4wLpN8vTzA1",
"kind": "slack",
"name": "<string>",
"events": [
"recap.call.completed"
],
"status": "active",
"last_delivery_at": 123,
"last_error": "<string>",
"config": {},
"created_at": 123,
"updated_at": 123
}{
"title": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "invalid_request_error",
"param": "<string>"
}
}Authorizations
Use Authorization: Bearer pyai_live_... (or pyai_test_...).
Body
Event to deliver to this hook.
recap.call.completed, amd.call.completed, trace.scorecard.completed, transcription.job.completed, cast.render.completed Zapier REST-hook target URL (https). Every completed call POSTs a signed envelope {id, type, occurred_at, data} here.
Response
Subscribed hook
"integration.destination"
"idst_9fK2mQ7xR4wLpN8vTzA1"
slack, zapier, hubspot, zendesk, pipedrive, zoho, apollo, clay, sheets recap.call.completed, amd.call.completed, trace.scorecard.completed, transcription.job.completed, cast.render.completed active, error, disabled Unix ms.
Kind-specific config with secrets redacted (URLs masked, tokens shortened).
Unix ms.
Unix ms.