Update Session
Update a session's state, chat mode, or segment.
Update a conversation session's state, chat mode, or segment. Only the allowed fields can be updated — any extra fields will be rejected.
Required: Owner, Editor, or Operator role
Authorization
bearerToken
AuthorizationBearer <token>
API token for YourGPT Public APIs. Create tokens in Settings > API Tokens in your YourGPT dashboard.
In: header
Request Body
application/x-www-form-urlencoded
project_uid*string
The project unique identifier
session_uid*number
The session UID to update
state?string
Update session state
Value in
"resolved" | "pending" | "unresolved" | "closed"chat_mode?string
Update chat mode. bot = AI handles, awaiting = waiting for operator, operator = human takeover
Value in
"bot" | "awaiting" | "operator"segment?string
Update session segment label
Length
length <= 255Response Body
application/json
curl -X POST "https://api.yourgpt.ai/chatbot/v1/updateSession" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d 'project_uid=string'{
"type": "RXSUCCESS",
"message": "Session updated successfully",
"data": {
"session_uid": 0,
"id": 0,
"project_id": 0,
"state": "string",
"chat_mode": "string",
"segment": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
}About chat_mode
| Value | Meaning |
|---|---|
bot | AI handles the conversation |
awaiting | Waiting for a human operator |
operator | Human operator has taken over |
About state
| Value | Meaning |
|---|---|
pending | Active conversation |
resolved | Resolved (auto-transfers to bot mode) |
unresolved | Marked as unresolved |
closed | Closed conversation |
Setting state to resolved automatically transfers the session to bot mode. You cannot set chat_mode and state: resolved in the same request.