---
title: "Update a query of a Tulip Table"
slug: "update-a-query-of-a-tulip-table"
updated: 2026-04-02T17:37:08Z
published: 2026-04-02T17:37:27Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.tulip.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a query of a Tulip Table

Put/tables/{tableId}/query/{queryId}

Updates a query in a Tulip Table by the query id

Requires the `table-queries:write` API key scope.

SecurityHTTPType basic

Access to the Tulip API requires the use of [HTTP Basic Authentication](https://datatracker.ietf.org/doc/html/rfc7617) using the credentials of an active [Tulip API Token](https://support.tulip.co/docs/set-up-a-tulip-api). All requests require the `Authorization` HTTP header with the `Basic` scheme to provide API credentials unless otherwise noted.

API tokens can be configured with a set of *scopes* which determine what parts of the API that specific token has access to. Security best practices dictate that API credentials be given the minimum set of capabilities required to fulfill their intended purpose. For example, an API token created for use in an integration that is only designed to use the Tables API should probably only be given the `tables:read` and `tables:write` scopes. In this way you can minimize risk in the event that API credentials are compromised. API endpoints will document what API token scopes are required to access that endpoint in their descriptions. If a request is made to an endpoint with an API token which does not have the required scopes, the response will be an authorization error.

Path parameterstableIdstringRequired

The id of a Tulip Table.

Pattern^[a-zA-Z0-9_]+$Exampleg56RCoZCtzv7borvp
queryIdstringRequired

The id of a Tulip Table query.

Pattern^[a-zA-Z0-9_]+$Exampleg56RCoZCtzv7borvp

Body parameters

The updated Tulip Table query. All fields must be set.

<select class='api-response-data' aria-label='Media type'><option value='5e94b353-a4ee-433d-9c6e-25ff726044a5'>application/json</option>
</select>Expand Allobject  tableIdstring    Required

The ID of the Tulip Table that the query is being created on.

labelstring    Required

The display label for the query.

Min length1Max length255
filters Array of object (TulipTableFilter)   

The filters that the query uses.

Max length100object  

The filters can use any of the columns defined in the Tulip Table (including `_createdAt` and `_updatedAt`) that the query exists on with any of the functions.

Example{
  "_id": "abcdefg",
  "field": "Color",
  "functionType": "equal",
  "value": {
    "datasourceType": "static",
    "params": {
      "value": "yellow"
    }
  }
}_idstring    Required
fieldstring    Required
functionTypestring    RequiredValid values[
  "equal",
  "notEqual",
  "blank",
  "notBlank",
  "greaterThanOrEqual",
  "lessThanOrEqual",
  "greaterThan",
  "lessThan",
  "contains",
  "notContains",
  "startsWith",
  "notStartsWith",
  "endsWith",
  "notEndsWith",
  "isIn",
  "notIsIn"
]
valueobject  

The value to compare to.

If `datasourceType` is set to `&quot;app-info&quot;`, then `params` is not required.

If `datasourceType` is set to `&quot;static&quot;`, then `params` is required.

datasourceTypestring    RequiredValid values[
  "static",
  "app-info"
]
paramsobject  value

The static value to compare to. Must be of the same type as the data in the column specified by `field`.

filterAggregatorstring    

The aggregator of all filters defined on the query.

sortOptions Array of object (TulipTableSortOption)   

The sorts that will order the records returned by the query.

Max length100object  

Sorts are used to order the queries based on columns defined in the Tulip Table where the query exists.

Example{
  "sortBy": "Color",
  "sortDir": "asc"
}sortBystring    Required

The field that records should be sorted by in the response. Can be the name of any of the columns of the Table (including `id`) or one of these special values:

- `_sequenceNumber`
- `_createdAt`
- `_updatedAt`

sortDirstring    Required

The direction of the records, either ascending or descending

Valid values[
  "asc",
  "desc"
]Default"asc"

limitnumber    Required

The number of records that the query returns.

Minimum1Maximum1000Default1000.0

Responses200

The Tulip Table query was updated successfully. The details of the updated Table query are returned in the response.

<select class='api-response-data' aria-label='Media type'><option value='9378bdff-c8aa-4b2c-9034-ebff494a6608'>application/json</option>
</select>Expand Allobject  

A Tulip Table query that exists on a Tulip Table. The record object will include all the fields of the query, addition to the record's created timestamp and last updated timestamp.

Example{
  "id": "PRYGkKgnqySMcpWwr",
  "createdAt": "2019-01-15T17:30:01.244Z",
  "createdBy": "N24uug8iXSTWR39rB",
  "updatedAt": "2019-01-15T17:31:20.002Z",
  "updatedBy": "N24uug8iXSTWR39rB",
  "tableId": "b93Aj93KlIoaw",
  "label": "Basic Query",
  "filters": [
    {
      "_id": "aidv93mise9",
      "field": "Color",
      "functionType": "equal",
      "value": {
        "datasourceType": "static",
        "params": {
          "value": "yellow"
        }
      }
    },
    {
      "_id": "jfsa093m9ds",
      "field": "ID",
      "functionType": "notEqual",
      "value": {
        "datasourceType": "static",
        "params": {
          "value": "a"
        }
      }
    }
  ],
  "filterAggregator": "all",
  "sortOptions": [
    {
      "sortBy": "Color",
      "sortDir": "asc"
    }
  ],
  "limit": 1000.0
}_createdAtstring  (date-time)    
_updatedAtstring  (date-time)    
tableIdstring    

The ID of the Tulip Table that the query exists on.

labelstring    

The name of the Tulip Table Query.

filters Array of object (TulipTableFilter)   

The filters that are applied on this Tulip Table Query.

object  

The filters can use any of the columns defined in the Tulip Table (including `_createdAt` and `_updatedAt`) that the query exists on with any of the functions.

Example{
  "_id": "abcdefg",
  "field": "Color",
  "functionType": "equal",
  "value": {
    "datasourceType": "static",
    "params": {
      "value": "yellow"
    }
  }
}_idstring    
fieldstring    
functionTypestring    Valid values[
  "equal",
  "notEqual",
  "blank",
  "notBlank",
  "greaterThanOrEqual",
  "lessThanOrEqual",
  "greaterThan",
  "lessThan",
  "contains",
  "notContains",
  "startsWith",
  "notStartsWith",
  "endsWith",
  "notEndsWith",
  "isIn",
  "notIsIn"
]
valueobject  

The value to compare to.

If `datasourceType` is set to `&quot;app-info&quot;`, then `params` is not required.

If `datasourceType` is set to `&quot;static&quot;`, then `params` is required.

datasourceTypestring    Valid values[
  "static",
  "app-info"
]
paramsobject  value

The static value to compare to. Must be of the same type as the data in the column specified by `field`.

filterAggregatorValid values[
  "all",
  "any"
]Default"all"
sortOptions Array of object (TulipTableSortOption)   

The field and sorting direction used to sort the query results

object  

Sorts are used to order the queries based on columns defined in the Tulip Table where the query exists.

Example{
  "sortBy": "Color",
  "sortDir": "asc"
}sortBystring    

The field that records should be sorted by in the response. Can be the name of any of the columns of the Table (including `id`) or one of these special values:

- `_sequenceNumber`
- `_createdAt`
- `_updatedAt`

sortDirstring    

The direction of the records, either ascending or descending

Valid values[
  "asc",
  "desc"
]Default"asc"

limitnumber    

The number of records that will be returned at most from this Tulip Table query.

400

The request was malformed. This could mean that headers, query parameters, or the request body was unable to be parsed or had unexpected values.

<select class='api-response-data' aria-label='Media type'><option value='5cbde028-3335-4b87-9320-ea81b35fbabe'>application/json</option>
</select>object  errorCodestring    
errorUniqueIDstring    Pattern^[a-zA-Z0-9+/]+$Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
detailsstring    

401

The request was made unauthorized. HTTP Basic Authorization using a Tulip API Key is required for use of the API.

<select class='api-response-data' aria-label='Media type'><option value='01812c3b-727f-4fb9-8392-0d9151ca3537'>application/json</option>
</select>object  errorCodestring    
errorUniqueIDstring    Pattern^[a-zA-Z0-9+/]+$Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
detailsstring    

403

The provided authentication info was rejected. The response will provide additional details.

<select class='api-response-data' aria-label='Media type'><option value='f7337c29-90ff-48ab-aa3c-b5a38a1b74a8'>application/json</option>
</select>object  errorCodestring    
errorUniqueIDstring    Pattern^[a-zA-Z0-9+/]+$Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
detailsstring    

404

The requested database entry was not found.

<select class='api-response-data' aria-label='Media type'><option value='8eb23891-2774-40a0-b373-4fa4436045f4'>application/json</option>
</select>object  errorCodestring    
errorUniqueIDstring    Pattern^[a-zA-Z0-9+/]+$Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
detailsstring    

422

The request was malformed. This could mean that headers, query parameters, or the request body was unable to be parsed or had unexpected values.

<select class='api-response-data' aria-label='Media type'><option value='30c35be1-ceba-454c-972e-a3a0fc2c3b5f'>application/json</option>
</select>object  errorCodestring    
errorUniqueIDstring    Pattern^[a-zA-Z0-9+/]+$Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
detailsstring    

500

The server encountered an unexpected error.

<select class='api-response-data' aria-label='Media type'><option value='20553877-fe4d-40b8-993f-d7e755ca32ff'>application/json</option>
</select>object  errorCodestring    
errorUniqueIDstring    Pattern^[a-zA-Z0-9+/]+$Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
detailsstring
