Skip to main content
PATCH
Change a verified question: only the fields sent …

Authorizations

apiKey
string
query
required

apiKey MUST be supplied within the request body instead of query

Path Parameters

projectId
string<uuid>
required

The project the workspace belongs to.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
workspaceId
string<uuid>
required

The workspace.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
verifiedQuestionId
string<uuid>
required

The verified question's id (its key, stable across versions).

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$

Body

application/json

PATCH /v2/api/projects/:projectId/workspaces/:workspaceId/verified-questions/:verifiedQuestionId Request body

apiKey
string

Upsolve API key, generated under Account → Developer settings in the Upsolve Hub. Keys are user-scoped: pass organizationId alongside the key to select which org to act on.

Minimum string length: 1
Example:

"up_embed_************"

organizationId
string<uuid>

Your Upsolve organization's UUID — the org that owns the API key and project. This is NOT a project organization: do not pass a value registered via /projects/register-organization, and do not pass an externalId (only projectOrganizationId accepts those). Omit it when using an org-bound API key — the org is read from the key and any value sent here is ignored. Required only for user-scoped API keys (created under Account → Developer settings) and for the Supabase JWT path, where the org is ambiguous and membership is verified against it.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
Example:

"123e4567-e89b-12d3-a456-426614174000"

question
string

The question the agent is asked.

Required string length: 1 - 4000
sql_query
string

The reference SQL that verifiably answers the question. Must be a single read-only query.

Required string length: 1 - 100000
chart_definition
string

The reference chart config, as JSON text. Presence makes it a chart question.

useAsAgentContext
boolean

Use as agent context: whether the agent sees this question and its answer as a worked example. Off means it is used only by tests. On create, omitted means off. On update, omitted leaves it unchanged. Takes effect on the draft; production follows on publish.

useAsExampleQuestion
boolean

Use as example question: offer this question as a starter question when a person opens a new chat with nothing personal to suggest (at most three, oldest first). On create, omitted means off. On update, omitted leaves it unchanged. Saved on the question's version, so production follows on publish.

dataPreview
any[]

Sampled rows stored alongside the SQL, for the chart preview.

lockVersion
integer

The question's lockVersion as you last read it. Sent, a write is refused with 412 LOCK_VERSION_CONFLICT when the question changed since; omitted, the write applies to whatever the draft holds now.

Required range: 0 <= x <= 9007199254740991

Response

PATCH /v2/api/projects/:projectId/workspaces/:workspaceId/verified-questions/:verifiedQuestionId Positive response

status
string
required
Allowed value: "success"
data
object
required