Skip to content

Server API: Saved links

The app’s saved links, made, read and changed by your servers, with their stats.

What it doesRoute
List the linksGET /server/v1/links
Make a linkPOST /server/v1/links
Read a linkGET /server/v1/links/{slug}
Change a linkPATCH /server/v1/links/{slug}
Read a link’s statsGET /server/v1/links/{slug}/stats

GET /server/v1/links

A page of the app’s saved links, the newest first: by kind (staff, shared or referral; staff’s unless asked), campaign, channel, tag, archived, or a search. Needs a key with the links scope.

Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.

Parameters

NameInDescription
qqueryWords to search for.
campaignquery
channelquery
tagquery
kindquery
archivedquery
cursorquery
limitqueryHow many to answer, at most.

Answers

StatusBodyMeaning
200SavedLinkListOK
400problemThe request could not be read: the problem names the field.
401problemNo credential, or one that is not right.
403problemRefused: the app is switched off, or this is not allowed.
429problemToo many requests: wait for Retry-After.

POST /server/v1/links

A saved link, as the Links tab makes one: its slug (made up when empty), destination, data, campaign, channel, overrides, preview, goal and expiry. With an Idempotency-Key, a request sent again answers the link the first made, 200 with Idempotent-Replayed. Needs a key with the links scope.

Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.

Parameters

NameInDescription
Idempotency-KeyheaderYour own id for this link (at most 100 characters): sent again, it answers the link it made.

Body (application/json): SavedLinkBody

FieldTypeDescription
android_urlstring
campaignstring
channelstring
countriesarray of LinkCountryRule
dataobject of string
desktop_modestring
desktop_urlstring
destination (always)string
expired_urlstring
expires_atstring (date-time)
goal_daysinteger
goal_eventstring
ios_urlstring
name (always)string
og_descriptionstring
og_imagestring
og_titlestring
slug (always)stringMade up when it is empty.
tagsarray of string
template_idstring
variantsarray of LinkVariant

Answers

StatusBodyMeaning
200SavedLinkOK
201SavedLinkMade
400problemThe request could not be read: the problem names the field.
401problemNo credential, or one that is not right.
403problemRefused: the app is switched off, or this is not allowed.
409problemRefused as things stand: the problem says why.
422problemA value that is not right: the problem says which.
429problemToo many requests: wait for Retry-After.

GET /server/v1/links/{slug}

One of the app’s saved links, by its slug, with its short and canonical addresses. Needs a key with the links scope.

Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.

Parameters

NameInDescription
slug (required)pathThe article’s or collection’s slug.

Answers

StatusBodyMeaning
200SavedLinkOK
400problemThe request could not be read: the problem names the field.
401problemNo credential, or one that is not right.
403problemRefused: the app is switched off, or this is not allowed.
404problemNot found, or the part is switched off.
429problemToo many requests: wait for Retry-After.

PATCH /server/v1/links/{slug}

Changes the fields the body names; the rest stay as they are. Needs a key with the links scope.

Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.

Parameters

NameInDescription
slug (required)pathThe article’s or collection’s slug.

Body (application/json): SavedLinkBody

FieldTypeDescription
android_urlstring
campaignstring
channelstring
countriesarray of LinkCountryRule
dataobject of string
desktop_modestring
desktop_urlstring
destination (always)string
expired_urlstring
expires_atstring (date-time)
goal_daysinteger
goal_eventstring
ios_urlstring
name (always)string
og_descriptionstring
og_imagestring
og_titlestring
slug (always)stringMade up when it is empty.
tagsarray of string
template_idstring
variantsarray of LinkVariant

Answers

StatusBodyMeaning
200SavedLinkOK
400problemThe request could not be read: the problem names the field.
401problemNo credential, or one that is not right.
403problemRefused: the app is switched off, or this is not allowed.
404problemNot found, or the part is switched off.
409problemRefused as things stand: the problem says why.
422problemA value that is not right: the problem says which.
429problemToo many requests: wait for Retry-After.

GET /server/v1/links/{slug}/stats

A link’s clicks, unique visitors, opens in the app and installs by day over a range (from and to, days in UTC; the last 30 by default), its clicks by platform, channel and referrer, and its goal’s conversions. Needs a key with the links scope.

Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.

Parameters

NameInDescription
slug (required)pathThe article’s or collection’s slug.
fromquery
toqueryA link’s path in the app, with its query.

Answers

StatusBodyMeaning
200LinkStatsOK
400problemThe request could not be read: the problem names the field.
401problemNo credential, or one that is not right.
403problemRefused: the app is switched off, or this is not allowed.
404problemNot found, or the part is switched off.
429problemToo many requests: wait for Retry-After.