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

# Update a record

> Update fields (and/or the name) on an existing record. Field keys resolve the same way as create; unmatched keys come back in `ignoredFields`. **Requires scope:** `records:write`.



## OpenAPI

````yaml /openapi-v1.json patch /v1/records/{object}/{id}
openapi: 3.1.0
info:
  title: Custral API
  version: v1
  description: >-
    The curated, versioned, API-key-authenticated public REST surface (`/v1`).
    Every endpoint here is what the official SDKs (`@custral/sdk`) and the MCP
    server are built on. Authenticate with a secret API key (`sk_…`) created in
    **Settings → Applications**.
  contact:
    name: Custral Support
    email: hello@custral.com
    url: https://custral.com
  license:
    name: Proprietary
    url: https://custral.com
servers:
  - url: https://api.custral.com
    description: Production
security:
  - ApiKey: []
tags:
  - name: Identity
    description: Introspect the calling API key.
  - name: Records
    description: Create, list, retrieve, and update records on any object.
  - name: Objects
    description: Read the object (table) schema of your workspace.
  - name: Conversations
    description: View, manage, and ingest conversations and their messages.
  - name: MCP
    description: Introspect the Model Context Protocol tool surface for a key.
  - name: Documents
    description: Read record notes / page documents as markdown.
paths:
  /v1/records/{object}/{id}:
    patch:
      tags:
        - Records
      summary: Update a record
      description: >-
        Update fields (and/or the name) on an existing record. Field keys
        resolve the same way as create; unmatched keys come back in
        `ignoredFields`. **Requires scope:** `records:write`.
      operationId: updateRecord
      parameters:
        - name: object
          in: path
          required: true
          description: The object the record belongs to — its id, key, or name.
          schema:
            type: string
          example: contacts
        - name: id
          in: path
          required: true
          description: The record id (`rec_…`).
          schema:
            type: string
          example: rec_123
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateRecordBody'
      responses:
        '200':
          description: The update result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/UpdateRecordResult'
                  reqId:
                    $ref: '#/components/schemas/RequestId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    UpdateRecordBody:
      type: object
      description: The body of an update-record request. The object + id are in the path.
      properties:
        fields:
          type: object
          additionalProperties: true
          description: >-
            A `{property: value}` map of fields to change. Keys may be a
            property id, key, or name.
          example:
            status: customer
        name:
          type: string
          description: A new display name for the record.
    UpdateRecordResult:
      type: object
      description: The result of an update.
      properties:
        id:
          type: string
          example: rec_123
        action:
          type: string
          enum:
            - updated
          example: updated
        ignoredFields:
          type: array
          items:
            type: string
          description: Field keys that matched no property and were dropped.
      required:
        - id
        - action
        - ignoredFields
    RequestId:
      type: string
      description: >-
        A per-request id (`req_…`). Quote it to support when reporting a
        problem.
      example: req_2a1f9c8e7b6d5
    Error:
      type: object
      description: >-
        The failure envelope. Every error carries a machine-readable `code` and
        the `reqId` of the failing request.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: insufficient_scope
          required:
            - code
        reqId:
          $ref: '#/components/schemas/RequestId'
      required:
        - error
  responses:
    Unauthorized:
      description: >-
        The API key is missing, unknown, inactive, or expired (`code:
        invalid_api_key`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_api_key
            reqId: req_2a1f9c8e7b6d5
    Forbidden:
      description: >-
        The key lacks the scope this endpoint requires (`code:
        insufficient_scope`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: insufficient_scope
            reqId: req_2a1f9c8e7b6d5
    NotFound:
      description: 'The object or record was not found (`code: not_found`).'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: not_found
            reqId: req_2a1f9c8e7b6d5
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: sk_...
      description: >-
        A Custral **secret** API key (`sk_…`), created in Settings →
        Applications. Sent as `Authorization: Bearer sk_…`. The `X-Api-Key:
        sk_…` header is also accepted and takes precedence. Never expose a
        secret key in a browser.

````

## Related topics

- [What the assistant can do](/ai/tools/library.md)
- [Triggers](/ai/property-agents/triggers.md)
- [Applications & keys](/dev/api-reference/applications.md)
- [Authentication](/dev/auth/overview.md)
- [Data Import](/automation/jobs/migrations.md)
