The links object gives you information about how many unique clicks each link have.


Renders: [application/json, text/html, application/xml]

Parses: [application/json, application/x-www-form-urlencoded, multipart/form-data]


Readonly fields

  • id
  • url
  • link
  • unique_clicks
  • clicks_url
  • total_clicks
  • percent_of_total

Example link

{
    "id": 23,
    "url": "https://api.getanewsletter.com/v3/reports/123/links/23/",
    "link": "https://www.example.com/example/url/",
    "unique_clicks": 54,
    "clicks_url": "https://api.getanewsletter.com/v3/reports/123/links/23/clicks/",
    "total_clicks": 1,
    "percent_of_total": 100.0
}

Responds with a list of links, like usual we provide next, prev, count and the results.

Possible url parameters are:

  • page: <int>

Example:

{
    "count": 46,
    "next": "https://api.getanewsletter.com/v3/reports/123/links/?page=3,
    "previous": "https://api.getanewsletter.com/v3/reports/123/links/?page=2,
    "results": [
        {
            "id": 23,
            "url": "https://api.getanewsletter.com/v3/reports/123/links/23/",
            "link": "https://www.example.com/example/url/",
            "unique_clicks": 54,
            "clicks_url": "https://api.getanewsletter.com/v3/reports/123/links/23/clicks/",
            "total_clicks": 1,
            "percent_of_total": 100.0
        },
        ...
    ]
}

GET /reports/<report_id>/links/<id>/

Responds with a report.

Example:

GET  '/reports/123/links/23/
{
    "id": 23,
    "url": "https://api.getanewsletter.com/v3/reports/123/links/23/",
    "link": "https://www.example.com/example/url/",
    "unique_clicks": 54,
    "clicks_url": "https://api.getanewsletter.com/v3/reports/123/links/23/clicks/",
    "total_clicks": 1,
    "percent_of_total": 100.0
}

GET /reports/<report_id>/links/export/

Possible url parameters are:

  • csv: <0|1>

If the csv parameter is not provided the API automatically returns xls-file for all exports under 64 000 rows, and with csv-file for bigger. The export includes the links URL, the number of unique click and the percent of total clicks.