---
title: "Bulk upsert posts"
method: POST
path: "/posts/bulk"
tags: ["Posts"]
---

# Bulk upsert posts

`POST /posts/bulk`

## Request

- Base URL: `https://api.savanto.ai`
- URL: `https://api.savanto.ai/posts/bulk`
- Auth: HTTP bearer

Create or update up to 100 posts in a single request.

## Request body

- object
  - `entities` PostInput[], required
    - `id` string, required
    - `title` string, required
    - `content` string
    - `searchableText` string
    - `excerpt` string
    - `postType` string
    - `status` 'publish' | 'draft' | 'private' | 'pending'
    - `authorId` string
    - `authorName` string
    - `publishedAt` string, nullable
    - `categories` string[]
    - `tags` string[]
    - `url` string
    - `featuredImage` string, nullable
    - `source` string
    - `indexStatus` 'active' | 'hidden' | 'disabled'
    - `metadata` object
    - `attributes` object, nullable
  - `refresh` 'true' | 'false' | 'wait_for'

## Response `200`

Bulk upsert completed

- object
  - `object` 'bulk_operation', required
  - `requestId` string, required
  - `data` object, required
    - `processed` number, required
    - `succeeded` string[], required
    - `failed` object[], required
      - `id` string
      - `error` string, required
    - `skipped` number
    - `indexingLimitReached` boolean

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict
- `413`: Payload too large
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/savanto/apis/savanto-api.md) · [All operations](https://skmtc.dev/savanto/apis/savanto-api/llms.txt) · [OpenAPI document](https://skmtc.dev/savanto/apis/savanto-api/revisions/82437327a878?raw)
