Add root redirect

Important: Tr.im API is in Beta

Add root redirect

*Important:  User (x-api-key) must be owner of provided vanity domain

Url: /vanity-domains/{vanityDomain}/root-redirect-url

Method: POST

Request 

Parameter

Type

Description

Required

root_redirect_url

string

root redirect URL

true

 

Response

Parameter

Type

Description

vanity_domain

string

name of verified vanity domain

root_redirect_url

string

root redirect URL

 

An Example Request

POST /vanity-domains/paper22.com/root-redirect-url

x-api-key: 2a4ff74ee231de46d73f86777d20d96c

Content-Type: application/json

{"root_redirect_url" : "http://youtube.com"}

 

An Example Response

200 (Success)

{"vanity_domain":"paper22.com","root_redirect_url":"youtube.com"}

 

Example Error Responses

  1. 403 Forbidden {"Forbidden":"Authentication Failed."}

  2. {"code":400,"message":"Validation Failed","errors":{"errors":["Root redirect URL cannot be saved because of given url is unsafe."],"children":{"rootRedirectUrl":{}}}}

  3. 500 Internal Server Error. An Exception was thrown while handling: Method Not Allowed

Have more questions? Submit a request

Comments

Powered by Zendesk