Sections in this category

Get affiliate link

  • Updated

This endpoint lets you monetize links in the content of your project. Take API replaces the direct link with the affiliate link if an offer from the advertiser is found for it in Takeads catalog. 

You can test this API endpoint and inspect the possible responses using Swagger UI.



Method: PUT

Request headers

Header Value Description
Authorization Bearer <PublicKey>

String of alphanumeric characters with Bearer as prefix, used to authenticate and authorize your API requests.

To learn how to get your Public key, refer to the Authorization article.

Request body

A request body must contain the required iris parameter. Optionally, you can specify a SubID for the tracking link to be received, and request a link to the advertisers' logo.

Context-Type: application/json

Property Type Description
string[] List of links that you want to affiliate (IRI, RFC 3987).
string / undefined SubID parameter that you would like to add to the affiliate link.
  • Only one SubID can be sent in each request.
  • If you are sending several links in one request, the specified SubID will be added to each of them.

    SubID format:

    • does not exceed 6144 symbols
    • may include numbers 1 through 9, Latin letters, and the _ and - symbols.
boolean / undefined If set to true, a link to the advertiser's logo will be included in the response.

Request examples

  •       curl --request PUT \ --url
    --header 'Authorization: Bearer <Public Key>' \ --header 'Content-Type: application/json' \ --data '{ "iris": [""] } '
  •       fetch("", {
    "method": "PUT",
    "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer <Public Key>"
    "body": "{\"iris\":[\"\"]}"
    .then(response => {
    .catch(err => {
  • $curl = curl_init();
    curl_setopt_array($curl, [
    CURLOPT_URL => "",
    CURLOPT_POSTFIELDS => "{\n\t\"iris\": [\n\t\t\"\"\n\t]\n}\n",
    "Authorization: Bearer <Public Key>",
    "Content-Type: application/json"
    $response = curl_exec($curl);
    $err = curl_error($curl);

    if ($err) {
    echo "cURL Error #:" . $err;
    } else {
    echo $response;
  •       import http.client
    conn = http.client.HTTPSConnection("")
    payload = "{\n\t\"iris\": [\n\t\t\"\"\n\t]\n}\n"
    headers = {
    'Content-Type': "application/json",
    'Authorization': "Bearer <Public Key>"
    conn.request("PUT", "/v1/product/monetize-api/v2/resolve", payload, headers)
    res = conn.getresponse()
    data =



If the request was successfully processed by the server, the HTTP response with 200 status code is returned.

The response payload is a JSON object that contains data array. Each item of the array is an object with the IRI, affiliated link, and link to the advertiser's logo (if requested).

The following table describes the response properties.

Property Type Description
iri string Link sent in the request.
trackingLink string Affiliate link to the advertiser's website (RFC 3986). You can update the s (SubID) and url (Deeplink) parameters after the tracking link is generated.
imageUrl string / null Link to the advertiser's logo, if requested (RFC 3986).

If an offer from the advertiser is not found in Takeads catalog, an empty array is returned in the response.

Example value

data: [
iri: '',
trackingLink: ',
imageUrl: ''
iri: '',
trackingLink: ',
imageUrl: ''

To view possible error responses, refer to the Error responses article.

Was this article helpful?

0 out of 0 found this helpful