Prisma Batch API

Batch operations for bulk create, update, and delete

Operations 3

POST /{model}/createMany Prisma Create multiple records #
PATCH /{model}/updateMany Prisma Update multiple records #
DELETE /{model}/deleteMany Prisma Delete multiple records #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/prisma-batch-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

prisma-batch-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Prisma Client Batch API
  description: Auto-generated, type-safe query builder for Node.js and TypeScript that provides programmatic database access.
  version: 1.0.0
  contact:
    name: Prisma Support
    email: support@prisma.io
    url: https://www.prisma.io/support
  license:
    name: Apache-2.0
    url: https://opensource.org/licenses/Apache-2.0
  termsOfService: https://www.prisma.io/terms
servers:
- url: https://localhost:3000/api
  description: Local development server. Prisma Client is typically used as a library, not a REST API. This specification documents the operations available when exposed via a REST layer.
tags:
- name: Batch
  description: Batch operations for bulk create, update, and delete
paths:
  /{model}/createMany:
    post:
      operationId: createMany
      summary: Prisma Create multiple records
      description: Inserts multiple records in a single transaction. Optionally skips records that would violate unique constraints. Returns a count of created records. On PostgreSQL, CockroachDB, and SQLite, use createManyAndReturn to also retrieve the created records.
      tags:
      - Batch
      parameters:
      - $ref: '#/components/parameters/ModelName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateManyInput'
      responses:
        '200':
          description: Successfully created records
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchPayload'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /{model}/updateMany:
    patch:
      operationId: updateMany
      summary: Prisma Update multiple records
      description: Updates all records matching the filter criteria with the provided data. Returns a count of the number of records updated. Does not return the updated records themselves.
      tags:
      - Batch
      parameters:
      - $ref: '#/components/parameters/ModelName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateManyInput'
      responses:
        '200':
          description: Successfully updated records
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchPayload'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /{model}/deleteMany:
    delete:
      operationId: deleteMany
      summary: Prisma Delete multiple records
      description: Deletes all records matching the filter criteria. Returns a count of the number of records deleted. If no filter is provided, all records in the model are deleted.
      tags:
      - Batch
      parameters:
      - $ref: '#/components/parameters/ModelName'
      - name: where
        in: query
        description: JSON-encoded filter conditions
        schema:
          type: string
      responses:
        '200':
          description: Successfully deleted records
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchPayload'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    UpdateManyInput:
      type: object
      description: Input data for updating multiple records
      properties:
        where:
          type: object
          description: Filter conditions to select records to update
          additionalProperties: true
        data:
          type: object
          description: Field values to update
          additionalProperties: true
      required:
      - data
    CreateManyInput:
      type: object
      description: Input data for creating multiple records
      properties:
        data:
          type: array
          description: Array of records to create
          items:
            type: object
            additionalProperties: true
        skipDuplicates:
          type: boolean
          description: Skip records that violate unique constraints
          default: false
      required:
      - data
    BatchPayload:
      type: object
      description: Result of a batch operation with the count of affected records
      properties:
        count:
          type: integer
          description: Number of records affected by the operation
          minimum: 0
      required:
      - count
    PrismaError:
      type: object
      description: Error response from Prisma Client. Error codes follow the Pxxxx format documented at https://www.prisma.io/docs/orm/reference/error-reference
      properties:
        code:
          type: string
          description: Prisma error code (e.g., P2002 for unique constraint violation)
          pattern: ^P[0-9]{4}$
          examples:
          - P2002
          - P2025
        message:
          type: string
          description: Human-readable error description
        meta:
          type: object
          description: Additional error context
          additionalProperties: true
      required:
      - code
      - message
  responses:
    BadRequest:
      description: The request was invalid or malformed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PrismaError'
    InternalServerError:
      description: An unexpected error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PrismaError'
  parameters:
    ModelName:
      name: model
      in: path
      required: true
      description: The Prisma model name (e.g., user, post, comment) as defined in the Prisma schema file
      schema:
        type: string
        examples:
        - user
        - post
externalDocs:
  description: Prisma Client API Reference
  url: https://www.prisma.io/docs/orm/reference/prisma-client-reference