TinyUrl¶
The TinyUrl APIs allow you to generate tiny URLs for SMS messages.
Custom Tiny URLs¶
DIY Surveys supports custom Tiny URLs for API users. You can use the standard DIY Surveys Tiny URL, diyu.me, or ask DIY Surveys to register and configure a domain for your account.
You can also specify the tiny URL as part of the API call. In that case, you are responsible for ensuring it has been mapped successfully with the DIY Surveys platform.
Metadata¶
Metadata can be associated when registering a TinyUrl so that it is returned in callbacks.
Register¶
Registers a URL and returns a TinyUrl.
URL: base/TinyUrl/Register
Method: POST
{
"FullUrl": "http://diysurveys.com",
"TinyUrl": "https://diyu.me",
"MetaData": [
{ "RequestID": "1234567890DEFED" },
{ "OrgID": 1010 },
{ "Instance": "ETRERT" },
{ "Campaign": 1242 },
{ "TimeStamp": "2020-02-04T11:47:33.645773+00:00" }
]
}
Returns¶
{ "http://diyu.me/23423" }
Statuses¶
| Status | Description |
|---|---|
| 400 | There was a problem registering the tiny URL. |
RegisterList¶
Registers a list of URLs and returns a list of TinyUrls.
URL: base/TinyUrl/RegisterList
Method: POST
{
"UrlList": [
{
"FullUrl": "https://diysurveys.com",
"TinyUrl": "https://diyu.me"
},
{
"FullUrl": "https://www.google.co.uk",
"TinyUrl": "https://diyu.me",
"MetaData": [
{ "RequestID": "1234567890DEFED" },
{ "OrgID": 1010 },
{ "Instance": "ETRERT" },
{ "Campaign": 1242 },
{ "TimeStamp": "2020-02-04T11:47:33.645773+00:00" }
]
}
]
}
Example response:
{
"UrlList": ["tinyUrl1", "tinyUrl2"]
}
Statuses¶
| Status | Description |
|---|---|
| 400 | There was a problem registering the tiny URL. |