Send or schedule a campaign
curl --request POST \ --url https://api.sipstack.com/api/v2/flare/campaigns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/send \ --header 'x-api-key: <x-api-key>'import requests
url = "https://api.sipstack.com/api/v2/flare/campaigns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/send"
headers = {"x-api-key": "<x-api-key>"}
response = requests.post(url, headers=headers)
print(response.json())const url = 'https://api.sipstack.com/api/v2/flare/campaigns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/send';const options = {method: 'POST', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}import axios from 'axios';
const options = { method: 'POST', url: 'https://api.sipstack.com/api/v2/flare/campaigns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/send', headers: {'x-api-key': '<x-api-key>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}Sends a draft campaign now, or activates a scheduled one, after
running the full pre-send gate chain: an unsupported-merge-var check and
the 10DLC carrier-safety content scan (SHAFT-DC, opt-out language,
CTIA formatting) run before any state change, so a blocked campaign
stays draft. Opted-out recipients are filtered at fan-out. Only draft
or paused campaigns are sendable. Requires sms:send. This endpoint is
subject to a tighter bulk-operation rate limit. The response carries the
segment estimate (see FlareSegmentEstimate) and a
UCS2_SEGMENT_INFLATION warning when special characters raise the
segment count; it never blocks the send.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Responses
Section titled “ Responses ”Campaign scheduled (a scheduled campaign was activated for its future send time).
object
object
object
Special characters (emoji, symbols, curly quotes, hidden spaces) raise the segment count of a message.
Segments per message with those characters replaced or removed.
Example
{ "message": "Campaign scheduled successfully", "campaign": { "status": "scheduled" }, "encoding": "GSM-7", "warnings": [ { "code": "UCS2_SEGMENT_INFLATION", "characters": [ "☀", "✨" ], "segmentsWithout": 2 } ]}Campaign queued for immediate delivery.
object
object
object
Special characters (emoji, symbols, curly quotes, hidden spaces) raise the segment count of a message.
Segments per message with those characters replaced or removed.
Example
{ "message": "Campaign queued for delivery", "campaign": { "status": "active" }, "encoding": "GSM-7", "warnings": [ { "code": "UCS2_SEGMENT_INFLATION", "characters": [ "☀", "✨" ], "segmentsWithout": 2 } ]}Missing or invalid API key.
Inline error shape used by the messaging API and management endpoints.
object
Example
{ "success": false, "error": "Recipient phone number (to) is required"}The key is missing the sms:send scope, or the Flare API tier is not on your plan.
Inline error shape used by the messaging API and management endpoints.
object
Example
{ "success": false, "error": "Recipient phone number (to) is required"}Campaign not found in your organization.
Inline error shape used by the messaging API and management endpoints.
object
Example
{ "success": false, "error": "Recipient phone number (to) is required"}The campaign is not in a sendable state (already sending, scheduled, or sent).
Inline error shape used by the messaging API and management endpoints.
object
Example
{ "success": false, "error": "Recipient phone number (to) is required"}Blocked by the 10DLC content scan (code: CONTENT_SCAN_BLOCKED) or an unsupported merge variable (code: UNSUPPORTED_MERGE_VARS). The body’s details carries the scan reasons/violations.
Inline error shape used by the messaging API and management endpoints.
object
Example
{ "success": false, "error": "Recipient phone number (to) is required"}