---
title: "Run up to 20 reads in one request"
method: POST
path: "/batch"
tags: ["Batch"]
---

# Run up to 20 reads in one request

`POST /batch`

## Request

- Base URL: `https://yappy.biz/api/v1`
- URL: `https://yappy.biz/api/v1/batch`
- Auth: one of:
  - none
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://yappy.biz/oauth/authorize`, token URL `https://yappy.biz/oauth/token`; client credentials, token URL `https://yappy.biz/oauth/token`)

Bundle up to twenty GET operations into a single round trip that costs one unit of rate limit rather than twenty. Each result carries the id you supplied, its own HTTP status, and its body; one failing operation returns its problem document in that entry and leaves the rest untouched.

## Headers

- `Idempotency-Key` string

## Request body

- BatchRequest: Up to twenty read operations to run in one request.
  - `operations` object[], required: The operations, run independently of each other.
    - `id` string, required: Your label for this operation, echoed back.
    - `method` 'GET', required: Only GET is accepted inside a batch.
    - `path` string, required: A path relative to /api/v1, query string included.

## Response `200`

Per-operation results

- BatchResponse: One entry per operation, in the order supplied. Check each status; the envelope is 200 even when an operation failed.
  - `object` 'batch', required: Type discriminator.
  - `results` object[], required: Per-operation outcomes.
    - `id` string, required: The label you supplied.
    - `status` integer, required: HTTP status for this operation.
    - `body` unknown, required

## Other responses

- `400`: The request was malformed
- `401`: The supplied credential is missing, expired, or invalid
- `403`: The credential is valid but lacks the required scope
- `413`: The request body was too large
- `415`: The body was not application/json
- `429`: Too many requests
- `500`: Unexpected server error
- `503`: A dependency was unavailable

---

[API](https://skmtc.dev/yappy/apis/yappy-web-api.md) · [All operations](https://skmtc.dev/yappy/apis/yappy-web-api/llms.txt) · [OpenAPI document](https://skmtc.dev/yappy/apis/yappy-web-api/revisions/02b27cd526a7?raw)
