Appearance
Links
Links are the objects that track links within emails. Each link belongs to one email and tracks information when a recipient clicks on the link within the email.
Endpoints
GET /v1/links/:id
GET /v1/links/:id/clicksRetrieve a link
GET /v1/links/:idGets the details of a single link.
Parameters
No parameters
Returns
A link object with the full object details and properties.
Example response
json
{
"object": "link",
"id": "5eac7299-e279-49a0-8db5-2e2ec2edefc0",
"link_href": "https://google.com",
"link_text": "Google",
"created_at": "2022-01-24T09:12:34.000Z",
"clicks_count": 4,
"unique_clicks_count": 3,
"email": {
"id": "937ccbe2-4cb5-4c76-96bf-29510b514dfa",
"title": "Weekly Newsletter - Jan 24",
"details": "/v1/emails/937ccbe2-4cb5-4c76-96bf-29510b514dfa"
},
"urls": {
"email": "/v1/emails/937ccbe2-4cb5-4c76-96bf-29510b514dfa",
"clicks": "/v1/links/5eac7299-e279-49a0-8db5-2e2ec2edefc0/clicks"
}
}List clicks on a link
GET /v1/links/:id/clicksGets clicks on a link.
Parameters
| Name | Optional | Default | Description |
|---|---|---|---|
| Pagination parameters | See pagination for more information. |
Returns
A page of click objects. Each click is a simple object, containing the click's id, recipient's email, and when the link was clicked. Each click object also contains simple objects for the associated link and email.
Example response
json
{
"object": "array",
"has_more": true,
"next": "/v1/links/5eac7299-e279-49a0-8db5-2e2ec2edefc0/clicks?cursor=eyJzb3J0IjoibmFtZSIsIm9yZGVyIjoiY...",
"limit": 5,
"size": 5,
"data": [
{
"object": "click",
"id": "9dbc3ed6-157f-41ea-891b-f7ddcab5a46d",
"recipient": "john@example.com",
"clicked_at": "2022-01-24T09:12:34.000Z",
"link": {
"id": "5eac7299-e279-49a0-8db5-2e2ec2edefc0",
"link_href": "https://google.com",
"details": "/v1/links/5eac7299-e279-49a0-8db5-2e2ec2edefc0",
},
"email": {
"id": "937ccbe2-4cb5-4c76-96bf-29510b514dfa",
"title": "Weekly Newsletter - Jan 24",
"details": "/v1/emails/937ccbe2-4cb5-4c76-96bf-29510b514dfa",
},
"urls": {
"link": "/v1/links/5eac7299-e279-49a0-8db5-2e2ec2edefc0",
"email": "/v1/emails/937ccbe2-4cb5-4c76-96bf-29510b514dfa",
},
},
{...},
{...},
{...},
{...},
],
}