Skip to content

Update Assessment

PATCH
/webchat/assessments/{assessment_id}

Partial edit of an assessment.

active: false takes it out of the widget without deleting it, which is the reversible way to retire one.

The concurrency field is revision here, not expected_revision. That is the app’s spelling on this model alone and is mirrored deliberately - a tidier name would be a field the handler does not read, silently switching the check off.

Authorizations

Parameters

Path Parameters

assessment_id
required

Assessment id.

string

Assessment id.

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Partial edit of an assessment.

revision is this model’s optimistic-concurrency field. Note it is spelled revision here and expected_revision on every other webchat model - that is the app’s own inconsistency, and it is mirrored rather than tidied, because renaming it would send the app a field it does not read and the concurrency check would silently stop happening.

object
active
Any of:
boolean
definition
Any of:

Complete branching graph stored as JSONB in chat_assessments.definition.

object
results
Array<object>

A terminal result node — shown when the visitor’s path leads here.

object
body
string
"" <= 2000 characters
booking_enabled
boolean
handoff_enabled
boolean
id
required
string
>= 1 characters <= 64 characters
links
Array<object>
object
label
required
string
>= 1 characters <= 200 characters
url
required
string
>= 1 characters <= 2048 characters
title
required
string
>= 1 characters <= 200 characters
start_step_id
required
string
>= 1 characters <= 64 characters
steps
Array<object>

One question-and-answers step in the assessment flow.

object
allow_free_text
boolean
answers
Array<object>

A single selectable answer within an assessment step.

object
id
required
string
>= 1 characters <= 64 characters
next_step_id
Any of:
string
<= 64 characters
result_id
Any of:
string
<= 64 characters
text
required
string
>= 1 characters <= 500 characters
id
required
string
>= 1 characters <= 64 characters
question
required
string
>= 1 characters <= 2000 characters
description
Any of:
string
<= 2000 characters
name
Any of:
string
>= 1 characters <= 200 characters
revision
Any of:
integer
surface
Any of:
string
Allowed values: external internal

Responses

200

Successful Response

object
data
required

An open envelope for one webchat object.

Open because the widget’s config grows a field per product decision and a pinned schema would DROP it. Same choice the desk surface made.

object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string