Make a Suggestion

Overview

This API allows eGain users, authenticated customers and anonymous customers to create an article suggestion in the context of a knowledge portal.

For this API to execute successfully:

  • The setting "Make a Suggestion" must be enabled for the portal specified in the URL.
  • If the user is a customer, the setting “Allow customer access” must be enabled for the portal.

Request Body

For this API to work successfully following attributes must be provided in the request body

  • name
  • content
SecurityoAuthUser or oAuthCustomer or oAuthAnonymousCustomer
Request
path Parameters
portalID
required
number
Example: 202200000001001
query Parameters
$lang
required
string

The knowledge base language used for retrieving response. Must be a language accessible to user. If this parameter is not passed, default language of the system is used.

Enum: "en-US" "en-GB" "fr-FR" "es-ES" "it-IT" "de-DE" "nl-NL" "pt-BR" "pt-PT" "da-DK" "sv-SE" "ru-RU" "fr-CA" "zh-CN" "ja-JP" "ko-KR"
Example: $lang=en-US
header Parameters
Content-Type
required
string
Default: application/json

Media type sent by the client.

Enum: "application/json" "application/xml" "application/x-www-form-urlencoded" "multipart/form-data" "text/plain"
Accept-Language
required
string
Default: en-US

Language locale accepted by client (used for locale specific fields in resource representation and in error responses).

Enum: "en-US" "es-ES" "fr-FR" "it-IT" "de-DE" "nl-NL" "pt-BR" "pt-PT" "da-DK" "ru-RU" "fr-CA" "zh-CN" "ja-JP" "ko-KR" "sv-SE"
X-egain-tenant-id
string

Unique identifier for tenant.

X-egain-activity-id
integer

Numeric unique identifier of interaction from eGain.

X-interaction-id
string

Unique identifier for interaction from other CRM applications.

Request Body schema: application/json
id
number

ID of the suggestion.

alternateId
string

Readable Id of the suggestion.

object (Link)

Link to this suggestion.

name
string

Name of the suggestion.

description
string

Description of the suggestion.

content
string

Content of the suggestion.

object (Article)

Related articles for the suggestion.

object (L10NString)

Status of the suggestion.

  • 1 : suggested.
  • 2 : pending
  • 3 : declined
  • 4 : approved
  • object (DateAndUser)

    Last modified date of the suggestion.

    object (Attachments)

    Details of attachments

    object (Comments)

    Details of comments

    object (Language)

    KB language in which suggestion is created.

    object (customAttributes)

    Custom attributes of the activity.

    Responses
    201

    Created

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    404

    Not Found

    406

    Not acceptable

    500

    Internal server error

    post/portals/{portalID}/suggestions
    Request samples
    application/json
    {
    • "attachments": {
      },
    • "content": "Sample Content",
    • "description": "Sample Description",
    • "name": "Sample Suggestion",
    • "relatedArticle": {
      },
    • "customAttributes": {
      }
    }
    Response samples
    application/json

    Required query parameter is missing

    {
    • "code": "400-112",
    • "developerMessage": "Required query parameter(s) is missing. The following parameters are required: <param name>"
    }