---
title: "Submit an async export job"
method: POST
path: "/batch"
tags: ["Batch"]
---

# Submit an async export job

`POST /batch`

## Request

- Base URL: `https://api3.mountain.com`
- URL: `https://api3.mountain.com/batch`
- Auth: none declared
- TypeScript: <https://skmtc.dev/mountain/apis/mntn-ai-ops-reporting-api/docs/batch/post.ts> (a function with typed inputs; its response is checked against the schema)

Queues a CSV export for the authenticated advertiser. Returns **202 Accepted** with a `batchId` and initial status; poll `GET /batch/{batchId}` until `SUCCEEDED`, then use the signed `downloadUrl`.

## Request body

- ExportRequest: Batch Request
  - `key` string, required: API Key
  - `data` union[], required: List of data columns to query
    - union
      - FilteredColumn: List of data columns to query
        - `alias` string
        - `friendly` string
        - `name` string
        - `type` string, required
        - `filter` union[]
          - union
            - And: Optional JSON **object** that restricts which rows are returned. Use the same shape for **POST** `filter` and **GET** `filter` (URL-encoded). **Filter types — column predicates:** Each property key is a column identifier (`table.column`). The value can be: - **Operator object:** keys are operator names and values are comparison values (for example `{"equals": "Live"}`, `{"in": ["a","b"]}`). - **Scalar** (string or number): shorthand for `equals`. - **Array:** shorthand for membership (`in`). **Filter types — logical groups:** Properties named `AND`, `OR`, or `NOT` hold a nested object that follows the same rules (more column predicates and/or nested `AND` / `OR` / `NOT`). **Operator keys** (allowed keys inside an operator object): `equals`, `not`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `contains`, `notContains`, `startsWith`, `endsWith`, `hasAny`. Use **GET /apilist** to discover valid column identifiers (for `data`, `sum`, and `filter`).
            - Not: Optional JSON **object** that restricts which rows are returned. Use the same shape for **POST** `filter` and **GET** `filter` (URL-encoded). **Filter types — column predicates:** Each property key is a column identifier (`table.column`). The value can be: - **Operator object:** keys are operator names and values are comparison values (for example `{"equals": "Live"}`, `{"in": ["a","b"]}`). - **Scalar** (string or number): shorthand for `equals`. - **Array:** shorthand for membership (`in`). **Filter types — logical groups:** Properties named `AND`, `OR`, or `NOT` hold a nested object that follows the same rules (more column predicates and/or nested `AND` / `OR` / `NOT`). **Operator keys** (allowed keys inside an operator object): `equals`, `not`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `contains`, `notContains`, `startsWith`, `endsWith`, `hasAny`. Use **GET /apilist** to discover valid column identifiers (for `data`, `sum`, and `filter`).
            - Or: Optional JSON **object** that restricts which rows are returned. Use the same shape for **POST** `filter` and **GET** `filter` (URL-encoded). **Filter types — column predicates:** Each property key is a column identifier (`table.column`). The value can be: - **Operator object:** keys are operator names and values are comparison values (for example `{"equals": "Live"}`, `{"in": ["a","b"]}`). - **Scalar** (string or number): shorthand for `equals`. - **Array:** shorthand for membership (`in`). **Filter types — logical groups:** Properties named `AND`, `OR`, or `NOT` hold a nested object that follows the same rules (more column predicates and/or nested `AND` / `OR` / `NOT`). **Operator keys** (allowed keys inside an operator object): `equals`, `not`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `contains`, `notContains`, `startsWith`, `endsWith`, `hasAny`. Use **GET /apilist** to discover valid column identifiers (for `data`, `sum`, and `filter`).
            - Value: Optional JSON **object** that restricts which rows are returned. Use the same shape for **POST** `filter` and **GET** `filter` (URL-encoded). **Filter types — column predicates:** Each property key is a column identifier (`table.column`). The value can be: - **Operator object:** keys are operator names and values are comparison values (for example `{"equals": "Live"}`, `{"in": ["a","b"]}`). - **Scalar** (string or number): shorthand for `equals`. - **Array:** shorthand for membership (`in`). **Filter types — logical groups:** Properties named `AND`, `OR`, or `NOT` hold a nested object that follows the same rules (more column predicates and/or nested `AND` / `OR` / `NOT`). **Operator keys** (allowed keys inside an operator object): `equals`, `not`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `contains`, `notContains`, `startsWith`, `endsWith`, `hasAny`. Use **GET /apilist** to discover valid column identifiers (for `data`, `sum`, and `filter`).
              - …
        - `nullReplacement` object
      - SimpleColumn: List of data columns to query
        - `alias` string
        - `friendly` string
        - `name` string
        - `type` string, required
  - `begin` string, required: Start date (YYYY-MM-DD) or keyword
  - `end` string: End date (YYYY-MM-DD); required when begin is an explicit date and ignored for keyword begin
  - `format` 'csv': Output format
  - `fullname` boolean: Include table prefix in column names
  - `includetoday` boolean: Include current day's partial data
  - `limit` integer: Max rows returned; defaults to the configured export maximum when omitted
  - `offset` integer: Row offset for pagination
  - `sort` string[]: Sort order (column direction)
  - `sum` string[]: Group-by columns
  - `reportName` string: Optional report name for identification
  - `filter` Filter: Optional JSON **object** that restricts which rows are returned. Use the same shape for **POST** `filter` and **GET** `filter` (URL-encoded). **Filter types — column predicates:** Each property key is a column identifier (`table.column`). The value can be: - **Operator object:** keys are operator names and values are comparison values (for example `{"equals": "Live"}`, `{"in": ["a","b"]}`). - **Scalar** (string or number): shorthand for `equals`. - **Array:** shorthand for membership (`in`). **Filter types — logical groups:** Properties named `AND`, `OR`, or `NOT` hold a nested object that follows the same rules (more column predicates and/or nested `AND` / `OR` / `NOT`). **Operator keys** (allowed keys inside an operator object): `equals`, `not`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `contains`, `notContains`, `startsWith`, `endsWith`, `hasAny`. Use **GET /apilist** to discover valid column identifiers (for `data`, `sum`, and `filter`).
  - `allownull` boolean
  - `formatdata` boolean
  - `nodatatiercheck` string
  - `period` string
  - `dataColumns` string[]

## Response `202`

Job accepted

- ExportResponse
  - `batchId` integer
  - `status` string
  - `submittedAt` string
  - `reportName` string

## Other responses

- `400`: Validation or invalid request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `413`: Payload Too Large — the query exceeds server memory limits. Use the asynchronous /batch endpoint for large requests.
- `429`: Rate limit exceeded
- `500`: Unexpected error
- `504`: Gateway Timeout — the query exceeded the synchronous request time limit.

---

[API](https://skmtc.dev/mountain/apis/mntn-ai-ops-reporting-api.md) - [All operations](https://skmtc.dev/mountain/apis/mntn-ai-ops-reporting-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mountain/apis/mntn-ai-ops-reporting-api/revisions/826e4445c45e?raw)
