Post the necessary fields for the API to add a new outbound call.
POST https://services.leadconnectorhq.com/conversations/messages/outbound
Autorización
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.
Body
type
string
default:"Call"
required
Message Type Posibles valores: ‘Call’
conversationId
string
default:"ve9EPM428h8vShlRW1KT"
required
Conversation Id
conversationProviderId
string
default:"61d6d1f9cdac7612faf80753"
required
Conversation Provider Id
altId
string
default:"61d6d1f9cdac7612faf80753"
external mail provider’s message id
Date of the outbound message
Phone call dialer and receiver information
Respuestas
200 - Created the message
conversationId
string
default:"ABC12h2F6uBrIkfXYazb"
required
Conversation ID.
messageId
string
default:"t22c6DQcTDf3MjRhwf77"
required
This is the main Message ID
{
"success": true,
"conversationId": "ABC12h2F6uBrIkfXYazb",
"messageId": "t22c6DQcTDf3MjRhwf77",
"message": "string",
"contactId": "string",
"dateAdded": "2024-01-15T10:30:00Z",
"emailMessageId": "string"
}
Ejemplo
curl -X POST 'https://services.leadconnectorhq.com/conversations/messages/outbound' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"type": "Call",
"attachments": [
"string"
],
"conversationId": "ve9EPM428h8vShlRW1KT",
"conversationProviderId": "61d6d1f9cdac7612faf80753",
"altId": "61d6d1f9cdac7612faf80753",
"date": "2024-01-15T10:30:00Z"
}'
const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/outbound', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"type": "Call", "attachments": ["string"], "conversationId": "ve9EPM428h8vShlRW1KT", "conversationProviderId": "61d6d1f9cdac7612faf80753", "altId": "61d6d1f9cdac7612faf80753", "date": "2024-01-15T10:30:00Z"}),
});
const data = await response.json();
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/conversations/messages/outbound',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"type": "Call", "attachments": ["string"], "conversationId": "ve9EPM428h8vShlRW1KT", "conversationProviderId": "61d6d1f9cdac7612faf80753", "altId": "61d6d1f9cdac7612faf80753", "date": "2024-01-15T10:30:00Z"},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/conversations/messages/outbound');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'type': 'Call', 'attachments': ['string'], 'conversationId': 've9EPM428h8vShlRW1KT', 'conversationProviderId': '61d6d1f9cdac7612faf80753', 'altId': '61d6d1f9cdac7612faf80753', 'date': '2024-01-15T10:30:00Z'}),
]);
$data = json_decode(curl_exec($ch), true);