Shortlinks

The shortlinks resource is very basic. All of the active shortlinks you've reserved through the SlickText dashboard are available through the API. The following actions can be performed on this resource...

Retrieve All Shortlinks

By default, the first set of 20 shortlinks will be returned, but you can modify this number with limit and offset values in the query string. The max limit for a single request is 10,000.

GET https://api.slicktext.com/v1/shortlinks?limit=30&offset=10

Example response:


                    {
                        "meta": {
                            "limit": 30,
                            "offset": 10,
                            "total": 1
                        },
                        "links": {
                            "self": "https://api.slicktext.com/v1/shortlinks/"
                        },
                        "shortlinks": [
                            {
                                id: 43434439,
                                "name": "Link Name",
                                "url": "https://www.slicktext.com",
                                "hash": "nM0L",
                                "clickCount": 123,
                                "isSmart": 1,
                                "created": "2021-03-18 12:43:26",
                                "shortUrl": "https://slkt.io/nM0L"
                            }
                        ]
                    }
                    

Retrieve a Specific Shortlink

Retrieves the single shortlink with the Id equal to {id} or hash equal to {hash}

GET https://api.slicktext.com/v1/shortlinks/{id} GET https://api.slicktext.com/v1/shortlinks/hash-{hash}

Example response:


                    {
                        "links": {
                            "self": "https://api.slicktext.com/v1/shortlinks/43434439"
                        },
                        "shortlink": {
                            id: 43434439,
                            "name": "Link Name",
                            "url": "https://www.slicktext.com",
                            "hash": "nM0L",
                            "clickCount": 123,
                            "isSmart": 1,
                            "created": "2021-03-18 12:43:26",
                            "shortUrl": "https://slkt.io/nM0L"
                        }
                    }
                    

Retrieve All Contacts Who Clicked a Shortlink

Retrieves the list of contacts who clicked the specified link. The link is specified as you were getting it by Hash or by Id (see above). By default, the first set of 20 shortlinks will be returned, but you can modify this number with limit and offset values in the query string. The max limit for a single request is 10,000.

If a contact clicked the link, but is no longer subscribed to your list, you will still get the clickCount and the id of the contact, but the contact will have no other information available.

GET https://api.slicktext.com/v1/shortlinks/{id}/contacts GET https://api.slicktext.com/v1/shortlinks/hash-{hash}/contacts

Example response:


                    {
                        "meta": {
                            "limit": 30,
                            "offset": 10,
                            "total": 1
                        },
                        "links": {
                            "self": "https://api.slicktext.com/v1/shortlinks/nM0L/contacts"
                        },
                        "contacts":
                        [
                            {
                                "id": "620548156453356",
                                "number": "+13334445555",
                                "city": "Jamestown",
                                "state": "NY",
                                "zipCode": 14701,
                                "country": "US",
                                "textword": "43434439",
                                "subscribedDate": "2016-11-23 08:08:00",
                                "firstName": "John",
                                "lastName": "Smith",
                                "birthDate": null,
                                "email": "john@slicktext.com",
                                "optInMethod": "api",
                                "clickCount": 3,
                                "clicks": [
                                  "2020-11-24 08:08:00",
                                  "2020-11-25 12:18:00",
                                  "2020-11-26 06:00:00",
                                ]
                            }
                        ]
                    }