curl --request POST \
--url https://www.callcow.ai/api/call-prompt \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Book a reservation at Friday 7pm for Josh for 2",
"recipient_phone": "+14155552671",
"callback_url": "https://agent.example.com/results",
"callback_secret": "my-secret-token",
"idempotency_key": "agent-task-12345"
}
'import requests
url = "https://www.callcow.ai/api/call-prompt"
payload = {
"prompt": "Book a reservation at Friday 7pm for Josh for 2",
"recipient_phone": "+14155552671",
"callback_url": "https://agent.example.com/results",
"callback_secret": "my-secret-token",
"idempotency_key": "agent-task-12345"
}
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({
prompt: 'Book a reservation at Friday 7pm for Josh for 2',
recipient_phone: '+14155552671',
callback_url: 'https://agent.example.com/results',
callback_secret: 'my-secret-token',
idempotency_key: 'agent-task-12345'
})
};
fetch('https://www.callcow.ai/api/call-prompt', 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://www.callcow.ai/api/call-prompt",
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([
'prompt' => 'Book a reservation at Friday 7pm for Josh for 2',
'recipient_phone' => '+14155552671',
'callback_url' => 'https://agent.example.com/results',
'callback_secret' => 'my-secret-token',
'idempotency_key' => 'agent-task-12345'
]),
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://www.callcow.ai/api/call-prompt"
payload := strings.NewReader("{\n \"prompt\": \"Book a reservation at Friday 7pm for Josh for 2\",\n \"recipient_phone\": \"+14155552671\",\n \"callback_url\": \"https://agent.example.com/results\",\n \"callback_secret\": \"my-secret-token\",\n \"idempotency_key\": \"agent-task-12345\"\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://www.callcow.ai/api/call-prompt")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"Book a reservation at Friday 7pm for Josh for 2\",\n \"recipient_phone\": \"+14155552671\",\n \"callback_url\": \"https://agent.example.com/results\",\n \"callback_secret\": \"my-secret-token\",\n \"idempotency_key\": \"agent-task-12345\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.callcow.ai/api/call-prompt")
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 \"prompt\": \"Book a reservation at Friday 7pm for Josh for 2\",\n \"recipient_phone\": \"+14155552671\",\n \"callback_url\": \"https://agent.example.com/results\",\n \"callback_secret\": \"my-secret-token\",\n \"idempotency_key\": \"agent-task-12345\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"workflow_id": "b8f40b44-3b7a-425b-a2ae-1327471b0410",
"call_id": "c9e50c55-4c8b-536c-b3bf-2438582c1521"
}{
"error": "Validation failed",
"details": {}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Call with Prompt
Create and trigger an AI phone call from a natural language prompt. Generates a workflow, initiates the call, and optionally delivers results to a callback URL.
curl --request POST \
--url https://www.callcow.ai/api/call-prompt \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Book a reservation at Friday 7pm for Josh for 2",
"recipient_phone": "+14155552671",
"callback_url": "https://agent.example.com/results",
"callback_secret": "my-secret-token",
"idempotency_key": "agent-task-12345"
}
'import requests
url = "https://www.callcow.ai/api/call-prompt"
payload = {
"prompt": "Book a reservation at Friday 7pm for Josh for 2",
"recipient_phone": "+14155552671",
"callback_url": "https://agent.example.com/results",
"callback_secret": "my-secret-token",
"idempotency_key": "agent-task-12345"
}
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({
prompt: 'Book a reservation at Friday 7pm for Josh for 2',
recipient_phone: '+14155552671',
callback_url: 'https://agent.example.com/results',
callback_secret: 'my-secret-token',
idempotency_key: 'agent-task-12345'
})
};
fetch('https://www.callcow.ai/api/call-prompt', 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://www.callcow.ai/api/call-prompt",
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([
'prompt' => 'Book a reservation at Friday 7pm for Josh for 2',
'recipient_phone' => '+14155552671',
'callback_url' => 'https://agent.example.com/results',
'callback_secret' => 'my-secret-token',
'idempotency_key' => 'agent-task-12345'
]),
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://www.callcow.ai/api/call-prompt"
payload := strings.NewReader("{\n \"prompt\": \"Book a reservation at Friday 7pm for Josh for 2\",\n \"recipient_phone\": \"+14155552671\",\n \"callback_url\": \"https://agent.example.com/results\",\n \"callback_secret\": \"my-secret-token\",\n \"idempotency_key\": \"agent-task-12345\"\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://www.callcow.ai/api/call-prompt")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"Book a reservation at Friday 7pm for Josh for 2\",\n \"recipient_phone\": \"+14155552671\",\n \"callback_url\": \"https://agent.example.com/results\",\n \"callback_secret\": \"my-secret-token\",\n \"idempotency_key\": \"agent-task-12345\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.callcow.ai/api/call-prompt")
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 \"prompt\": \"Book a reservation at Friday 7pm for Josh for 2\",\n \"recipient_phone\": \"+14155552671\",\n \"callback_url\": \"https://agent.example.com/results\",\n \"callback_secret\": \"my-secret-token\",\n \"idempotency_key\": \"agent-task-12345\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"workflow_id": "b8f40b44-3b7a-425b-a2ae-1327471b0410",
"call_id": "c9e50c55-4c8b-536c-b3bf-2438582c1521"
}{
"error": "Validation failed",
"details": {}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Overview
Create and trigger an AI phone call from a natural language prompt in a single request. The system generates a workflow from your prompt, initiates the call, and optionally delivers results to a callback URL. This is ideal for agent-to-agent orchestration, where external agents can make calls without pre-creating workflows.Callback
If you provide acallback_url, the API will POST call results to that URL when the call completes or fails (including not picked up, busy, voicemail).
Callback delivery is best-effort (single attempt, 30-second timeout). For guaranteed delivery, poll the call status as a fallback.
Callback payload
{
"call_id": "abc-123",
"workflow_id": "def-456",
"call_status": "success",
"provider_status": "completed",
"call_summary": "Customer booked a reservation for Friday 7pm, party of 2.",
"messages": [],
"context": null,
"form_fills": [],
"created_at": "2026-03-30T12:00:00.000Z"
}
callback_secret, the callback request includes an Authorization: Bearer <your_secret> header.
Terminal statuses
call_status | provider_status | Meaning |
|---|---|---|
success | completed | Call completed normally |
not_picked_up | no-answer | No one answered |
not_picked_up | busy | Line was busy |
not_picked_up | failed | Call failed (bad number, carrier error) |
not_picked_up | canceled | Call was canceled |
voicemail | completed | Went to voicemail |
Idempotency
To prevent duplicate calls from retries, pass an optionalidempotency_key. If the same key is sent within a 5-minute window, the API returns the cached response without creating a new call.
{
"prompt": "Book a reservation at Friday 7pm for Josh for 2",
"recipient_phone": "+14155552671",
"idempotency_key": "agent-task-12345"
}
Authorizations
API key generated from Settings → API Keys. Format: ck_live_...
Body
Natural language description of the call task. The system generates an AI workflow from this prompt.
"Book a reservation at Friday 7pm for Josh for 2"
Phone number of the call recipient in E.164 format
"+14155552671"
HTTPS URL to receive call results when the call completes or fails. Must not point to private/reserved IP ranges.
"https://agent.example.com/results"
Optional bearer token included in the Authorization header of callback requests
"my-secret-token"
Optional unique key to prevent duplicate calls on retries. Scoped to your organization with a 5-minute TTL.
"agent-task-12345"