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

# Upload a batch file for email verification

> Accepts a `.csv` or `.json` file and queues it for asynchronous processing. Returns a `process_id` — use it to poll status or download results when complete. Set `metadata=true` to include MX record, email provider, and failure reason fields in the output file.

**Errors**
- `400 invalid_extension` — File must be `.csv` or `.json`.
- `400 upload_error` — File upload failed. Contact support.



## OpenAPI

````yaml https://api.revenuebase.ai/v2/openapi.json post /v2/email/verify/batch
openapi: 3.1.0
info:
  title: Revenuebase API v2
  version: 0.1.0
servers:
  - url: https://api.revenuebase.ai
security: []
paths:
  /v2/email/verify/batch:
    post:
      tags:
        - Email
      summary: Upload a batch file for email verification
      description: >-
        Accepts a `.csv` or `.json` file and queues it for asynchronous
        processing. Returns a `process_id` — use it to poll status or download
        results when complete. Set `metadata=true` to include MX record, email
        provider, and failure reason fields in the output file.


        **Errors**

        - `400 invalid_extension` — File must be `.csv` or `.json`.

        - `400 upload_error` — File upload failed. Contact support.
      operationId: verify_email_batch_v2_email_verify_batch_post
      parameters:
        - name: metadata
          in: query
          required: false
          schema:
            type: boolean
            description: Include metadata fields in output file
            default: false
            title: Metadata
          description: Include metadata fields in output file
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_verify_email_batch_v2_email_verify_batch_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchEmailResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
      x-codeSamples:
        - lang: Python
          label: Python SDK
          source: |-
            from revenuebase_sdk import RevenuebaseClient

            client = RevenuebaseClient()

            with open("emails.csv", "rb") as f:
                job = client.email.batch_upload(file=f, filename="emails.csv")

            print(job.process_id)
components:
  schemas:
    Body_verify_email_batch_v2_email_verify_batch_post:
      properties:
        requested_file:
          type: string
          contentMediaType: application/octet-stream
          title: Requested File
      type: object
      required:
        - requested_file
      title: Body_verify_email_batch_v2_email_verify_batch_post
    BatchEmailResponse:
      properties:
        process_id:
          type: integer
          title: Process Id
        filename:
          type: string
          title: Filename
        status:
          type: string
          title: Status
      type: object
      required:
        - process_id
        - filename
        - status
      title: BatchEmailResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-key

````