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

# Overwrite payload

> Replace the entire payload on the specified points. All existing payload fields are removed and replaced with the provided object. Use the set payload endpoint to merge instead.



## OpenAPI

````yaml put /collections/{collection_name}/points/payload
openapi: 3.0.3
info:
  title: Actian VectorAI DB - Points API
  description: Point CRUD operations for VectorAI DB.
  version: 1.0.0
  contact:
    name: Actian Corporation
    url: https://www.actian.com
servers:
  - url: http://localhost:6573
    description: Local development server (REST API)
  - url: https://api.vectorai.actian.com
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Points
    description: Point data operations
paths:
  /collections/{collection_name}/points/payload:
    put:
      tags:
        - Points
      summary: Overwrite payload
      description: >-
        Replace the entire payload on the specified points. All existing payload
        fields are removed and replaced with the provided object. Use the set
        payload endpoint to merge instead.
      operationId: overwrite_payload
      parameters:
        - name: collection_name
          in: path
          required: true
          schema:
            type: string
            example: my_collection
          description: The name of the collection containing the target points.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - payload
                - points
              properties:
                payload:
                  type: object
                  example:
                    name: overwritten
                    new_field: 42
                  description: The complete payload object to replace existing data.
                points:
                  type: array
                  items:
                    oneOf:
                      - type: integer
                      - type: string
                  example:
                    - 3
                  description: List of point IDs to overwrite.
            examples:
              overwrite:
                summary: Overwrite payload
                value:
                  payload:
                    name: overwritten
                    new_field: 42
                  points:
                    - 3
      responses:
        '200':
          description: Payload overwritten
          content:
            application/json:
              schema:
                type: object
                properties:
                  usage:
                    type: object
                    description: Resource usage information for this request.
                    properties:
                      hardware:
                        type: object
                        nullable: true
                        description: >-
                          Hardware resource counters for the operation,
                          including CPU, payload I/O, payload index I/O, and
                          vector I/O metrics.
                  time:
                    type: number
                    format: double
                    example: 0.000065268
                    description: Time spent to process this request, in seconds.
                  status:
                    type: string
                    example: ok
                    description: Operation status. Returns `ok` on success.
                  result:
                    type: object
                    description: >-
                      Operation result containing the status of the payload
                      overwrite.
                    properties:
                      operation_id:
                        type: integer
                        example: 0
                        description: Unique identifier for the operation.
                      status:
                        type: string
                        example: Completed
                        description: >-
                          Status of the operation. Returns `Completed` when the
                          operation finishes successfully.
              example:
                usage:
                  hardware: null
                time: 0.000065268
                status: ok
                result:
                  operation_id: 0
                  status: Completed
        4XX:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: Python
          label: Overwrite payload
          source: |
            from actian_vectorai_client import VectorAIClient

            with VectorAIClient("localhost:6574") as client:
                # Replace entire payload
                client.points.overwrite_payload(
                    "my_collection",
                    payload={"name": "overwritten", "new_field": 42},
                    ids=[3]
                )
                print("✓ Overwrote payload on point 3")
        - lang: JavaScript
          label: Overwrite payload
          source: >
            import { VectorAIClient } from '@actian/vectorai-client';


            const client = new VectorAIClient('localhost:6574');


            await client.points.overwritePayload('my_collection', { name:
            'overwritten', new_field: 42 }, { ids: [3] });

            console.log('Overwrote payload on point 3');


            client.close();
        - lang: cURL
          label: Overwrite payload
          source: >
            curl -X PUT
            "http://localhost:6573/collections/my_collection/points/payload" \
              -H "Content-Type: application/json" \
              -H 'Authorization: Bearer <admin-jwt-or-access-token>' \
              -d '{
                "payload": {"name": "overwritten", "new_field": 42},
                "points": [3]
              }'
components:
  schemas:
    ErrorResponse:
      type: object
      description: Error response returned when a request fails.
      properties:
        status:
          type: object
          description: Status object containing the error message.
          properties:
            error:
              type: string
              description: Human-readable error message describing what went wrong.
              example: Collection `my_collection` doesn't exist!
        time:
          type: number
          format: double
          description: Time spent to process this request, in seconds.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Admin JWT or access token for authenticating requests to VectorAI DB.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.