The Basics

Here are all the basics you'll need to know to begin working with the SlickText API. As always, if you have questions, feel free to shoot us an email at info (at) slicktext.com.

Base URL

The base URL for all SlickText API calls is:

https://api.slicktext.com/v1/

Versioning

We currently have 1 version of our API. We do our best to make sure any changes or additions won't break applications you already have out there. If there's a possibility that they will, we'll release a new version, and you can continue using V1.

Authorization

In order to authenticate, you'll need the API keys from your SlickText account. If you haven't used them before, they may need to be generated. From the "My Account" page in your SlickText dashboard, select "API" and then click "Generate API Keys" to get your keys.

The API uses HTTP Basic Authorization. The public key is your username, and the private key is your password. You must pass your keys in the Authorization header of your request. Keys passed directly in the URL will not be recognized or accepted.

Authorization: Basic cHVi8XzEyMzDaDHJ53Q1NjY3Om9pda2dhdaH2VuZVjA5OHk=

Requests

There are two request methods understood by the SlickText API: GET and POST. Appropriately, GET is for getting stuff, and (less appropriately) POST is for doing stuff.

When using GET to get multiple results (a list of your textwords, for example) you may also want to include additional criteria in the query string. Any field that is included in the resources is available for use as a filter. These are exact matches; They are case-sensitive and do not allow wildcards.

https://api.slicktext.com/v1/messages/?campaign=Free%20Lunch

When using POST, you'll also have to include an action in the request body. This indicates which API function you are looking to execute.

action=OPTIN&number=5556567777&textword=4321

Content Type

The Content-type header for the request should be set to application/x-www-form-urlencoded, and the request body should be formatted as a normal URL encoded (query-string-like) string of name/value pairs. Do not pass your request body as a JSON object.

Rate Limiting

By default, requests to our API are limited to 4 per second or 240 per minute. This is measured over a 60 second window to allow for short bursts. All responses to authenticated requests will include three specific headers that give you the current status of your limit.

header Name Description
X-RateLimit The maximum number of requests you can make per window.
X-RateLimit-Remaining The number of requests remaining in the current rate limit window.
X-RateLimit-Reset The number of seconds until the current rate limit window resets.

These limits can be adjusted. If your account / use case requires additional throughput, please reach out to our support team to discuss having your rate limits increased.

The Response

A successful response will result in an HTTP status code of 200, and the response body will be a JSON string representing the results.

Example successful response:

                    
                    {
                        "meta": {
                            "limit": 20,
                            "offset": 0,
                            "total": 1,
                            "self": "https://api.slicktext.com/v1/v1/textwords"
                        },
                        "links": {
                            "self": "https://api.slicktext.com/v1/textwords/"
                        },
                        "textwords": [
                            {
                                "id": "43434439",
                                "word": "burgers",
                                "autoReply": "Thanks for joining Bob's Burgers VIP text list! Show this text for a free order of fries with the purchase of a buger!",
                                "added": "2012-07-09 11:08:46",
                                "optOuts": "23",
                                "ageRequirement": "0",
                                "contacts_count": "4632"
                            }
                        ]
                    }
                    
                    

A failure will result in a non-200 status code. The response body, in this case, will contain a message that will hopefully give you some insight into what happened.

Example unsuccessful response:


                    {
                    
                        "meta": {
                            "link": "https://api.slicktext.com/v1/textwordss"
                        },
                        "error": {
                            "message": "There was an error in your request. Please check the URI and your data"
                        }
                    
                    }
                    
Error Code Error Reason
400 Bad Request - There was an error in your request
403 Forbidden - Your account doesn't have access to that resource
404 Not Found - That resource doesn't exist
500 Internal Server Error - Oops. We did something wrong (hopefully just a typo)


Example responses will be included in the documentation for our specific resources.