Skip to content

Public routes: App

What an app shows before anyone signs in.

What it doesRoute
Read an app’s public faceGET /public/v1/apps/{key}
Load a part of the website messengerGET /public/v1/messenger/parts/{file}
Load the website messengerGET /public/v1/messenger/web/{file}

GET /public/v1/apps/{key}

What an app shows before anyone signs in: its brand, which parts are on, its currency and languages, and whether it is a live or test app. Cached for a minute. A page on one of the app’s web origins may read it from a browser.

Needs: nothing: no credential.

Parameters

NameInDescription
key (required)pathThe app’s public key (app_…).

Answers

StatusBodyMeaning
200PublicAppOK
404problemNot found, or the part is switched off.
429problemToo many requests: wait for Retry-After.

GET /public/v1/messenger/parts/{file}

One of the website messenger’s lazy parts, <name>.js (such as an emoji picker), which the messenger loads from here when it needs it; a website does not load it itself. A name is lower case letters, digits and dashes, then .js. Served as the messenger’s script is, with no boot: cached for five minutes, with an ETag, on the same budget. 404 for any other name.

Needs: nothing: no credential.

Parameters

NameInDescription
file (required)path

Answers

StatusBodyMeaning
200application/javascriptOK
304none304
404problemNot found, or the part is switched off.
429problemToo many requests: wait for Retry-After.

GET /public/v1/messenger/web/{file}

The website messenger, <app key>.js: the web SDK’s drawn messenger, its launcher, home, conversations, help center and the in-app messages, booted with PurrCRM’s address and the app’s public key. Load it with a script tag; any website may, and only the app’s web origins may then call PurrCRM from it. Cached for five minutes, with an ETag. 404 for a key that is no app’s.

Needs: nothing: no credential.

Parameters

NameInDescription
file (required)path

Answers

StatusBodyMeaning
200application/javascriptOK
304none304
404problemNot found, or the part is switched off.
429problemToo many requests: wait for Retry-After.