API Docs
Update URL PUT
Update URL by sending PUT data in json format to REST API endpoint: /api/v1/urls/:SLASHTAG
or /api/v1/urls/:ID
Note: If you have multiple short URLs with the same "slashtag" on different domains, please use
:ID
based endpoint.
Request
Parameter | Type | Position | # | Description |
---|---|---|---|---|
apikey | string |
Header |
Required |
Enter your 20-30 characters unique api key. |
apisecret | string |
Header |
Required |
Enter your 12-20 characters unique api secret. |
Content-Type | string |
Header |
Required |
application/json |
destination | string |
Body |
Optional |
The destination URL that you want to transform into short URL. |
slashtag | string |
Body |
Optional |
The keyword for your branded short URL. Max: 100 characters |
redirect_code | integer |
Body |
Optional |
HTTP redirect codes (301, 302, 303, 304, 307, or 308). Default: 301 |
password | string |
Body |
Optional |
Password to protect URL and default is no password. Max: 50 characters |
domain_id | integer |
Body |
Optional |
ID of branded short domain. Default: 0 (no branded domain) |
Sample request-data json
{
"destination":"https://t2mio.com/blog/google-url-shortener-goo-gl-shutting-down/",
"slashtag":"newtag",
}
Response
{ "status": 200, "message": "ok", "data": { "rows_updated": 1 } }
{ "status": 400, "message": "Bad request. <detailed-error-message-will-go-here.>", "data": null }
{ "status": 404, "message": "Not found. URL with specified slashtag doesn't exist.", "data": null }