Skip to main content
POST
/
v1
/
chatbots
/
chatbot
/
{chatbotId}
/
instructions
/
select-instruction
Select Instruction
curl --request POST \
  --url https://interhemispheric-unwet-paulene.ngrok-free.dev/api/v1/chatbots/chatbot/{chatbotId}/instructions/select-instruction \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "instructionId": "abc-uuid"
}
'
{
  "success": true,
  "message": "Instruction found and set as active",
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "chatbotId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "title": "Customer Support",
    "instruction": "You are a helpful customer support agent...",
    "deletable": false,
    "isActive": false,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

chatbotId
string
required
Example:

"361628903185318481"

Body

application/json
instructionId
string

ID of an existing instruction to activate. If provided, title/instruction are ignored for lookup.

title
string

Title of an existing instruction to find by name, or the title for a new instruction if none is found.

instruction
string

Required only when creating a new instruction (i.e. no match found by instructionId or title).

Response

Existing instruction activated

success
boolean
Example:

true

message
string
Example:

"Instruction found and set as active"

data
object