Service Layer API documentation
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
images
sections
.gitignore
FAQ.md
README.md

README.md

Service Layer API documentation


DEPRECATED

See CarouselSMS.com/#documentation instead.


Endpoint

http://sl.carouselsms.com/api/

Format of Request: HTTP POST to endpoint with URL encoded parameters.

Format of Response: JSON.

Examples:

curl 'http://sl.carouselsms.com/api/send_message?api_key=API_KEY&body=test&phone_number=+1(347)264-3707'
{"message_ids":"5554055"}

curl 'http://sl.carouselsms.com/api/send_messages?api_key=API_KEY&template=Hello,%20%7B%7Bname%7D%7D&recipients=%7B%2213472643707%22:%7B%22name%22:%22Alex%22%7D,%221234567890%22:%7B%22name%22:%22Unknown%22%7D%7D' 
{"message_ids":"5554173"}
* without encoding URL looks like: http://sl.carouselsms.com/api/send_messages?api_key=API_KEY&template=Hello, {{name}}&recipients={"13472643707": {"name": "Alex"}, "1234567890": {"name": "Unknown"}}

API key

Every client Application (app) has an API key associated with it. This key is generated during the creation of the app and can be re-generated from the show/edit screens in the administrative console.

This key uniquely identifies an app during the calls the app does to the Service Layer (SL).

Methods

Data types

Types of parameters being passed with API calls and received as callbacks:

String

Regular text string.

Integer

Integer number, either positive or negative.

Boolean

We are quite flexible with booleans. They are case-insensitive and can take the following shapes:

  • TRUE: 1, t, true, y, yes
  • FALSE: 0, f, false, n, no

Dates and times

Dates and times parsing is very liberal in the SL. We are capable of parsing almost everything that can be interpreted as a date/time. Here are some examples of what the dates can look like:

  • 16:30 – takes current date as basis and uses provided time
  • Aug 31 – take current year, users the given date and sets time to 00:00
  • 7/31 – the same as above
  • 2/9/2007 or 2007-02-09 – date only
  • 02-09-2007 12:30:44 AM or 2007-09-02T00:30:44Z - UTC (GMT) time
  • 02-09-2007 12:30:44 PM EST or 2007-09-02T12:30:44-0500 - localized time
  • Wednesday, January 10, 2001 - human-readable date

If you need a stricter definition, you can refer to RFC2822 (3.3. Date and Time Specification).

Modules

The SL uses a series of modules to provide basic business logic for applications.

Callbacks

The following links provide detailed documentation on callbacks.

Definitions

  • Handset, Phone: an end-user's mobile phone.
  • MT (Mobile Terminated): outgoing message from our system to a handset.
  • MO (Mobile Originated): incoming message from a handset to our system.
  • DID (Direct Inward Dialing): the term we use for virtual numbers or long codes. These are 10-digit phone numbers in the United States.
  • SMSC (Short Message Service Center): the point in the stack which stores and delivers text messages. In our case, we use internal SMSCs which can be made up of one DID or many. Multiple DIDs allow for threaded conversations and higher throughput.

FAQ

License

The Carousel API documents are Copyright © 2013 Recess Mobile.