Important: Tr.im API is in Beta
Keywords are the defining part of your trimmed links. Ensuring that they remain memorable and relevant is vital for the success of the link.
Edit the keyword of short link
*Important: User (x-api-key) must be owner of the short link associated with the keyword
Url: /links/{keyword}/edit
Method: PUT
Request
Parameter |
Type |
Description |
Required |
keyword |
string |
current keyword of short link |
true |
Response
Parameter |
Type |
Description |
link |
json |
link details |
An Example Request
PUT /links/{keyword}/edit HTTP/1.1
x-api-key: 2a4ff74ee231de46d73f86777d20d96c
Content-Type: application/json
{"keyword":"newkeyword"}
An Example Response
200 (Success)
{"link":{"clicksCount":8,"id":1834978,"short_url":"stage.tr.im\/newkeyword","long_url":"https:\/\/www.facebook.com\/wikipedia","user_id":{"id":10429},"client_ip":"38.140.30.50","is_archived":0,"is_spam":false,"page_title":"Wikipedia | Facebook","created_at":"2015-07-14T07:47:55+0000","targets":[],"link_aliases":[{"id":77,"short_url":"stage.tr.im\/zk1y6","alias_created_date":"2015-07-14T13:21:47+0000","is_spam":false}],"link_tags":[]}}
Example Error Responses
-
500 Internal Server Error. An Exception was thrown while handling: Method Not Allowed
- {"code":400,"message":"Validation Failed","errors":{"errors":["You need to pass at least one parameter"],"children":{"title":{},"keyword":{},"tags":{}}}}
-
403 Forbidden {"Forbidden":"Authentication Failed."}
Comments