Partially update a saved query. Only include the fields you want to change.
Bearer token obtained from the authenticate endpoint.
Unique identifier of the saved query to update.
New display title for the query.
New natural language query text.
New raw SQL to associate with the query.
Response
Returns the updated saved query object.
Unique identifier for the query.
Organization the query belongs to.
Updated natural language query text.
Member ID of the user who made this update.
ISO 8601 timestamp of this update.
curl -X PATCH https://api.trellis.sh/v1/queries/sq_002 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Top 20 Customers",
"query": "Who are our top 20 customers by total spend?"
}'
{
"id": "sq_002",
"organization_id": "org_abc123",
"title": "Top 20 Customers",
"query": "Who are our top 20 customers by total spend?",
"sql": null,
"last_updated_by": "member_xyz789",
"created_at": "2025-01-11T10:00:00Z",
"updated_at": "2025-01-11T11:00:00Z"
}