curl --request POST \
--url https://api.leadping.ai/sms/{smsEventId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.leadping.ai/sms/{smsEventId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/sms/{smsEventId}/cancel");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.leadping.ai/sms/{smsEventId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.leadping.ai/sms/{smsEventId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/sms/{smsEventId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/{smsEventId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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": "Not Found",
"status": 404,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}Cancel a scheduled SMS message for a lead
Cancels a scheduled SMS event before delivery, preserving the event record while preventing the queued message from being sent. The cancellation window remains open only while the SMS status is Scheduled and closes when delivery begins.
curl --request POST \
--url https://api.leadping.ai/sms/{smsEventId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.leadping.ai/sms/{smsEventId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/sms/{smsEventId}/cancel");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.leadping.ai/sms/{smsEventId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.leadping.ai/sms/{smsEventId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/sms/{smsEventId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/{smsEventId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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": "Not Found",
"status": 404,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"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_.
Path Parameters
The SMS event identifier.
Response
Returns the SMS response.
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.

