Skip to main content

Helpshift APIs

  • /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.

ParameterRequiredNotes
app_idYesThe App Publish ID for the app with web chat enabled. 
formatNoOutput format for the QR code. Supported formats are (case sensitive) - 
  • png - a PNG image, encoded as a base64 encoded Data URL
  • svg - SVG encoded vector image
If nothing is passed; the default will be png
expiryNoA JSON encoded map -
{"time": <time based expiry value>,
"viewcount": integer}

Time based expiry value can be either -

  • A Unix timestamp specifying exact time (in the future) when the link expires. e.g. 1640422800000 - "2021-12-25T09:00:00.000 +0000"

  • A string containing a number followed by a suffix, one of

    • m - minutes
    • h - hours
    • d - days This is an easier way to specify expiry relative to current time. (e.g. 2m = 2 minutes, 6h = 6 hours).

    If not provided, the default expiry is 24 hours. View count based expiry value is a simple integer (max 32767). The shortlink will expire after it has been clicked/viewed this many times. If not provided, the shortlink will not expire based on number of views (basically, unlimited views).

    Examples

    {"time": 1640422800000} ;; time based expiry only
    {"viewcount": 10} ;; viewcount based expiry
    {"time": "2h",
    "viewcount": 10} ;; both time and viewcount based expiry
uidAt 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
emailUser's Email
phone_numberUser's Phone Number (must be a valid phone number in E.164 format e.g. +919876543210)
user_auth_tokenNo
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.
nameNoUser's Full Name
languageNoIssue language Provide a value to override the language used on user's browser.
first_user_messageNoThe message to be used/auto-send on user's behalf when creating the webchat issue. Maximum 500 characters.
custom_fieldsNoJSON encoded map of custom issue fields. e.g.
{ "age": 23, "paiduser": false }

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.

tagsNoJSON encoded string of tags to be added to the issue automatically. Invalid/archived tags will be dropped silently.
help_sectionNoOptional 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_faqNoOptional 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_termNoOptional 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_filterNoA JSON Object having the following format -
{"tags": ["tag1", "tag2"], "operator": "or"}
  • tags - A JSON array of strings, and at least one tag must be specified.

  • operator - This value should be any of the following: and, or, not.

This specifies the functionality for segmenting FAQs based on tags.


Example value for help_faq_filter:
{"tags": ["tier1", "tier2"], "operator": "and"}

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.
intentNoOptional 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_widgetNoWhether to automatically open the webchat widget when the helpcenter page loads. Valid values -
  • open - Webchat widget will be opened automatically
  • minimize - Webchat widget will be visible, but not opened automatically.
  • hide - Webchat widget will be hidden (even if enabled on the help center page).
includesNo

What extra information should be included in the response. A JSON array of strings. Valid values -

  • unread_messages - if the user has any active conversations, the API response will
    contain the issue ID and number of unread messages.
initiate_chatNoWhether to start a new chat when the previous issue is resolved. Valid values -
  • true: A new chat will be started automatically when the previous issue is resolved and without needing any user action like clicking the New Conversation button or going through the post resolution flow like feedback bot for the previously resolved issue.
  • false: A new chat will not be automatically started.

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
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUoAAAFKCAIAAAD0S4FSAAAGQElEQVR42u
3aQUIDMQwEwf3/p8MfIKxmpOp7IFgqc/HzkbS0xxFIeEvCWxLekvCWhLckvCW8JeEtCW9JeEvCWxLeEt
6S8JaEtyS8JeEtCW8Jb0l4S8JbEt6S8JaEtyS8Jbwl4S0Jb0l4S8JbEt4S3pLwloS3JLwl4S0JbwlvSX
h/5xeva+o0/vKTp76V3cAbb7ztBt5444033njjjTfeeOONtxHijTfeRoi33cAbb7ztBt5444033njjjX
cW709kmVSmmNmN/O+MN954422EeOONtxHibTfwxhtvu4E33njjjTfeeNtnvPHGG2+88cYbbyPE227gPU
8l84FnI7PMa6VxN/DGG2+88cYbb7zxxhtvvPHGG2+8jRBvvPHGG2+7gTfeeOONN95444033njjjfeV75
y50HjjjTfeeOONN95444033njjjTfeeBsh3nYDb7zxxhtvvPHGG2+88cYbb7zxxhvvyRE+QzVeHHjjjT
feeOONN95444033ngbId54422EeNsNvPHGG2+88cYbb7zxxhtvvPHGG++m42jkvW/d7QbeeONtN/DGG2
+8HQfeeOONN954422EeOONtxHibTfwxhtvu4E33njbZ7zxxhvvt4+jscx13/fZfbuBN94+izfeeOONN9
5444033njjjTfeiOKNN94+azfwxttn8cYbb7zxxhtvvPFW1nX2f5C0fOscAd7CW3gLb+EtvPHGW3jjjb
fwxhtv4Y238Bbewlt4C+/qpZx6aLnvO2eeRuOzU7zxxhtvvPHGG2+88cYbb7zxxhtvvPHGG2+88cYbb7
zxxhtvvPHGG2+88cZ7ntk1SFOnMbXujWeFN95444033njjjTfeeOONN95444033njjjTfeeOONN95444
033njjjTfeeM/zbly7zIV2yeZfwXjjjTfeeOONN95444033njjjTfeeOONN95444033njjjTfeeOONN9
544413Ou/Ga2XfYjU+d22cL95444033njjjTfeeOONN95444033njjjTfeeOONN95444033njjjTfeeO
M9X+Oj1H1du87wxhtvvPHGG2+88cYbb7zxxhtvvPHGG2+88cYbb7zxxhtvvPHGG2+88cYb7828940/k0
rmNZp5fTcCxhtvvPHGG2+88cYbb7zxxhtvvPHGG2+88cYbb7zxxhtvvPHGG2+88cYbb7xh+P6VNPXsNP
NB67XTwBtvvPHGG2+88cYbb7zxxhtvvPHGG2+88cbbQjsNvPHGG2+88cYbb7zxxhvved5Tn732F02t+7
6fjDfeeOONN95444033njjjTfeeOONN95444033njjjTfeeOONN95444033nh3855aSouVcM7XThJvvP
HGG2+88cYbb7zxxhtvvPHGG2+88cYbb7zxxhtvvPHGG2+88cYbb7zx1tvX2bUHno3/NvDGG2+88cYbb7
zxxhtvvPHGG2+8hTfeeAtvvPEW3njjjTfeeOONN954p/N+1tWI/9p1du1awRtvvPHGG2+88cYbb7zxxh
tvvPHGG2+88cYbb7zxxhtvvPHGG2+88cYbb7zTj2Pf6niU+s4VjDfeeOONN95444033njjjTfeeOONN9
5444033njjjTfeeOONN95444033nhv5j31sLRxdTLPOfPhcOaDZbzxxhtvvPHGG2+88cYbb7zxxhtvvP
HGG2+88cYbb7zxxhtvvPHGG2+88cYb77d5N87o2mngjTfeeOONN95444033njjjTfeeOONN95444033n
jjjTfeeOONN95444033ng38c78exsRThHFG2+88cYbb7zxxhtvvPHGG2+88cYbb7zxxhtvvPHGG2+88c
Ybb7zxxhtvvDfzvvadGwFPQfKQFm+88cYbb7zxxhtvvPHGG2+88cYbb7zxxhtvvPHGG2+88cYbb7zxxh
tvvPH+/pAyqxw/hKuf6OKNN95444033njjjTfeeOONN95444033njjjTfeeOONN95444033njjjTfekv
CWhLckvCW8JeEtCW9JeEvCWxLeEt6S8JaEtyS8JeEtCW9JeEt4S8JbEt6S8JaEtyS8Jbwl4S0Jb0l4S8
JbEt4S3pLwloS3JLwl4S0Jb0l4S3hLwlsS3pLwlvTLfgBg2rHiuzgrwQAAAABJRU5ErkJggg==
QR Code in one of the formats described above.
active_issueWhen there is an open issue for the end user -
{ "issue_id": 78, "unread_messages": 2 }

When there are no open issues for the end user -

nil
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

parametersRequiredNotes
app_idYesThe App Publish ID for the app with web chat enabled.
uidAt least one of these fields is required to identify an end user.User ID
emailUser's Email
phone_numberUser's Phone Number

The API will return a status code of 200 for successful response, 400 for invalid requests.

Field NameSample Value
active_issueWhen there is an open issue for the end user -
{ "issue_id": 78, "unread_messages": 2 }

When there are no open issues for the end user -

nil