Bearer token obtained from the authenticate endpoint.
Unique identifier of the saved query to retrieve.
Response
Unique identifier for the saved query.
Organization the query belongs to.
Display title for the query.
The natural language query text.
Optional raw SQL associated with the query.
Member ID of the user who last modified this query.
Display name of the user who last modified this query.
ISO 8601 timestamp when the query was created.
ISO 8601 timestamp when the query was last modified.
curl -X GET https://api.trellis.sh/v1/queries/sq_001 \
-H "Authorization: Bearer YOUR_TOKEN"
{
"id": "sq_001",
"organization_id": "org_abc123",
"title": "Monthly Revenue",
"query": "Show me total revenue by month for 2025",
"sql": "SELECT DATE_TRUNC('month', created_at) as month, SUM(amount) as revenue FROM orders WHERE YEAR(created_at) = 2025 GROUP BY 1",
"last_updated_by": "member_xyz789",
"last_updated_by_name": "John Doe",
"created_at": "2025-11-01T10:00:00Z",
"updated_at": "2025-12-01T15:30:00Z"
}