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

# Update Record Partial

> Update a record (partial update).

Updates only the provided fields.



## OpenAPI

````yaml patch /api/v1/records/{collection}/{record_id}
openapi: 3.1.0
info:
  title: SnackBase
  description: Open-source Backend-as-a-Service (BaaS)
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/records/{collection}/{record_id}:
    patch:
      tags:
        - records
      summary: Update Record Partial
      description: |-
        Update a record (partial update).

        Updates only the provided fields.
      operationId: update_record_partial_api_v1_records__collection___record_id__patch
      parameters:
        - name: collection
          in: path
          required: true
          schema:
            type: string
            title: Collection
        - name: record_id
          in: path
          required: true
          schema:
            type: string
            title: Record Id
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: true
              type: object
              title: Data
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecordResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecordValidationErrorResponse'
        '401':
          description: Authentication required
        '403':
          description: Permission denied
        '404':
          description: Record or collection not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RecordResponse:
      properties:
        id:
          type: string
          title: Id
          description: Record ID (UUID)
        account_id:
          type: string
          title: Account Id
          description: Account ID the record belongs to
        created_at:
          type: string
          title: Created At
          description: ISO 8601 timestamp when record was created
        created_by:
          type: string
          title: Created By
          description: User ID who created the record
        updated_at:
          type: string
          title: Updated At
          description: ISO 8601 timestamp when record was last updated
        updated_by:
          type: string
          title: Updated By
          description: User ID who last updated the record
        account_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Name
          description: Display name for the account (optional)
      additionalProperties: true
      type: object
      required:
        - id
        - account_id
        - created_at
        - created_by
        - updated_at
        - updated_by
      title: RecordResponse
      description: |-
        Response for a created or retrieved record.

        Contains all system fields plus user-defined fields.
    RecordValidationErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: Error type
          default: Validation error
        details:
          items:
            $ref: '#/components/schemas/RecordValidationErrorDetail'
          type: array
          title: Details
          description: List of validation errors
      type: object
      required:
        - details
      title: RecordValidationErrorResponse
      description: Response for record validation errors.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RecordValidationErrorDetail:
      properties:
        field:
          type: string
          title: Field
          description: Field that failed validation
        message:
          type: string
          title: Message
          description: Human-readable error message
        code:
          type: string
          title: Code
          description: Machine-readable error code
      type: object
      required:
        - field
        - message
        - code
      title: RecordValidationErrorDetail
      description: A single record validation error.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````