> ## Documentation Index
> Fetch the complete documentation index at: https://docs.korve.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish Batch

> Publish up to 100 messages in one request of at most 256,000 encoded bytes; each accepted message is delivered independently.



## OpenAPI

````yaml /openapi.json post /v1/orgs/{orgId}/projects/{projectId}/queues/{queueId}/messages/batch
openapi: 3.1.0
info:
  title: Korve API
  version: 0.1.0
  description: >-
    Typed control plane for deploying applications and explicitly provisioning
    their managed infrastructure.
servers:
  - url: https://api.korve.dev
security: []
paths:
  /v1/orgs/{orgId}/projects/{projectId}/queues/{queueId}/messages/batch:
    post:
      tags:
        - queues
      summary: Publish Batch
      description: >-
        Publish up to 100 messages in one request of at most 256,000 encoded
        bytes; each accepted message is delivered independently.
      operationId: queues.publishBatch
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          description: The organization's id (UUID) or slug — either form is accepted.
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The project's id (UUID) or slug — either form is accepted.
        - name: queueId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        x-korve-max-bytes: 256000
        content:
          application/json:
            schema:
              type: object
              properties:
                messages:
                  type: array
                  items:
                    type: object
                    properties:
                      body:
                        description: >-
                          JSON message body may not exceed 122,880 bytes; the
                          complete encoded message may not exceed 128,000 bytes.
                      contentType:
                        type: string
                        description: Application media type. Defaults to application/json.
                      delaySeconds:
                        type: integer
                        description: Per-message delay, from 0 to 86400 seconds.
                      idempotencyKey:
                        type: string
                        maxLength: 128
                        description: >-
                          Caller key for safely retrying publication without
                          creating another message.
                    required:
                      - body
                    additionalProperties: false
              required:
                - messages
              additionalProperties: false
      responses:
        '202':
          description: Messages accepted in input order.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    messageId:
                      type: string
                    acceptedAt:
                      type: string
                      format: date-time
                  required:
                    - messageId
                    - acceptedAt
        '404':
          description: No such queue in this project.
        '409':
          description: Queue is not accepting messages in its current state.
        '413':
          description: >-
            A customer body exceeds 122,880 bytes, an encoded envelope exceeds
            128,000 bytes, or the encoded batch exceeds 256,000 bytes.
        '422':
          description: Batch is empty, too large, or invalid.
        '429':
          description: Queue throughput or capacity limit reached.
      security:
        - apiKey: []
        - session: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: korve_api_key
    session:
      type: apiKey
      in: cookie
      name: korve.session_token

````