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

# Overwrite a tap's incremental-sync state

> Sets the state object the next run receives via DATRIS_TAP_STATE — e.g. rewind a cursor so a window is re-fetched. The state shape is defined by the tap's own script. Committed state is capped at 64 KB.



## OpenAPI

````yaml /openapi.yaml post /api/v1/tap/state
openapi: 3.0.3
info:
  title: Datris API
  description: >
    REST API for the Datris AI Data Platform. Ingest, validate, transform,
    store, and retrieve data.


    For AI agent integration, use the [MCP
    Server](https://docs.datris.ai/mcp-server) instead.
  version: 1.11.3
  contact:
    name: Datris
    url: https://datris.ai
  license:
    name: Apache 2.0
servers:
  - url: http://localhost:8080
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /api/v1/tap/state:
    post:
      tags:
        - Taps
      summary: Overwrite a tap's incremental-sync state
      description: >-
        Sets the state object the next run receives via DATRIS_TAP_STATE — e.g.
        rewind a cursor so a window is re-fetched. The state shape is defined by
        the tap's own script. Committed state is capped at 64 KB.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - state
              properties:
                name:
                  type: string
                state:
                  type: object
                  additionalProperties: true
      responses:
        '200':
          description: State saved
        '500':
          description: Error (unknown tap, or state is not a JSON object)
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Optional API key for authentication (enabled via application.yaml)

````