Skip to main content
POST
/
v1
/
talk
/
create-bulk-phone-call
create-bulk-phone-call
curl --request POST \
  --url https://assistant-01.in.rapida.ai/v1/talk/create-bulk-phone-call \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "phoneCalls": [
    {
      "assistant": {
        "assistantId": "2227823180112723968",
        "version": "latest"
      },
      "toNumber": "+14155550123",
      "fromNumber": "+14155550100",
      "metadata": {
        "customerId": "cust_123"
      }
    },
    {
      "assistant": {
        "assistantId": "2227823180112723968",
        "version": "latest"
      },
      "toNumber": "+14155550124",
      "metadata": {
        "customerId": "cust_124"
      }
    }
  ]
}
'
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phoneCalls: [
{
assistant: {assistantId: '2227823180112723968', version: 'latest'},
toNumber: '+14155550123',
fromNumber: '+14155550100',
metadata: {customerId: 'cust_123'}
},
{
assistant: {assistantId: '2227823180112723968', version: 'latest'},
toNumber: '+14155550124',
metadata: {customerId: 'cust_124'}
}
]
})
};

fetch('https://assistant-01.in.rapida.ai/v1/talk/create-bulk-phone-call', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
import requests

url = "https://assistant-01.in.rapida.ai/v1/talk/create-bulk-phone-call"

payload = { "phoneCalls": [
{
"assistant": {
"assistantId": "2227823180112723968",
"version": "latest"
},
"toNumber": "+14155550123",
"fromNumber": "+14155550100",
"metadata": { "customerId": "cust_123" }
},
{
"assistant": {
"assistantId": "2227823180112723968",
"version": "latest"
},
"toNumber": "+14155550124",
"metadata": { "customerId": "cust_124" }
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://assistant-01.in.rapida.ai/v1/talk/create-bulk-phone-call"

payload := strings.NewReader("{\n \"phoneCalls\": [\n {\n \"assistant\": {\n \"assistantId\": \"2227823180112723968\",\n \"version\": \"latest\"\n },\n \"toNumber\": \"+14155550123\",\n \"fromNumber\": \"+14155550100\",\n \"metadata\": {\n \"customerId\": \"cust_123\"\n }\n },\n {\n \"assistant\": {\n \"assistantId\": \"2227823180112723968\",\n \"version\": \"latest\"\n },\n \"toNumber\": \"+14155550124\",\n \"metadata\": {\n \"customerId\": \"cust_124\"\n }\n }\n ]\n}")

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

req.Header.Add("x-api-key", "<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))

}
{
  "code": 200,
  "success": true,
  "data": [
    {
      "id": "2230142097179373568"
    },
    {
      "id": "2230142097179373569"
    }
  ]
}

Authorizations

x-api-key
string
header
required

API key from Rapida credentials.

Headers

x-client-source
enum<string>
default:sdk

Client source identifier. SDK clients send this automatically.

Available options:
sdk
x-auth-id
string

Optional user identifier to propagate with the request.

Body

application/json
phoneCalls
object[]
required
Minimum array length: 1

Response

Bulk outbound phone call request accepted.

code
integer<int32>
Example:

200

success
boolean
Example:

true

data
object[]
error
object

Platform error response details. errorCode is a stable platform error code. See PlatformErrorCode for documented code/message mappings.