From Bright Pattern Documentation
< 5.2:Sms-mms-api-specification
Revision as of 04:32, 29 May 2024 by BpDeeplTranslateMaintenance (talk | contribs) (Updated via BpDeleteTranslateTags script)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
• 5.19 • 5.2 • 5.3 • 5.8


Send Message

This method is used to send an SMS/MMS message.

URL

https://<TENANT_URL>/clientweb/smsapi/v1/Messages

HTTP Method

POST

Content-Type

application/JSON

Parameters

Name Description Additional Info
To Destination phone number mandatory
Body Message text[1] Mandatory for SMS; optional for MMS if MediaURLs is present
From Origination phone number Mandatory
MessagingServiceSid BP Service identifier Reserved for future use
MediaUrls Link to content Used for MMS only
StatusCallback Callback URL Optional
ApplicationSid BP application identifier Reserved for future use
MaxPrice Maximum allowed price optional
ProvideFeedback Request confirmation flag Reserved for future use; optional (false by default)
ValidityPeriod Max time to wait Reserved for future use; optional (14,400 sec by default)


Alternatively, you could specify content as application/x-www-form-urlencoded :

Content-Type

application/x-www-form-urlencoded

Parameters

Name Description Additional Info
To Destination phone number Mandatory
Body Message text Mandatory for SMS; optional for MMS if MediaURLs is present
From Origination phone number Mandatory
MessagingServiceSid BP Service identifier Reserved for future use
MediaUrl (to send multiple media up to 10, specify MediaUrl0, MediaUrl1, …, MediaUrl9) Link to content Used for MMS only
StatusCallback Callback URL Optional
ApplicationSid BP application identifier Reserved for future use
MaxPrice Maximum allowed price Optional
ProvideFeedback Request confirmation flag Reserved for future use; optional (false by default)
ValidityPeriod Max time to wait Reserved for future use; optional (14,400 sec by default)

Response Type

JSON object

Response

{
  "account_sid": “<TENANT_ID>” 
  "api_version": "1",
  "body": "Let's grab lunch at Milliways tomorrow!",
  "num_segments": "1",
  "num_media": "1",
  “subresource_uris”: {“media”: “media_url”}
  "date_created": "Wed, 18 Aug 2010 20:01:40 +0000",
  "date_sent": null,
  "date_updated": "Wed, 18 Aug 2010 20:01:40 +0000",
  "direction": "outbound-api",
  "error_code": null,
  "error_message": null,
  "from": "14158141829",
  "sid": "MM90c6fc909d8504d45ecdb3a3d5b3556e",
  "status": "queued",
  "to": "15558675310",
  "uri": "/clientweb/smsapi/v1/Messages/MM90c6fc909d8504d45ecdb3a3d5b3556e"
}


  1. There may be a maximum number of characters in the message text, and that depends on the service provider. For SMS, 1600 characters max is typical (note: non-GSM characters would be less). For MMS, there is no specific limit for text, but an overall file size limit (typically 300 KB-600 KB)
< Previous | Next >