Public routes: Public help center
The help center’s public articles, for a web page with no signed-in user.
| What it does | Route |
|---|---|
| Search the public articles | GET /public/v1/help/articles |
| Read a public article | GET /public/v1/help/articles/{slug} |
| Say whether a public article helped | POST /public/v1/help/articles/{slug}/rating |
| Fetch an article’s picture | GET /public/v1/help/assets/{asset_id} |
| List the public collections | GET /public/v1/help/collections |
| Read a public collection | GET /public/v1/help/collections/{slug} |
| Find the app whose help center is at a domain | GET /public/v1/help/hosts/{host} |
| Read a help center request’s link | GET /public/v1/help/requests/{token} |
| Confirm a help center request | POST /public/v1/help/requests/{token} |
| List the kinds of request the help center takes | GET /public/v1/help/ticket-forms |
| Send a request from the help center | POST /public/v1/help/tickets |
Search the public articles
Section titled “Search the public articles”GET /public/v1/help/articles
Needs: the app key (X-CRM-App-Key, or ?app=). No sign-in.
Parameters
| Name | In | Description |
|---|---|---|
app | query | The app’s public key, for a request that cannot send the X-CRM-App-Key header. |
lang | query | A language to read in (a BCP 47 tag), instead of the user’s own. |
limit | query | How many to answer, at most. |
q | query | Words to search for. |
Answers
| Status | Body | Meaning |
|---|---|---|
| 200 | Articles | OK |
| 404 | problem | Not found, or the part is switched off. |
| 429 | problem | Too many requests: wait for Retry-After. |
Read a public article
Section titled “Read a public article”GET /public/v1/help/articles/{slug}
Needs: the app key (X-CRM-App-Key, or ?app=). No sign-in.
Parameters
| Name | In | Description |
|---|---|---|
slug (required) | path | The article’s or collection’s slug. |
app | query | The app’s public key, for a request that cannot send the X-CRM-App-Key header. |
lang | query | A language to read in (a BCP 47 tag), instead of the user’s own. |
Answers
| Status | Body | Meaning |
|---|---|---|
| 200 | Article | OK |
| 404 | problem | Not found, or the part is switched off. |
| 429 | problem | Too many requests: wait for Retry-After. |
Say whether a public article helped
Section titled “Say whether a public article helped”POST /public/v1/help/articles/{slug}/rating
From a reader with no account: their own id for the page, kept apart from every user’s.
Needs: the app key (X-CRM-App-Key, or ?app=). No sign-in.
Parameters
| Name | In | Description |
|---|---|---|
slug (required) | path | The article’s or collection’s slug. |
app | query | The app’s public key, for a request that cannot send the X-CRM-App-Key header. |
Body (application/json): PublicRatingBody
| Field | Type | Description |
|---|---|---|
helpful (always) | boolean | |
language | string | The language the reader read it in (Article.Language), for the help report; left out, the app’s default. |
visitor (always) | string |
Answers
| Status | Body | Meaning |
|---|---|---|
| 204 | none | Done, with nothing to say |
| 404 | problem | Not found, or the part is switched off. |
| 429 | problem | Too many requests: wait for Retry-After. |
Fetch an article’s picture
Section titled “Fetch an article’s picture”GET /public/v1/help/assets/{asset_id}
A redirect to the picture’s short-lived address.
Needs: nothing: no credential.
Parameters
| Name | In | Description |
|---|---|---|
asset_id (required) | path | The picture’s id. |
Answers
| Status | Body | Meaning |
|---|---|---|
| 302 | none | A redirect |
| 404 | problem | Not found, or the part is switched off. |
| 429 | problem | Too many requests: wait for Retry-After. |
List the public collections
Section titled “List the public collections”GET /public/v1/help/collections
Only articles marked public and meant for everyone. Name the app with the X-CRM-App-Key header, or with ?app= where a header cannot be sent.
Needs: the app key (X-CRM-App-Key, or ?app=). No sign-in.
Parameters
| Name | In | Description |
|---|---|---|
app | query | The app’s public key, for a request that cannot send the X-CRM-App-Key header. |
lang | query | A language to read in (a BCP 47 tag), instead of the user’s own. |
Answers
| Status | Body | Meaning |
|---|---|---|
| 200 | Collections | OK |
| 404 | problem | Not found, or the part is switched off. |
| 429 | problem | Too many requests: wait for Retry-After. |
Read a public collection
Section titled “Read a public collection”GET /public/v1/help/collections/{slug}
Needs: the app key (X-CRM-App-Key, or ?app=). No sign-in.
Parameters
| Name | In | Description |
|---|---|---|
slug (required) | path | The article’s or collection’s slug. |
app | query | The app’s public key, for a request that cannot send the X-CRM-App-Key header. |
lang | query | A language to read in (a BCP 47 tag), instead of the user’s own. |
Answers
| Status | Body | Meaning |
|---|---|---|
| 200 | CollectionArticles | OK |
| 404 | problem | Not found, or the part is switched off. |
| 429 | problem | Too many requests: wait for Retry-After. |
Find the app whose help center is at a domain
Section titled “Find the app whose help center is at a domain”GET /public/v1/help/hosts/{host}
The app’s public face, as Read an app’s public face answers it, for a page asked for at a help center’s own domain (help_host).
Needs: nothing: no credential.
Parameters
| Name | In | Description |
|---|---|---|
host (required) | path |
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. |
Read a help center request’s link
Section titled “Read a help center request’s link”GET /public/v1/help/requests/{token}
What the page of the link emailed for a help center request shows: the app’s brand, the address masked, and whether it was opened. Reading it opens nothing. 404 for a link that is not ours; 410 for one not opened within a day.
Needs: nothing: no credential.
Parameters
| Name | In | Description |
|---|---|---|
token (required) | path | The signed token from the email’s link. |
Answers
| Status | Body | Meaning |
|---|---|---|
| 200 | HelpRequestPage | OK |
| 404 | problem | Not found, or the part is switched off. |
| 410 | problem | Refused |
| 429 | problem | Too many requests: wait for Retry-After. |
Confirm a help center request
Section titled “Confirm a help center request”POST /public/v1/help/requests/{token}
The link’s page’s button: opens the request’s ticket, once; pressed again it answers as before and opens nothing more. 404 for a link that is not ours, or a request the help center no longer takes; 410 for one not opened within a day.
Needs: nothing: no credential.
Parameters
| Name | In | Description |
|---|---|---|
token (required) | path | The signed token from the email’s link. |
Answers
| Status | Body | Meaning |
|---|---|---|
| 200 | HelpRequestPage | OK |
| 404 | problem | Not found, or the part is switched off. |
| 410 | problem | Refused |
| 429 | problem | Too many requests: wait for Retry-After. |
List the kinds of request the help center takes
Section titled “List the kinds of request the help center takes”GET /public/v1/help/ticket-forms
The ticket types the app’s staff open from its public help center, with the fields a guest sees. Empty while none is; 404 while the help center or the messenger is off.
Needs: the app key (X-CRM-App-Key, or ?app=). No sign-in.
Parameters
| Name | In | Description |
|---|---|---|
app | query | The app’s public key, for a request that cannot send the X-CRM-App-Key header. |
Answers
| Status | Body | Meaning |
|---|---|---|
| 200 | TicketForms | OK |
| 404 | problem | Not found, or the part is switched off. |
| 429 | problem | Too many requests: wait for Retry-After. |
Send a request from the help center
Section titled “Send a request from the help center”POST /public/v1/help/tickets
From a reader with no account, who gives the email address the reply goes to. The answer is 202 whatever the address is, and nothing is opened yet: the address is emailed a link, in PurrCRM’s own words, which opens the ticket as the app’s contact with that address (a new one when there is none). A type the help center does not take is 404; past the reader’s or the app’s budget, 429.
Needs: the app key (X-CRM-App-Key, or ?app=). No sign-in.
Parameters
| Name | In | Description |
|---|---|---|
app | query | The app’s public key, for a request that cannot send the X-CRM-App-Key header. |
Body (application/json): PublicTicketBody
| Field | Type | Description |
|---|---|---|
email (always) | string | |
name | string | |
ticket (always) | NewTicketBody |
Answers