Add/Edit short link targets

Important: Tr.im API is in Beta

Targets are an excellent feature to ensure that your links drive users to the content that they want to see. This article explains how to set up the API to add or edit short link targets correctly.

*Important:  User (x-api-key) must be owner of short link associated with keyword

Url: /links/{keyword}/targets/

Method: POST

Request 

Parameter

Type

Description

Required

targets

array of JSON objects

array of targets objects

true

 

Parameter

Type

Description

Required

id

integer

id of the target

false

name

string

name of the target

true

targetUrl

url

target Url

true

precedenceOrder

integer

precedence Order

false

isDeviceInclusive

boolean

is device inclusive option

true

deviceIds

string

list of device ids separated by comma

false

isDeeplink

boolean

is the target for deep link

false

fallbackUrl

url

fallback URL for mobile deep link

false

isCountryInclusive

boolean

is country inclusive

false

countryIds

string

list of country ids separated by comma

false

 

Response 

Parameter

Type

Description

success

boolean

if target successfully saved

message

string

targets for stage.tr.im/newkeyword saved successfully.

 

An Example Request

 

An Example Response

200 (Success)

{"success":true,"message":"Targets for stage.tr.im\/newkeyword saved successfully."}

 

An Example Error Response

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

Have more questions? Submit a request

Comments

Powered by Zendesk