Skip to main content

FAQ

Fetch all data related to ImBox FAQ

WidgetId

Your Widget ID(s) are provided by ImBox Support, please contact us at hello@imbox.se to retrieve yours.

Category ID & Article ID

Your Category IDs and Article IDs can be retrieved from your ImBox Admin page.

article_ids are found under FAQ > Articles in the URL of the article: Example of where article_ids can be found category_ids are found under FAQ > Categories in the row of the specific category: Example of where article_ids can be found

faqStatistics

Lists all article views and votes within a given timespan (up to 12 months)

Parameters

NameTypeDescription
apiKey*StringYour API key
userId*StringYour userId
startTime*StringFormat: YYYY-MM-DD
endTime*StringFormat: YYYY-MM-DD
sourceStringfaq OR helpcenter

Usage

curl -X GET "https://apiv2.imbox.io/api/faqStatistics/apiKey/userId?startTime=2020-01-01&endTime=2020-02-01"

Response

{
"result": "success",
"json": [
{
"action": "view",
"article": 1,
"channel": "V1",
"device": "desktop",
"page": "http://example.org/",
"timestamp": "2020-01-01T00:00:00.000Z"
},
{
"action": "voteNo",
"article": 1,
"channel": "V2",
"device": "mobile",
"page": "http://example.org/another-page",
"timestamp": "2020-01-01T00:00:00.000Z"
}
],
"length": 2
}

Get Articles by category

Fetch all articles by category_id

Parameters

NameTypeDescription
widget_id*IntegerYour ImBox id (_sid)
category_id*IntegerId of category to fetch

Usage

curl -X GET "https://apiv2.imbox.io/api/faq/<widget_id>/categories/<category_id>/articles "

Response

[
{
"id": 50127,
"sid": 1,
"qSub": "Konsulttimmar - Prislista 💰",
"cat": 6123,
"ranking": 0,
"status": "published",
"memberCount": 9
},
{
"id": 41573,
"sid": 1,
"qSub": "Presentationsmallar",
"cat": 6123,
"ranking": 0,
"status": "published",
"memberCount": 0
}
]

Get Articles by id

Fetch article by article_id

Parameters

NameTypeDescription
widget_id*IntegerYour ImBox id (_sid)
article_id*IntegerId of article to fetch

Usage

curl -X GET "https://apiv2.imbox.io/api/faq/<widget_id>/articles/<article_id>/view"

Response

{
"id": 60441,
"sid": 1,
"qSub": "Klientstatistik",
"qBod": "<p>Statistiksida f&ouml;r hur kunderna anv&auml;nder klienten.<br /><a href=\"https://client-stats-internal.imbox.io/\" target=\"_blank\" rel=\"noopener\">https://client-stats-internal.imbox.io/</a></p>",
"ac": "0",
"status": "published",
"qTags": ["stats", "statistik", "klient"],
"help": "1",
"helpText": "Fick du svar på din fråga?",
"helpYes": "Ja",
"helpNo": "Nej",
"wasHelpfulEmailForm": 0,
"wasHelpfulPhoneForm": 0,
"wasHelpfulChatForm": 0,
"ranking": 0,
"qCatId": 6122,
"qCat": "Teknisk kundsupport",
"agentName": null,
"agentPicture": null,
"department": null,
"visitorName": null,
"contactEmailBody": null,
"contactEmailSubject": null,
"contactEmailId": null,
"contactPhoneBody": null,
"contactPhoneSubject": null,
"contactChatBody": null,
"contactChatSubject": null,
"routeToGroup": null,
"comments": []
}

Fetch popular articles for widget_id

Parameters

NameTypeDescription
widget_id*IntegerYour ImBox id (_sid)

Usage

curl -X GET "https://apiv2.imbox.io/api/faq/<widget_id>/popular-articles"

Response

{
"0": {
"id": 31535,
"sid": 1,
"qSub": "Hur kan de olika API:erna användas? ",
"cat": 6122,
"ranking": 100,
"status": "published",
"memberCount": 3
},
"1": {
"id": 58180,
"sid": 1,
"qSub": "CSM Board: Hur använder vi korten i Boarden?",
"cat": 0,
"ranking": 0,
"status": "published",
"memberCount": 28
}
}

Search Inside Article

Searches your articles for a specific string.

Parameters

NameTypeDescription
widget_id*IntegerYour ImBox id (_sid)
search_string*StringText to search for
Query string: CallbackStringcan specify what you prefer here

Usage

curl -X GET "https://apiv2.imbox.io/message/searchq/<widget_id>/<search_string>/?callback=cb"

Response

{
"result": "success",
"json": [
{
"_index": "faq-sv-v3",
"_type": "_doc",
"_id": "58180",
"_score": 124.763885,
"_source": {
"article_id": 58180,
"category_name": null,
"category_id": null,
"user_id": 1,
"content_text": "Skapa en kontakt för kunden om det inte finns.\n1. NOTERING - Det som rör själva uppsättningen",
"id": 58180,
"title": "CSM Board: Hur använder vi korten i Boarden?",
"publish_at": null,
"tags": [],
"status": "published",
"unpublish_at": null
},
"highlight": {
"title": [
"CSM <em>Board</em>: Hur använder vi korten i <em>Boarden</em>?"
]
}
}
]
}

Search suggestions

Search suggestions for widget_id

Parameters

NameTypeDescription
widget_id*IntegerYour ImBox id (_sid)
search_string*StringText to search for
Query string: CallbackStringcan specify what you prefer here

Usage

curl -X GET "https://apiv2.imbox.io/message/search/<widget_id>/<search_string>?callback=cb"

Response

{
"docsuggest": [
{
"text": "board",
"options": [
{
"text": "CSM Board: Hur använder vi korten i Boarden?",
"payload": {
"id": 58180
}
}
]
}
]
}