---
title: "Replace Custom Table"
method: POST
path: "/core/custom-data/tables/{name}/replace"
tags: ["custom_data"]
---

# Replace Custom Table

`POST /core/custom-data/tables/{name}/replace`

## Request

- Base URL: `https://api.anyreach.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.anyreach.ai/core/custom-data/tables/{name}/replace`
- Auth: HTTP bearer

Replace the table's entire contents with this snapshot.

The only operation that detects absence, and absence is how upstream
deletion propagates: anything absent from the snapshot is tombstoned, and
a tombstoned row returns if its key reappears in a later write.

## Path parameters

- `name` string, required

## Headers

- `x-anyreach-org` string, nullable: Organization ID for user PATs (pat_ prefix tokens)

## Request body

- ReplaceTableRequest
  - `rows` object[], required: The source's COMPLETE current state. Anything absent is tombstoned.

## Response `200`

Successful Response

- WriteResultSchema: The writer's report. Warnings are advisory; the apply already happened.
  - `table` string, required
  - `received` integer, required
  - `written` integer, required
  - `unchanged` integer, required
  - `tombstoned` integer, required
  - `live_before` integer, nullable
  - `live_after` integer, nullable
  - `warnings` string[]
  - `type_mismatches` object
  - `undeclared_properties` string[]
  - `view` string, nullable

## Other responses

- `404`: Not found
- `422`: Validation Error

---

[API](https://skmtc.dev/anyreach/apis/anyreach-api.md) - [All operations](https://skmtc.dev/anyreach/apis/anyreach-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anyreach/apis/anyreach-api/revisions/2eddf40c8c93?raw)
