Skip to content

SMS Delivery Report (MT)

POST
/your-webhook-url/mt

Contacta.mx sends a POST request to your configured webhook URL when a delivery status update is received for an outgoing SMS (Mobile Terminated).

This is not an endpoint you call — configure your webhook URL through request to soporte@contacta.mx and implement this endpoint on your server to receive delivery reports.

Status codes

CodeMeaning
3Sent and confirmed by the carrier
10Rejected by the operator

Validating requests

Every webhook request includes the following headers to verify it originates from contacta.mx:

HeaderValue
User-Agentcontacta.mx
x-contacta-timeUnix timestamp (seconds)
x-contacta-usersha1(api_key)
x-contacta-signaturesha1(api_key + x-contacta-time)

Reject requests where the signature does not match or where x-contacta-time is older than your acceptable tolerance window (e.g. 60 seconds).

User-Agent
required
string
Allowed values: contacta.mx
contacta.mx

Always set to contacta.mx on webhook requests

x-contacta-time
required
integer
1750000000

Unix timestamp (seconds) of when the request was sent.

Use this together with x-contacta-signature to validate request freshness and prevent replay attacks.

x-contacta-user
required
string
a94a8fe5ccb19ba61c4c0873d391e987982fbbd3

SHA1 hash of your API key.

Use this to identify which account sent the webhook.

x-contacta-signature
required
string
b6589fc6ab0dc82cf12099d1c2d40ab994e8410c

SHA1 hash of your API key concatenated with the timestamp from x-contacta-time.

Use this to verify the request authenticity:

expected = sha1(api_key + x-contacta-time)
valid    = expected == x-contacta-signature

Payload delivered to your webhook URL when a delivery status update is received for an outgoing SMS (MT).

The status field indicates the final delivery result:

  • 3 — Sent and confirmed by the carrier
  • 10 — Rejected by the operator
object
trace_id
required

ID returned when the SMS was originally sent. Use this to correlate the delivery report with your send request.

string
100000000000000000
segments
required

Number of SMS segments the message was split into

integer
1
chars
required

Total character count of the message

integer
42
encoding
required

Character encoding used for the message

string
Allowed values: GSM UNICODE
GSM
message
required

Content of the outgoing message

string
Tu código de verificación es 482913
phone
required

Destination phone number (E.164 without +)

string
5218112345678
status
required

Delivery status code:

  • 3 — Sent and confirmed by the carrier
  • 10 — Rejected by the operator
integer
Allowed values: 3 10
3
Examples

Delivery confirmed by carrier

{
"trace_id": "100000000000000000",
"segments": 1,
"chars": 42,
"encoding": "GSM",
"message": "Tu código de verificación es 482913",
"phone": "5218112345678",
"status": 3
}

Your server must return HTTP 200 to acknowledge receipt. Any other status code will trigger a retry from contacta.mx.

Useful for guiding users to view code examples in different developer languages.

developer@developer:~#
curl -X POST "https://api.example.com/your-webhook-url/mt" \
-H "Accept: application/json" \
-H "Connection: keep-alive" \
-H "Content-Type: application/json" \
-H "User-Agent: value" \
-H "x-contacta-time: value" \
-H "x-contacta-user: value" \
-H "x-contacta-signature: value" \
-d '{"trace_id":"100000000000000000","segments":1,"chars":42,"encoding":"GSM","message":"Tu código de verificación es 482913","phone":"5218112345678","status":3}'