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

fetch('https://assistant-01.in.rapida.ai/v1/talk/create-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-phone-call"

payload = {
"assistant": {
"assistantId": "2227823180112723968",
"version": "latest"
},
"toNumber": "+14155550123"
}
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-phone-call"

payload := strings.NewReader("{\n \"assistant\": {\n \"assistantId\": \"2227823180112723968\",\n \"version\": \"latest\"\n },\n \"toNumber\": \"+14155550123\"\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"
  }
}

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
assistant
object
required
toNumber
string
required

Destination phone number in E.164 format.

Example:

"+14155550123"

metadata
object

Arbitrary metadata stored with the conversation for tracking and analytics.

Example:
{ "customerId": "cust_123" }
args
object

Runtime arguments made available to the assistant.

Example:
{ "customerName": "Jane" }
options
object

Runtime options for call behavior and configuration.

Example:
{ "priority": "standard" }
fromNumber
string

Caller ID phone number in E.164 format. If omitted, Rapida uses the configured default.

Example:

"+14155550100"

Response

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.