Set Conversational Component

Request Parameters

KeyDescriptionValueData TypeRequired/OptionalConstraints
AuthorizationAccess Token for the application{{PARTNER_APP_TOKEN}}StringRequiredShould be a valid Partner App Access Token
APP IDappId of the accountbf9ee64c-3d4d-4ac4-xxxx-732e577007c4StringRequiredShould be a valid appId
enable_welcome_messageset to true to receive request_welcome eventsTrue/FalseBooleanRequiredShould be true/false
commandsconfigure the various commands for your appsList of ObjectsListRequiredYou can define up to 30 commands. Each command has a maximum of 32 characters, and each hint has a maximum of 256 characters. Emojis are not supported.
promptsconfigure the ice breakers for your appsList of StringListRequiredYou can set up 4 ice breakers, each with a maximum of 80 characters. Emojis are not supported.

Sample Request

curl --location --request POST 'https://partner.gupshup.io/partner/app/{{APP_ID}}/conversational/component' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "enable_welcome_message": true,
    "commands": [
        {
            "command_name": "tickets",
            "command_description": "Book flight tickets"
        },
        {
            "command_name": "hotel",
            "command_description": "Book hotel"
        }
    ],
    "prompts": [
        "Book a flight",
        "plan a vacation"
    ]
}'

Sample Response

{
    "status": "success",
    "success": true
}

Status Codes

Status CodeResponseComments
Success
200{ "status": "success", "success": true }
Error
401{ "message": "Authentication Failed", "status": "error" }When API authentication fails
400{ "error": { "code": 105, "fbtrace_id": "AuzfcgaHAKSQQv2yL1T_Tyf", "message": "(#105) The parameter prompts must have at most 4 elements, 5 found.", "type": "OAuthException" }, "status": "error" }more than 4 ice-breakers added
400{ "error": { "code": 100, "fbtrace_id": "AP4UAoO-eaN9WVCOlGjuaM7", "message": "(#100) Param commands[8]['command_name'] must be at most 32 characters long.", "type": "OAuthException" }, "status": "error" }command name is more than 32 characters
Language
Click Try It! to start a request and see the response here!