Skip to main content

send_sms

Sends a transactional SMS via the OpenCDP Gateway.

Usage​

from cdp_client.models import SmsPayload
await client.send_sms(payload: SmsPayload)

SmsPayload​

FieldTypeDescription
tostrRecipient phone number (E.164 format).
identifiersIdentifiersUser identifiers for tracking.
bodystrThe SMS message content.
transactional_message_idstrOptional: Template reference.

Example​

from cdp_client.models import SmsPayload, Identifiers

payload = SmsPayload(
to="+1234567890",
identifiers=Identifiers(id="u_001"),
body="Your verification code is 123456."
)

await client.send_sms(payload)