const options = {
method: 'POST',
headers: {
'X-API-KEY': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"name": "John Doe",
"mobile_number": "+1234567890",
"agent_id": "830f767a-397e-4b39-82ff-235cd344e2f9", // Replace with your assistant ID
"from_number_id": "3735b71d-e770-4409-8707-14c795f49970", // Replace with your phone number ID
"custom_args_values": {
// Include any custom variables required by your assistant
"callee_name": "John",
"mobile_number": "+1234567890"
}
})
};
fetch('https://prod-api.ringg.ai/ca/api/v0/calling/outbound/individual', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));