Get topic clicks overview
POST
/api/v3/metrics/clicks/topics
const url = 'https://api.tryletterhead.com/api/v3/metrics/clicks/topics';const form = new FormData();form.append('api', 'true');form.append('from', '2026-02-26');form.append('to', '2026-03-26');form.append('channels[]', 'an-example-channel');form.append('page', '1');form.append('limit', '10');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tryletterhead.com/api/v3/metrics/clicks/topics \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form api=true \ --form from=2026-02-26 \ --form to=2026-03-26 \ --form 'channels[]=an-example-channel' \ --form page=1 \ --form limit=10Per-content-topic click totals for your company’s clicks dashboard, with a daily sparkline per topic and the count of distinct links tagged with that topic in range.
v3 endpoints expect a company API key.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type multipart/form-data
object
api
required
When set to true, this endpoint will accept authorization with your API Key.
string
Example
true from
required
Period start date (inclusive).
string
Example
2026-02-26 to
required
Period end date (inclusive), must be >= from.
string
Example
2026-03-26 channels[]
string[] | Optionally filter to a list of channels (by their slugs).
string
Example
an-example-channel page
Page number. Defaults to 1.
string
Example
1 limit
Items per page. Max of 100. Defaults to 10.
string
Example
10Responses
Section titled “ Responses ”Get topic clicks overview
Media type application/json
object
items
Array<object>
object
topic
string
links
Distinct URLs tagged with this topic in range.
integer
clicks
integer
clicksUnique
integer
daily
Array<object>
object
date
string
clicks
integer
message
string
total
integer
Example
{ "items": [ { "topic": "Local News", "links": 14, "clicks": 320, "clicksUnique": 210, "daily": [ { "date": "2026-02-26", "clicks": 8 }, { "date": "2026-02-27", "clicks": 11 } ] } ], "message": "Clicks dashboard topics retrieved.", "total": 1}400 Validation Error — from/to missing, malformed, or from is after to.
Media type application/json
object
data
Array<string>
items
Array<object>
object
message
string
total
integer
Example
{ "data": [ "The from date must be on or before the to date." ], "items": [], "message": "Looks like the input data doesn't meet our requirements.", "total": 0}Still can’t find what you need? Contact support.