Skip to main content
PATCH
/
v1
/
chatbots
/
chatbot
/
{chatbotId}
/
follow-up-prompts
/
{followUpPromptId}
Update Follow-Up Prompt
curl --request PATCH \
  --url https://interhemispheric-unwet-paulene.ngrok-free.dev/api/v1/chatbots/chatbot/{chatbotId}/follow-up-prompts/{followUpPromptId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "buttonTitle": "<string>",
  "buttonMessage": "<string>",
  "linkText": "<string>",
  "linkSrc": "<string>",
  "esclate": false
}
'
{
  "success": true,
  "message": "Follow-up prompt updated successfully",
  "data": {
    "id": "<string>",
    "chatbotId": "<string>",
    "rank": 123,
    "esclate": true,
    "buttonTitle": "<string>",
    "buttonMessage": "<string>",
    "linkText": "<string>",
    "linkSrc": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}
The followUpPromptId is passed as a path parameter (not in the request body). Provide exactly one of the following combinations to update the prompt type:
TypeRequired Fields
ButtonbuttonTitle + buttonMessage
LinklinkText + linkSrc
Rules:
  • Providing fields from both types returns 400 Cannot provide both button fields and link fields.
  • Providing neither type returns 400 Must provide either (buttonTitle + buttonMessage) or (linkText + linkSrc).
  • Providing only one field from a pair returns 400 as well.
  • Switching type (e.g. button → link) is supported — the opposing fields are automatically cleared.
  • Returns 404 if the follow-up prompt ID does not exist.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

chatbotId
string
required
followUpPromptId
string
required

Body

application/json

Provide either (buttonTitle + buttonMessage) or (linkText + linkSrc) — not both.

buttonTitle
string
buttonMessage
string
esclate
boolean
default:false

Set to true to mark this as a human escalation trigger

Response

Updated

success
boolean
Example:

true

message
string
Example:

"Follow-up prompt updated successfully"

data
object