Skip to main content
POST
/
calls
Start outbound call
curl --request POST \
  --url https://api.helloannie.com/v1/calls \
  --header 'Content-Type: application/json' \
  --data '
{
  "fromNumber": "+15551234567",
  "toNumber": "+15559876543",
  "patientInfo": {
    "firstName": "Sarah",
    "lastName": "Johnson",
    "dateOfBirth": "1988-03-22T00:00:00.000Z",
    "patientId": "PAT-10432"
  },
  "appointmentInfo": {
    "startTime": "2025-03-10T15:00:00-06:00",
    "endTime": "2025-03-10T15:30:00-06:00",
    "appointmentTypeId": "apt-type-cleaning",
    "appointmentDescription": "6-month routine cleaning and exam",
    "appointmentId": "81260683"
  },
  "context": "Confirming upcoming cleaning appointment scheduled for March 10th at 3:00 PM",
  "voicemailMessage": "Hi, this is Annie from Bright Smile Dental. Please call us back."
}
'
import requests

url = "https://api.helloannie.com/v1/calls"

payload = {
"fromNumber": "+15551234567",
"toNumber": "+15559876543",
"patientInfo": {
"firstName": "Sarah",
"lastName": "Johnson",
"dateOfBirth": "1988-03-22T00:00:00.000Z",
"patientId": "PAT-10432"
},
"appointmentInfo": {
"startTime": "2025-03-10T15:00:00-06:00",
"endTime": "2025-03-10T15:30:00-06:00",
"appointmentTypeId": "apt-type-cleaning",
"appointmentDescription": "6-month routine cleaning and exam",
"appointmentId": "81260683"
},
"context": "Confirming upcoming cleaning appointment scheduled for March 10th at 3:00 PM",
"voicemailMessage": "Hi, this is Annie from Bright Smile Dental. Please call us back."
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
fromNumber: '+15551234567',
toNumber: '+15559876543',
patientInfo: {
firstName: 'Sarah',
lastName: 'Johnson',
dateOfBirth: '1988-03-22T00:00:00.000Z',
patientId: 'PAT-10432'
},
appointmentInfo: {
startTime: '2025-03-10T15:00:00-06:00',
endTime: '2025-03-10T15:30:00-06:00',
appointmentTypeId: 'apt-type-cleaning',
appointmentDescription: '6-month routine cleaning and exam',
appointmentId: '81260683'
},
context: 'Confirming upcoming cleaning appointment scheduled for March 10th at 3:00 PM',
voicemailMessage: 'Hi, this is Annie from Bright Smile Dental. Please call us back.'
})
};

fetch('https://api.helloannie.com/v1/calls', 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.helloannie.com/v1/calls",
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([
'fromNumber' => '+15551234567',
'toNumber' => '+15559876543',
'patientInfo' => [
'firstName' => 'Sarah',
'lastName' => 'Johnson',
'dateOfBirth' => '1988-03-22T00:00:00.000Z',
'patientId' => 'PAT-10432'
],
'appointmentInfo' => [
'startTime' => '2025-03-10T15:00:00-06:00',
'endTime' => '2025-03-10T15:30:00-06:00',
'appointmentTypeId' => 'apt-type-cleaning',
'appointmentDescription' => '6-month routine cleaning and exam',
'appointmentId' => '81260683'
],
'context' => 'Confirming upcoming cleaning appointment scheduled for March 10th at 3:00 PM',
'voicemailMessage' => 'Hi, this is Annie from Bright Smile Dental. Please call us back.'
]),
CURLOPT_HTTPHEADER => [
"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.helloannie.com/v1/calls"

payload := strings.NewReader("{\n \"fromNumber\": \"+15551234567\",\n \"toNumber\": \"+15559876543\",\n \"patientInfo\": {\n \"firstName\": \"Sarah\",\n \"lastName\": \"Johnson\",\n \"dateOfBirth\": \"1988-03-22T00:00:00.000Z\",\n \"patientId\": \"PAT-10432\"\n },\n \"appointmentInfo\": {\n \"startTime\": \"2025-03-10T15:00:00-06:00\",\n \"endTime\": \"2025-03-10T15:30:00-06:00\",\n \"appointmentTypeId\": \"apt-type-cleaning\",\n \"appointmentDescription\": \"6-month routine cleaning and exam\",\n \"appointmentId\": \"81260683\"\n },\n \"context\": \"Confirming upcoming cleaning appointment scheduled for March 10th at 3:00 PM\",\n \"voicemailMessage\": \"Hi, this is Annie from Bright Smile Dental. Please call us back.\"\n}")

req, _ := http.NewRequest("POST", url, payload)

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.helloannie.com/v1/calls")
.header("Content-Type", "application/json")
.body("{\n \"fromNumber\": \"+15551234567\",\n \"toNumber\": \"+15559876543\",\n \"patientInfo\": {\n \"firstName\": \"Sarah\",\n \"lastName\": \"Johnson\",\n \"dateOfBirth\": \"1988-03-22T00:00:00.000Z\",\n \"patientId\": \"PAT-10432\"\n },\n \"appointmentInfo\": {\n \"startTime\": \"2025-03-10T15:00:00-06:00\",\n \"endTime\": \"2025-03-10T15:30:00-06:00\",\n \"appointmentTypeId\": \"apt-type-cleaning\",\n \"appointmentDescription\": \"6-month routine cleaning and exam\",\n \"appointmentId\": \"81260683\"\n },\n \"context\": \"Confirming upcoming cleaning appointment scheduled for March 10th at 3:00 PM\",\n \"voicemailMessage\": \"Hi, this is Annie from Bright Smile Dental. Please call us back.\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.helloannie.com/v1/calls")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"fromNumber\": \"+15551234567\",\n \"toNumber\": \"+15559876543\",\n \"patientInfo\": {\n \"firstName\": \"Sarah\",\n \"lastName\": \"Johnson\",\n \"dateOfBirth\": \"1988-03-22T00:00:00.000Z\",\n \"patientId\": \"PAT-10432\"\n },\n \"appointmentInfo\": {\n \"startTime\": \"2025-03-10T15:00:00-06:00\",\n \"endTime\": \"2025-03-10T15:30:00-06:00\",\n \"appointmentTypeId\": \"apt-type-cleaning\",\n \"appointmentDescription\": \"6-month routine cleaning and exam\",\n \"appointmentId\": \"81260683\"\n },\n \"context\": \"Confirming upcoming cleaning appointment scheduled for March 10th at 3:00 PM\",\n \"voicemailMessage\": \"Hi, this is Annie from Bright Smile Dental. Please call us back.\"\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "conversationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
}
{
"success": false,
"data": {},
"message": "<string>"
}
{
"success": false,
"data": {},
"message": "<string>"
}
{
"success": false,
"data": {},
"message": "<string>"
}
{
"success": false,
"data": {},
"message": "<string>"
}

Body

Request body for starting an outbound call

fromNumber
string
required

The Annie phone number to call from (must be configured in the system)

Example:

"+15551234567"

toNumber
string
required

The phone number to call (must be in the allowed allowlist)

Example:

"+15559876543"

patientInfo
object

Patient information for the call

Example:
{
"firstName": "Sarah",
"lastName": "Johnson",
"dateOfBirth": "1988-03-22T00:00:00.000Z",
"patientId": "PAT-10432"
}
appointmentInfo
object

Appointment information for context during the call

Example:
{
"startTime": "2025-03-10T15:00:00-06:00",
"endTime": "2025-03-10T15:30:00-06:00",
"appointmentTypeId": "apt-type-cleaning",
"appointmentDescription": "6-month routine cleaning and exam",
"appointmentId": "81260683"
}
context
string

Context about the call being initiated (e.g., appointment confirmation details)

Maximum string length: 500
Example:

"Confirming upcoming cleaning appointment scheduled for March 10th at 3:00 PM"

voicemailMessage
string

If present, Annie will leave this voicemail message when voicemail is detected

Maximum string length: 500
Example:

"Hi, this is Annie from Bright Smile Dental. Please call us back."

Response

Response returned when an outbound call is successfully initiated

success
enum<boolean>
required
Available options:
true
data
object
required

Data returned when an outbound call is successfully initiated