curl --request POST \
--url https://api.wppfy.com/call/make \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"number": "5511999999999",
"call_duration": 15,
"fileUrl": "https://exemplo.com/audio.mp3"
}
'import requests
url = "https://api.wppfy.com/call/make"
payload = {
"number": "5511999999999",
"call_duration": 15,
"fileUrl": "https://exemplo.com/audio.mp3"
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
number: '5511999999999',
call_duration: 15,
fileUrl: 'https://exemplo.com/audio.mp3'
})
};
fetch('https://api.wppfy.com/call/make', 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.wppfy.com/call/make",
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([
'number' => '5511999999999',
'call_duration' => 15,
'fileUrl' => 'https://exemplo.com/audio.mp3'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <api-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://api.wppfy.com/call/make"
payload := strings.NewReader("{\n \"number\": \"5511999999999\",\n \"call_duration\": 15,\n \"fileUrl\": \"https://exemplo.com/audio.mp3\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<api-key>")
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.wppfy.com/call/make")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"5511999999999\",\n \"call_duration\": 15,\n \"fileUrl\": \"https://exemplo.com/audio.mp3\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/call/make")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"5511999999999\",\n \"call_duration\": 15,\n \"fileUrl\": \"https://exemplo.com/audio.mp3\"\n}"
response = http.request(request)
puts response.read_body{
"response": "Call request accepted locally, awaiting WhatsApp confirmation",
"confirmed": false,
"call": {
"id": "<string>",
"from": "<string>",
"callCreator": "<string>",
"callCreatorAlt": "<string>",
"groupJid": "<string>",
"fromMe": true,
"wasSentByAPI": true,
"source": "<string>",
"primaryJid": "<string>",
"alternateJid": "<string>",
"timestamp": 123,
"timestampISO": "2023-11-07T05:31:56Z",
"updatedAt": 123,
"updatedAtISO": "2023-11-07T05:31:56Z",
"participants": [
"<string>"
]
},
"audio": {
"requested": true,
"mode": "call",
"queued": true,
"fileUrl": "<string>",
"input": "<string>",
"source": "<string>",
"playback": "starts_when_call_is_ready"
}
}Start voice call
Starts a voice call to a specific contact. This endpoint allows you to:
- Start voice calls to contacts
- Works only with valid WhatsApp numbers
- The contact will receive a voice call
Without fileUrl, the endpoint only makes the contact’s phone ring and does not
establish two-way voice communication.
With fileUrl, the API plays the file when the call is answered and
ends the call when the audio finishes. MP3, WAV and OGG/Opus are accepted via
HTTP(S) URL, data URI or base64, with a 25 MB limit.
Optional: Use call_duration to set how many seconds the call should ring.
After that period the call is ended automatically, without needing to call /call/reject.
Use 0 to not limit audio playback by time.
Request example:
{
"number": "5511999999999",
"call_duration": 0,
"fileUrl": "https://exemplo.com/audio.mp3"
}
Response example:
{
"response": "Call request accepted locally, awaiting WhatsApp confirmation",
"confirmed": false,
"audio": {
"requested": true,
"playback": "starts_when_call_is_ready"
}
}
Common errors:
- 401: Invalid or expired token
- 400: Invalid or missing number
- 500: Error starting call
curl --request POST \
--url https://api.wppfy.com/call/make \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"number": "5511999999999",
"call_duration": 15,
"fileUrl": "https://exemplo.com/audio.mp3"
}
'import requests
url = "https://api.wppfy.com/call/make"
payload = {
"number": "5511999999999",
"call_duration": 15,
"fileUrl": "https://exemplo.com/audio.mp3"
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
number: '5511999999999',
call_duration: 15,
fileUrl: 'https://exemplo.com/audio.mp3'
})
};
fetch('https://api.wppfy.com/call/make', 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.wppfy.com/call/make",
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([
'number' => '5511999999999',
'call_duration' => 15,
'fileUrl' => 'https://exemplo.com/audio.mp3'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <api-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://api.wppfy.com/call/make"
payload := strings.NewReader("{\n \"number\": \"5511999999999\",\n \"call_duration\": 15,\n \"fileUrl\": \"https://exemplo.com/audio.mp3\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<api-key>")
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.wppfy.com/call/make")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"5511999999999\",\n \"call_duration\": 15,\n \"fileUrl\": \"https://exemplo.com/audio.mp3\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/call/make")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"5511999999999\",\n \"call_duration\": 15,\n \"fileUrl\": \"https://exemplo.com/audio.mp3\"\n}"
response = http.request(request)
puts response.read_body{
"response": "Call request accepted locally, awaiting WhatsApp confirmation",
"confirmed": false,
"call": {
"id": "<string>",
"from": "<string>",
"callCreator": "<string>",
"callCreatorAlt": "<string>",
"groupJid": "<string>",
"fromMe": true,
"wasSentByAPI": true,
"source": "<string>",
"primaryJid": "<string>",
"alternateJid": "<string>",
"timestamp": 123,
"timestampISO": "2023-11-07T05:31:56Z",
"updatedAt": 123,
"updatedAtISO": "2023-11-07T05:31:56Z",
"participants": [
"<string>"
]
},
"audio": {
"requested": true,
"mode": "call",
"queued": true,
"fileUrl": "<string>",
"input": "<string>",
"source": "<string>",
"playback": "starts_when_call_is_ready"
}
}Authorizations
Body
Contact number in international format (e.g., 5511999999999)
"5511999999999"
Maximum call duration in seconds. Use 0 or omit it to not limit the audio by time.
x >= 015
MP3, WAV, or OGG/Opus audio via HTTP(S) URL, data URI, or base64, up to 25 MB. Playback starts when the call is answered.
"https://exemplo.com/audio.mp3"
Response
Call started successfully
Confirmation message
"Call request accepted locally, awaiting WhatsApp confirmation"
Indicates whether the call was already confirmed by WhatsApp in the initial response
false
Metadata of the created call
Show child attributes
Show child attributes
Present when fileUrl was provided
Show child attributes
Show child attributes
