---
title: "Create or update document with id"
method: PUT
path: "/api/{index}/_doc/{id}"
tags: ["Document"]
---

# Create or update document with id

`PUT /api/{index}/_doc/{id}`

## Path parameters

- `index` string, required
- `id` string, required

## Request body

- object

## Response `200`

OK

- MetaHTTPResponseID
  - `id` string
  - `message` string

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.net/zincsearch/apis/zinc-search-engine-api.md) · [All operations](https://skmtc.net/zincsearch/apis/zinc-search-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zincsearch/zinc-search-engine-api/versions/c7ce1991bb9a/schema)
