Mobile Commons
Resolution Summary
Provided information on the Mobile Commons Rest API
Details
Mobile Commons API
The Mobile Commons API allows clients to interact with their campaigns and send messages programmatically.
It is important to note that you must follow all standard SMS compliance protocols when using the Mobile Commons REST API to manage subscriptions. There are some anti-SPAM restrictions that apply when using the REST API to subscribe profiles. It is important that you note these restrictions before attempting to use the API to manage subscriptions.
When using the API to create subscriptions you may only add a phone number whose permission to message them you have obtained. You must have a record of this permission being granted. Once you have permission to opt a number in, you may opt them into each campaign one time and one time only through the API. If a subscriber is already a member of that campaign or was previously a member of that campaign they will not receive a welcome message and no subscription will be generated (if they were already an active subscriber they will stay that way, if they were a subscriber and opted-out they will remain opted-out). When using the API to add a new profile to a campaign through a specific opt-in path, all opt-in path settings apply.
We have a rate limit for individual companies of 160 concurrent API calls.
Article Index
Security
For users who have not yet migrated to UCM, API Authorization is done using HTTP Basic Auth. You should use your Mobile Commons login email and password and you should access the API using your account’s subdomain (e.g. https://secure.mcommons.com). We recommend creating a novel login email and password for use specifically with the API. This will help with any support needs as well as action tracking.
Please consult your HTTP library’s documentation for details on how to specify basic auth credentials.
For users who have migrated to UCM, a new bearer token must be generated. More information on how to generate the token can be found in this article.
If your account has multiple clients/affiliates OR your email is used in multiple company accounts, then you can specify which one you want to use by passing a company parameter set to a Company Key fromhttps://secure.mcommons.com/companies. If you leave it off, we default to your firm.
https://secure.mcommons.com/api/messages?company=CO29A6F95DBFB7A03A7D9F61DDA4468D9B
You may modify cURL requests to include the company id or key as well. Below please find two examples:
HTTP GET
curl --user yourusername:yourpassword \
https://secure.mcommons.com/api/messages?company=CO29A6F95DBFB7A03A7D9F61DDA4468D9B
HTTP POST
curl --user yourusername:yourpassword \
--data "company=CO29A6F95DBFB7A03A7D9F61DDA4468D9B&phone_number=15553334411&campaign_id=2" \
https://secure.mcommons.com/api/profile_opt_out
Function Reference
- List Campaigns
- List Keywords
- List Groups
- List Campaign Subscribers
- List Group Members
- Create Group
- Add Group Member
- Remove Group Member
- List All Profiles
- Profile Summary
- Profile Update
- Profile Opt Out
- List Incoming Messages
- List Outgoing Messages
- Send SMS Message
- Send MMS Message
- Send Broadcast to Campaign Subscribers
- Reschedule a Broadcast
- Unschedule a Broadcast
- List Broadcast
- List Broadcasts
- List Calls
- Count mConnect Calls
- Donation Summary
- List Web Clicks
- List mConnects
- List Tinyurls
- Add Tag
- Remove Tag
- List Tags
- Campaign Opted-In
- Custom Column Value
- Attachments
- Upload Attachment
- Edit Attachment
- Archive Attachment
- Clear Conversation
- mData Entries
- Trigger mData
- Profile Update Attribute
- List mData
- List mData Queries
| URL: | https://secure.mcommons.com/api/campaigns |
| Protocol: | HTTP GET |
| Parameters: | include_opt_in_paths (set to 1 to include all opt-in path details. default is 0) sort (set to asc or desc to sort by campaign ID ascending or descending. default is ascending) status (set to active or ended to filter results. default is empty and returns all campaigns) campaign_id (provide a specific campaign ID to view single result, invalid campaign ID will return all campaigns) |
| Sample Response: | <?xml version="1.0" encoding="UTF-8"?> |