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

# Retrieve a batch

> Requires full_access. Account and connection are derived from the key.



## OpenAPI

````yaml /openapi/mail.json get /batches/{id}
openapi: 3.1.0
info:
  title: Webdock Mail API
  version: 1.0.0
  description: >-
    Transactional Mail. Accepted means provider acceptance, not delivery. JSON
    limit 4,000,000 bytes; text+HTML 512 KiB. Requests 120/minute/tenant.
    Unknown handoffs must never be resent with a new key. Webhooks: HMAC-SHA256
    over id.timestamp.rawBody, at-least-once.
servers:
  - url: https://api.webdock.dev/api/mail/v1
security: []
paths:
  /batches/{id}:
    get:
      tags:
        - Batches
      summary: Retrieve a batch
      description: Requires full_access. Account and connection are derived from the key.
      operationId: batches_get
      parameters:
        - name: id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/ID'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Batch'
        '401':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '428':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            Failed or uncertain handoff. Inspect email_id; never automatically
            resend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - MailApiKey: []
components:
  schemas:
    ID:
      type: string
      pattern: ^[1-9][0-9]{0,18}$
    Batch:
      type: object
      required:
        - id
        - status
        - data
      properties:
        id:
          type: string
        status:
          enum:
            - processing
            - succeeded
            - failed
        data:
          type: array
          items:
            $ref: '#/components/schemas/SendResult'
        failed_index:
          type: integer
        failed_email_id:
          type:
            - string
            - 'null'
    Error:
      type: object
      required:
        - statusCode
        - name
        - message
        - request_id
      properties:
        statusCode:
          type: integer
        name:
          type: string
        message:
          type: string
        request_id:
          type: string
        email_id:
          type: string
        id:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/SendResult'
        failed_index:
          type: integer
        failed_email_id:
          type:
            - string
            - 'null'
    SendResult:
      type: object
      required:
        - id
      properties:
        id:
          $ref: '#/components/schemas/ID'
  securitySchemes:
    MailApiKey:
      type: http
      scheme: bearer
      bearerFormat: wdm_…

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.