Skip to content

Guest API: Shared links

Links the user makes in the app to share a place in it.

What it doesRoute
Make a link to sharePOST /guest/v1/links
Read the user’s referral linkGET /guest/v1/referral

POST /guest/v1/links

Needs: the app key (X-CRM-App-Key) and the signed-in user’s token (Authorization: Bearer …), or their id for an app with unverified sign-in. See From a website or web app.

Body (application/json): ShareLinkBody

FieldTypeDescription
channelstring
dataobject of string
path (always)string

Answers

StatusBodyMeaning
201SharedLinkMade
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.
429problemToo many requests: wait for Retry-After.

GET /guest/v1/referral

The user’s own link for the app’s referral programme, made the first time it is asked for and the same every time after. A new user who arrives by it is the user’s referral, and the programme’s reward is counted for them. 409 for an app with no programme or no link domain.

Needs: the app key (X-CRM-App-Key) and the signed-in user’s token (Authorization: Bearer …), or their id for an app with unverified sign-in. See From a website or web app.

Answers

StatusBodyMeaning
200ReferralLinkOK
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.
429problemToo many requests: wait for Retry-After.