Helpshift APIs
Generate Support Experience Link and QR Code
- /console/qrcode: This is the main API that is used to generate the support link and the QR code. When the API is called, the response will be a shortlink URL that launches to web chat directly as well as a PNG or SVG that can be used for the QR code (more information in the API information below). It is used as follows by passing the necessary parameters.
POST /v1/<domain>/console/qrcode
<domain> needs to be replaced by your helpshift domain name.
Parameter | Required | Notes |
---|---|---|
app_id | Yes | The App Publish ID for the app with web chat enabled. |
format | No | Output format for the QR code. Supported formats are (case sensitive) -
|
expiry | No | A JSON encoded map -
Time based expiry value can be either -
|
uid | At least one of these fields is required to identify an end user. If nothing is provided then the webchat session will be considered anonymous. | User ID |
User's Email | ||
phone_number | User's Phone Number (must be a valid phone number in E.164 format e.g. +919876543210) | |
user_auth_token | No | If Identity Verification is enabled and the token is not provided or invalid, the QR code will be generated and returned, but the webchat will not start. |
name | No | User's Full Name |
language | No | Issue language Provide a value to override the language used on user's browser. |
first_user_message | No | The message to be used/auto-send on user's behalf when creating the webchat issue. Maximum 500 characters. |
custom_fields | No | JSON encoded map of custom issue fields. e.g.
The values should match the type of the CIF. To set a CIF of type date, the value must be a valid date in ISO 8601 format. CIFs will be validated when creating the shortlink, and any invalid CIFs will be dropped. |
tags | No | JSON encoded string of tags to be added to the issue automatically. Invalid/archived tags will be dropped silently. |
help_section | No | Optional Section publish ID to indicate what Section ID to display from help center. If provided, the help center will show the help section indicated. |
help_faq | No | Optional FAQ publish ID to indicate if a help article should be displayed. If provided, the help center will show the help article indicated. Note: If both help_section and help_faq are provided, help_faq will take precedence. |
help_search_term | No | Optional parameter to provide a search text when starting the help center. This will allow developers to pass in specific search keys (such as an error code) without knowing before-hand what specific help_article to display. When used the Help center will perform a search and show results from the search. |
help_faq_filter | No | A JSON Object having the following format -
This specifies the functionality for segmenting FAQs based on tags. Example value for help_faq_filter:
In this example, the page will only display FAQs associated with both tier1 and tier2. If no FAQs meet the specified criteria, none will be shown on the page. The help_faq_filter can be provided with help_section, help_faq, help_search_term. In this case, the respective page will open with FAQs matching the specified criteria of help_faq_filter. |
intent | No | Optional parameter to start a conversation with a specific intent (based on text) from a smart intent tree. This allows developers to create flows that automatically start common experiences Currently not implemented. |
webchat_widget | No | Whether to automatically open the webchat widget when the helpcenter page loads. Valid values -
|
includes | No | What extra information should be included in the response. A JSON array of strings. Valid values -
|
initiate_chat | No | Whether to start a new chat when the previous issue is resolved. Valid values -
|
The API will return a status code of 201 for successful response, 400 for invalid requests. The response will have the following:
Field Name | Sample Value | Description |
---|---|---|
url | <patented support experience link> | The shortlink contained in the QR code. |
qrcode |
| QR Code in one of the formats described above. |
active_issue | When there is an open issue for the end user -
When there are no open issues for the end user -
| Only if requested by specifying - includes: ["unread_messages"] in the request parameters. |
Get unread messages
- /console/messages/unread: This is an optional supporting API that is used to determine if there are any unread messages. This is used so that the application or game can display a notice if there are waiting unread messages support messages.
GET /v1/<domain>/console/messages/unread
parameters | Required | Notes |
---|---|---|
app_id | Yes | The App Publish ID for the app with web chat enabled. |
uid | At least one of these fields is required to identify an end user. | User ID |
User's Email | ||
phone_number | User's Phone Number |
The API will return a status code of 200 for successful response, 400 for invalid requests.
Field Name | Sample Value |
---|---|
active_issue | When there is an open issue for the end user -
When there are no open issues for the end user -
|