Skip to main content

Sending SMS from API

To send an email using the API, you can send a POST request to the following URL.

http(s)://<your_domain>/communication/email/api/?action=send

You can use the following parameters to customize the email.

#Recipient's mobile number
to_number: '+919999999999'

#SMS message content
message: 'SMS content here'

#Configuration key (optional)
key: 'Key'

You have the flexibility to tailor the SMS configuration for SMS delivery based on your needs by specifying the configuration key. The config argument plays a pivotal role in this process; by providing a value for this argument when configuring the SMS object, you can explicitly define the SMS configuration to be employed.

However, it's essential to note that in scenarios where no default configuration is specified and the config key is not passed, an error will be raised. This ensures that proper configuration is enforced, preventing potential issues with SMS delivery.