Send Flash SMS
POST
/v2/flash-global/send
const url = 'https://api.contacta.mx/v2/flash-global/send';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"msg":"Hello World!","phone":"528100001234","sender":"AWESOMEINC","id":"my-external-id"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.contacta.mx/v2/flash-global/send \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "msg": "Hello World!", "phone": "528100001234", "sender": "AWESOMEINC", "id": "my-external-id" }'Sends a Flash SMS using a JSON payload in the request body.
Recommended for server-to-server integrations.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”JSON body for sending an SMS.
Media typeapplication/json
object
msg
required
GSM-encoded message (max 160 characters)
string
Example
Hello World!phone
required
E.164 destination phone number without + (11–15 digits including country code)
string
Example
528100001234sender
Sender ID authorized by carrier (optional)
string
Example
AWESOMEINCid
External reference ID (optional)
string
Example
my-external-idResponses
Section titled “Responses”SMS sent successfully
Media typeapplication/json
object
status
boolean
error
boolean
description
object
added_on
string format: date-time
charge
number format: float
country
object
country
string
iso_code
string
type
string
encoding
string
id
integer
job_id
string
length
integer
message
string
number
string
segments
integer
sender
string
Example
{ "status": true, "error": false, "description": { "added_on": "2023-09-20 16:47:15", "charge": 0.99, "country": { "country": "MEXICO", "iso_code": "MX", "type": "MOVIL" }, "encoding": "gsm", "id": 199999, "job_id": "199999", "length": 12, "message": "Hello World!", "number": "8100001234", "segments": 1, "sender": "AWESOMEINC" }}Missing required parameters
Media typeapplication/json
Example
{ "status": false, "error": true, "description": "Missing params, please verify or contact to support"}Your key auth is not valid
Media typeapplication/json
Example
{ "status": false, "error": true, "description": "Your key auth is not valid, please check with your administrator to get the new key"}Your account doesn’t have credits available for sending
Media typeapplication/json
Example
{ "status": false, "error": true, "description": "Your account doesn't have credits available for this, please contact your administrator"}Country or carrier not reachable or assigned to your account
Media typeapplication/json
Example
{ "status": false, "error": true, "description": "Country or carrier not reachable or assigned to your account, please contact an administrator or support"}Failed to append to the queue, no need to resend
Media typeapplication/json
Example
{ "status": false, "error": true, "description": "Failed to append to the queue, no need to resend"}Your account doesn’t have multi-message sending enabled
Media typeapplication/json
Example
{ "status": false, "error": true, "description": "Your account doesn't have multi-message sending enabled, please contact your administrator"}
