---
title: "Bulk update, commit, or deploy prompts"
method: POST
path: "/api/prompts/bulk/"
tags: ["prompts"]
---

# Bulk update, commit, or deploy prompts

`POST /api/prompts/bulk/`

Process 1 to 100 prompt operations sequentially in request order using exact `prompt_id` matching. Each item runs in its own transaction, so a failed item is rolled back without undoing successful items. `update` changes model configuration on the latest draft and does not accept content fields such as `messages`, `variables`, or `description`; `commit` snapshots the latest draft; `deploy` promotes the latest committed version. A later duplicate successful `commit` or `deploy` for the same prompt in one request is returned as an indexed error. This endpoint inherits the caller's configured API-key or JWT rate limits; it has no fixed endpoint-specific RPM.

## Headers

- `Authorization` string, required

## Request body

- PromptBulkRequest — Ordered prompt operations to process.
  - `requests` PromptBulkRequestItem[], required — Prompt operations. Error indices refer to this zero-based array.
    - union — One action in a prompt bulk request.
      - object — Update model configuration on the prompt's latest draft.
        - `action` 'update', required — Discriminator value: update
        - `prompt_id` string, required — Exact prompt ID to mutate.
        - `body` PromptBulkUpdateBody, required — Non-empty model configuration changes for the latest draft. Prompt content fields are not accepted.
          - `model` string — Primary model for the draft.
          - `stream` boolean — Whether gateway responses using this prompt should stream.
          - `temperature` number, double, nullable — Sampling temperature.
          - `max_tokens` integer, nullable — Maximum output tokens.
          - `top_p` number, double, nullable — Nucleus-sampling probability mass.
          - `frequency_penalty` number, double, nullable — Frequency penalty.
          - `presence_penalty` number, double, nullable — Presence penalty.
          - `reasoning_effort` string, nullable — Provider-specific reasoning effort.
          - `verbosity` string, nullable — Provider-specific output verbosity.
          - `thinking` unknown
          - `seed` integer, nullable — Optional deterministic sampling seed.
          - `fallback_models` string[], nullable — Fallback model identifiers.
          - `load_balance_models` unknown[], nullable — Load-balancing model configurations.
            - unknown
          - `tools` unknown[], nullable — Tool definitions made available to the model.
            - unknown
          - `tool_choice` unknown
          - `response_format` unknown
          - `json_schema` unknown
          - `is_enforcing_response_format` boolean — Whether to enforce the configured response format.
      - object — Commit the prompt's latest draft.
        - `action` 'commit', required — Discriminator value: commit
        - `prompt_id` string, required — Exact prompt ID to mutate.
        - `body` PromptBulkCommitBody — Optional commit metadata.
          - `description` string — Optional commit message. Blank strings are accepted.
      - object — Deploy the prompt's latest committed version.
        - `action` 'deploy', required — Discriminator value: deploy
        - `prompt_id` string, required — Exact prompt ID to mutate.
        - `body` PromptBulkRequestItemDiscriminatorMappingDeployBody — If provided, this object must be empty.

## Response `200`

All prompt operations succeeded.

- BulkOperationResponse — Canonical result envelope for a bulk operation.
  - `success_count` integer, required — Number of items successfully processed.
  - `error_count` integer, required — Number of items that failed.
  - `errors` BulkItemError[], required — Item-level failures, keyed by zero-based input index.
    - `index` integer, required — Zero-based index of the failed item in the submitted array.
    - `error` string, required — Error message for the failed item.

## Other responses

- `400` — The request failed validation, or every prompt operation failed.
- `401` — Unauthorized - Missing or invalid authentication
- `403` — Forbidden - The caller does not have permission to update prompts
- `422` — The request contains more than 100 prompt operations.
- `429` — Rate limit exceeded.

---

[API](https://skmtc.net/keywordsai/apis/api-reference.md) · [All operations](https://skmtc.net/keywordsai/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/keywordsai/api-reference/revisions/4e064cf81dae/schema)
