Public routes: App
What an app shows before anyone signs in.
| What it does | Route |
|---|---|
| Read an app’s public face | GET /public/v1/apps/{key} |
| Load a part of the website messenger | GET /public/v1/messenger/parts/{file} |
| Load the website messenger | GET /public/v1/messenger/web/{file} |
Read an app’s public face
Section titled “Read an app’s public face”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
| Name | In | Description |
|---|---|---|
key (required) | path | The app’s public key (app_…). |
Answers
| Status | Body | Meaning |
|---|---|---|
| 200 | PublicApp | OK |
| 404 | problem | Not found, or the part is switched off. |
| 429 | problem | Too many requests: wait for Retry-After. |
Load a part of the website messenger
Section titled “Load a part of the website messenger”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
| Name | In | Description |
|---|---|---|
file (required) | path |
Answers
| Status | Body | Meaning |
|---|---|---|
| 200 | application/javascript | OK |
| 304 | none | 304 |
| 404 | problem | Not found, or the part is switched off. |
| 429 | problem | Too many requests: wait for Retry-After. |
Load the website messenger
Section titled “Load the website messenger”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
| Name | In | Description |
|---|---|---|
file (required) | path |
Answers