> ## 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 record of a Tulip Table

> Updates the fields of a record in a Tulip Table by the record id. The record's `_updatedAt` field will be updated to the current time.

Requires the `tables:write` API key scope.


## OpenAPI

````json PUT /tables/{tableId}/records/{recordId}
{
  "openapi": "3.0.3",
  "info": {
    "title": "Tulip API",
    "description": "The Tulip API gives you programmatic access to your Tulip data.\n\n### Query Parameters\n\nSome Tulip API endpoints take parameters specified in the [URL query](https://en.wikipedia.org/wiki/Query_string). In the Tulip API, the URL query is expected to be a list of key-value pairs, with pairs separated by `&`, keys and values separated by `=`, and keys and values being [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding). Keys are parsed as strings, values *must* be present for each key, and values are parsed as JSON. Simple string values may be specified as-is instead of being JSON-encoded. A query parameter may be specified multiple times, but only the final value will be used. Examples (shown without percent encoding for readability):\n\n  * `a=1&b=true&c=\"hello\"` would parse a parameter `a` as the number 1, `b` as the boolean `true`, and `c` as the string `hello`\n  * `a=foo&b=\"foo\"` would parse a parameter `a` as the string `foo` and `b` as the string `foo`\n  * `data={\"points\":[{\"x\":3,\"y\":4},{\"x\":2,\"y\":-9}]}` would parse a parameter `data` as an object with a single field `points` containing an array with two elements: an object with `x` as the number 3 and `y` as the number 4, and an object with `x` as the number 2 and `y` as the number -9\n  * `a=foo&a=bar` would parse a parameter `a` as the string `bar`\n",
    "termsOfService": "https://tulip.co/tos/",
    "contact": {
      "name": "Tulip Interfaces",
      "url": "https://tulip.co/contact-us/",
      "email": "sales@tulip.co"
    },
    "version": "3.0"
  },
  "servers": [
    {
      "url": "http://localhost:8088/api/v3",
      "description": "Cypress Tulip API Server"
    }
  ],
  "paths": {
    "/tables/{tableId}/records/{recordId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/tableId"
        },
        {
          "$ref": "#/components/parameters/recordId"
        }
      ],
      "put": {
        "summary": "Update a record of a Tulip Table",
        "description": "Updates the fields of a record in a Tulip Table by the record id. The record's `_updatedAt` field will be updated to the current time.\n\nRequires the `tables:write` API key scope.\n",
        "operationId": "updateTableRecord",
        "x-tulip-visibility": "public",
        "tags": [
          "Tulip Tables"
        ],
        "security": [
          {
            "apiKey": [
              "tables:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/decimalHeaderForWrites"
          }
        ],
        "requestBody": {
          "description": "The updated Tulip Table record. The field names must match column names of the Table. Any fields not included in the request will not be updated. The `id` field may be included, but its value must match the existing `id` of the record.\n\nFor Tulip number fields (_not_ integer fields), you may specify values as either JSON numbers or strings. If\nspecifying numbers as strings, they must be of format `\"[-]xx[.yyy]\"`. This corresponds to the JSON number\nformat, except that the exponent component is not allowed (in other words, you cannot use scientific notation).\nNumbers specified as strings will be stored with full allowed precision (up to 20 digits to the right of the\ndecimal place), including trailing zeros. Numbers specified as JSON numbers will not include trailing zeros.\n",
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The Tulip Table record was updated successfully. The details of the updated Table record are returned in the response.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TulipTableRecord"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequestError"
          },
          "401": {
            "$ref": "#/components/responses/authenticationRequiredError"
          },
          "403": {
            "$ref": "#/components/responses/authenticationFailedError"
          },
          "404": {
            "$ref": "#/components/responses/notFoundError"
          },
          "422": {
            "$ref": "#/components/responses/badRequestError"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "tableId": {
        "name": "tableId",
        "description": "The id of a Tulip Table.\n",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/ObjectId"
        }
      },
      "recordId": {
        "name": "recordId",
        "description": "The id of a Tulip Table record.\n",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/RecordId"
        }
      },
      "decimalHeaderForWrites": {
        "name": "X-Tulip-Number-Format",
        "in": "header",
        "required": false,
        "description": "The format that Tulip should use in the response when formatting Tulip numbers. If omitted or set to\n`float`, Tulip will format numbers as JSON numbers. If set to `decimal`, Tulip will format numbers as strings\nrepresenting the decimal representation of the number, like `\"1.20\"`. Tulip will only output trailing zeros\nwhen using `decimal` formatting.\n\nThis header only affects the response format. The value written is determined solely by the request body (see\nbody description).\n\nNote that this header only affects Tulip numbers. Other types, including Tulip integers, are unaffected.\n",
        "schema": {
          "type": "string",
          "enum": [
            "decimal",
            "float"
          ],
          "default": "float"
        }
      }
    },
    "schemas": {
      "TulipTableRecord": {
        "x-tulip-visibility": "public",
        "description": "A single record stored in a Tulip Table. The record object will include the names and values of all columns of the Table that are not hidden, in addition to the record's sequence number, created timestamp, and last updated timestamp.\n",
        "example": {
          "_sequenceNumber": 15,
          "_createdAt": "2019-02-08T20:16:31Z",
          "_updatedAt": "2019-02-08T20:16:31Z",
          "id": "bike-a",
          "ahvbb_model_number": "AAA",
          "auznd_color": "blue",
          "irrip_completed": true,
          "umiyk_durability_test_duration": 123000
        },
        "type": "object",
        "properties": {
          "_sequenceNumber": {
            "description": "A monotonically increasing unique identifier for this record.\n",
            "type": "integer"
          },
          "_createdAt": {
            "allOf": [
              {
                "description": "The time this record was created.\n"
              },
              {
                "$ref": "#/components/schemas/DateTime"
              }
            ]
          },
          "_updatedAt": {
            "allOf": [
              {
                "description": "The time this record was last updated.\n"
              },
              {
                "$ref": "#/components/schemas/DateTime"
              }
            ]
          }
        },
        "required": [
          "_sequenceNumber",
          "_createdAt",
          "_updatedAt"
        ]
      },
      "ObjectId": {
        "$ref": "#/components/schemas/RandomId"
      },
      "RecordId": {
        "x-tulip-visibility": "public",
        "example": "a record id",
        "type": "string",
        "pattern": "^[\\S]+( +[\\S]+)*$"
      },
      "DateTime": {
        "x-tulip-visibility": "public",
        "description": "A date-time string as defined by [RFC 3339 §5.6](https://tools.ietf.org/html/rfc3339#section-5.6).\n",
        "type": "string",
        "format": "date-time"
      },
      "ApiError": {
        "x-tulip-visibility": "public",
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string"
          },
          "errorUniqueID": {
            "$ref": "#/components/schemas/RandomSecret"
          },
          "details": {
            "type": "string"
          }
        },
        "required": [
          "errorCode",
          "details"
        ]
      },
      "RandomId": {
        "x-tulip-visibility": "public",
        "example": "g56RCoZCtzv7borvp",
        "type": "string",
        "pattern": "^[a-zA-Z0-9_]+$"
      },
      "RandomSecret": {
        "x-tulip-visibility": "public",
        "example": "aq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y",
        "type": "string",
        "pattern": "^[a-zA-Z0-9+/]+$"
      }
    },
    "responses": {
      "badRequestError": {
        "description": "The request was malformed. This could mean that headers, query parameters, or the request body was unable to be parsed or had unexpected values.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "authenticationRequiredError": {
        "description": "The request was made unauthorized. HTTP Basic Authorization using a Tulip API Key is required for use of the API.\n",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ApiError"
                },
                {
                  "type": "object",
                  "properties": {
                    "errorCode": {
                      "enum": [
                        "AuthenticationRequired"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "authenticationFailedError": {
        "description": "The provided authentication info was rejected. The response will provide additional details.\n",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ApiError"
                },
                {
                  "type": "object",
                  "properties": {
                    "errorCode": {
                      "enum": [
                        "AuthenticationFailed"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "notFoundError": {
        "description": "The requested database entry was not found.\n",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ApiError"
                },
                {
                  "type": "object",
                  "properties": {
                    "errorCode": {
                      "enum": [
                        "NoSuchDatabaseEntry"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "internalServerError": {
        "description": "The server encountered an unexpected error.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "basic",
        "description": "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.\n\nAPI 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.\n"
      }
    }
  }
}
````

