curl --request POST \
--url https://api.leadping.ai/sms/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversationId": "conversation-123",
"text": "Thanks for your interest. When is a good time to talk?"
}
'import requests
url = "https://api.leadping.ai/sms/send"
payload = {
"conversationId": "conversation-123",
"text": "Thanks for your interest. When is a good time to talk?"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/sms/send");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"conversationId\": \"conversation-123\",\n \"text\": \"Thanks for your interest. When is a good time to talk?\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.leadping.ai/sms/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"conversationId\": \"conversation-123\",\n \"text\": \"Thanks for your interest. When is a good time to talk?\"\n}")
.asString();const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
conversationId: 'conversation-123',
text: 'Thanks for your interest. When is a good time to talk?'
})
};
fetch('https://api.leadping.ai/sms/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/sms/send"
payload := strings.NewReader("{\n \"conversationId\": \"conversation-123\",\n \"text\": \"Thanks for your interest. When is a good time to talk?\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadping.ai/sms/send",
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([
'conversationId' => 'conversation-123',
'text' => 'Thanks for your interest. When is a good time to talk?'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"conversationId": "<string>",
"leadId": "<string>",
"fromPhoneNumberId": "<string>",
"outboundPhoneNumberId": "<string>",
"fromPhoneNumber": "<string>",
"selectionReason": "StickyConversation",
"wasManuallyOverridden": true,
"campaignId": "<string>",
"sourceId": "<string>",
"text": "<string>",
"media": [
{
"url": "<string>",
"contentType": "<string>",
"size": 123,
"sha256": "<string>",
"fileName": "<string>"
}
],
"status": "draft",
"statusReason": "<string>",
"queuedAt": "2023-11-07T05:31:56Z",
"scheduledFor": "2023-11-07T05:31:56Z",
"scheduledReason": "<string>",
"sendingStartedAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z",
"deliveredAt": "2023-11-07T05:31:56Z",
"receivedAt": "2023-11-07T05:31:56Z",
"failedAt": "2023-11-07T05:31:56Z",
"undeliverableAt": "2023-11-07T05:31:56Z",
"blockedAt": "2023-11-07T05:31:56Z",
"nextRetryAt": "2023-11-07T05:31:56Z",
"retryCount": 123,
"canceledAt": "2023-11-07T05:31:56Z",
"cancelReason": "<string>",
"errorCode": "<string>",
"errorMessage": "<string>",
"trafficType": "RealLead",
"billableAmount": 123,
"billingStatus": "<string>",
"complianceAction": "<string>",
"consoleEntries": [
{
"id": "<string>",
"stage": "<string>",
"status": "<string>",
"message": "<string>",
"occurredAt": "2023-11-07T05:31:56Z"
}
],
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"modifiedAt": "2023-11-07T05:31:56Z"
}{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Internal Server Error",
"status": 500,
"detail": "The request could not be completed."
}Send an SMS message to an organization lead
Sends an SMS message to a lead or phone number, applying current-organization sender selection, scheduling, and delivery rules.
curl --request POST \
--url https://api.leadping.ai/sms/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversationId": "conversation-123",
"text": "Thanks for your interest. When is a good time to talk?"
}
'import requests
url = "https://api.leadping.ai/sms/send"
payload = {
"conversationId": "conversation-123",
"text": "Thanks for your interest. When is a good time to talk?"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/sms/send");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"conversationId\": \"conversation-123\",\n \"text\": \"Thanks for your interest. When is a good time to talk?\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.leadping.ai/sms/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"conversationId\": \"conversation-123\",\n \"text\": \"Thanks for your interest. When is a good time to talk?\"\n}")
.asString();const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
conversationId: 'conversation-123',
text: 'Thanks for your interest. When is a good time to talk?'
})
};
fetch('https://api.leadping.ai/sms/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/sms/send"
payload := strings.NewReader("{\n \"conversationId\": \"conversation-123\",\n \"text\": \"Thanks for your interest. When is a good time to talk?\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadping.ai/sms/send",
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([
'conversationId' => 'conversation-123',
'text' => 'Thanks for your interest. When is a good time to talk?'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"conversationId": "<string>",
"leadId": "<string>",
"fromPhoneNumberId": "<string>",
"outboundPhoneNumberId": "<string>",
"fromPhoneNumber": "<string>",
"selectionReason": "StickyConversation",
"wasManuallyOverridden": true,
"campaignId": "<string>",
"sourceId": "<string>",
"text": "<string>",
"media": [
{
"url": "<string>",
"contentType": "<string>",
"size": 123,
"sha256": "<string>",
"fileName": "<string>"
}
],
"status": "draft",
"statusReason": "<string>",
"queuedAt": "2023-11-07T05:31:56Z",
"scheduledFor": "2023-11-07T05:31:56Z",
"scheduledReason": "<string>",
"sendingStartedAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z",
"deliveredAt": "2023-11-07T05:31:56Z",
"receivedAt": "2023-11-07T05:31:56Z",
"failedAt": "2023-11-07T05:31:56Z",
"undeliverableAt": "2023-11-07T05:31:56Z",
"blockedAt": "2023-11-07T05:31:56Z",
"nextRetryAt": "2023-11-07T05:31:56Z",
"retryCount": 123,
"canceledAt": "2023-11-07T05:31:56Z",
"cancelReason": "<string>",
"errorCode": "<string>",
"errorMessage": "<string>",
"trafficType": "RealLead",
"billableAmount": 123,
"billingStatus": "<string>",
"complianceAction": "<string>",
"consoleEntries": [
{
"id": "<string>",
"stage": "<string>",
"status": "<string>",
"message": "<string>",
"occurredAt": "2023-11-07T05:31:56Z"
}
],
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"modifiedAt": "2023-11-07T05:31:56Z"
}{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Internal Server Error",
"status": 500,
"detail": "The request could not be completed."
}Authorizations
Authorization header using the Bearer scheme. Accepted values are Leadping user JWT access tokens and WorkOS organization API keys beginning with sk_.
Body
The SMS request containing recipient and message details.
Defines the fields clients can send when working with SMS send.
Conversation ID that links this SMS send request to the Leadping inbox thread.
Body text for the SMS message or communication represented by this SMS send request.
Existing SMS event ID to reuse or update when retrying a send request.
UTC timestamp when Leadping should send the SMS message.
Sender phone number ID used for this outbound SMS or call.
Indicates whether a user manually overrode Leadping's automatic number selection for this SMS send request.
Messaging campaign identifier associated with this SMS send request.
Lead source ID used for attribution and sender selection.
Public HTTPS media URLs to attach. Supplying at least one URL sends the message as MMS.
Idempotency key used to prevent duplicate outbound delivery.
Response
The SMS response was created successfully.
Describes an SMS or MMS message, including participants, delivery state, scheduling, media, and billing details.
Conversation ID that links this SMS message to the Leadping inbox thread.
Lead ID associated with the SMS conversation or outreach attempt.
Sender phone number ID used for this outbound SMS or call.
Phone number ID selected for outbound delivery.
Sender phone number used for this communication.
Explains why Leadping selected, rejected, or substituted an outgoing caller or messaging number.
StickyConversation, LeadAssigned, CampaignOrSource, Preferred, LocalArea, HealthyPool, FallbackDefault, ManualOverride Indicates whether a user manually overrode Leadping's automatic number selection for this SMS message.
Messaging campaign identifier associated with this SMS message.
Lead source ID used for attribution and sender selection on this SMS message.
Body text for the SMS message or communication represented by this SMS message.
Media attached to this message. A non-empty collection identifies an MMS message.
Show child attributes
Show child attributes
Describes the normalized lifecycle of an SMS or MMS message from scheduling through delivery or failure.
draft, scheduled, queued, sending, sent, received, delivered, failed, undeliverable, opted_out, blocked_compliance, blocked_billing, blocked_missing_campaign, canceled Human-readable reason explaining the current status of this SMS message.
UTC timestamp when Leadping queued this SMS message for processing.
UTC timestamp when Leadping is scheduled to send this SMS message.
Reason Leadping scheduled this delivery for a later time.
UTC timestamp when Leadping began sending this message.
UTC timestamp when Leadping sent this message to the provider.
UTC timestamp when the provider confirmed delivery.
UTC timestamp when Leadping received this inbound event or message.
UTC timestamp when processing failed for this SMS message.
UTC timestamp when the provider marked the message undeliverable.
UTC timestamp when Leadping blocked this communication.
UTC timestamp when Leadping will retry this SMS message.
Number of retry attempts already made for this SMS message.
UTC timestamp when this delivery or workflow was canceled.
Reason this delivery, run, or request was canceled.
Machine-readable error code returned while processing this SMS message.
Human-readable error message returned while processing this SMS message.
Classifies messaging traffic by conversational, informational, marketing, or other compliance-relevant purpose.
RealLead, Warmup, Test, SystemInternal, FailedAttempt Monetary amount billed for this Leadping communication or transaction.
Billing state for this communication, charge, or transaction.
Compliance action applied to this message, lead, or sender.
Ordered diagnostic entries recorded while Leadping processed this message.
Show child attributes
Show child attributes
Stable unique identifier of the resource.
UTC timestamp when the resource was created.
UTC timestamp when the resource was last modified, or null when it has not been updated.

