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

# Run a flow in bulk

> Start a flow over many input sets and return one `task_id`. Poll `GET /v1/tasks/{task_id}`. Results are aligned to `inputs`: one element per input, in the same order, with `null` for misses — same contract as `POST /v1/enrichments/{id}/bulk-run`.

<Warning>
  This endpoint is **asynchronous**. It returns a `task_id` — poll [Get task status](/api-reference/endpoint/tasks-get-status) to retrieve your results. Task data expires after **24 hours**.
</Warning>

<Info>
  Results are **aligned to your inputs**: the `data` array has one element per
  input, in the same order you submitted them, with `null` for inputs that
  returned no data. So `len(data)` equals the number of inputs and `data[i]` is
  the result for input `i` — join results back to inputs by position.
</Info>


## OpenAPI

````yaml POST /v1/flows/{flow_id}/bulk-run
openapi: 3.1.0
info:
  title: Databar.ai API
  description: >-

    # Authentication


    Databar uses API keys to allow access to the API. You can find your API key
    in your workspace home page, but to use the REST API you’ll first need to
    schedule a call with us.

    Our API expects the API key to be included in all API requests to the server
    in the Header of your request with the key `x-apikey`.

    To find your API key, head over to your Databar workspace and click
    Integrations.


    **Example:**


    `bash

    curl https://api.databar.ai/v1/user/me -H x-apikey: {YOUR_API_KEY}`
  contact:
    email: info@databar.ai
  version: 0.1.2
servers:
  - url: https://api.databar.ai
    description: Production
security: []
paths:
  /v1/flows/{flow_id}/bulk-run:
    post:
      tags:
        - Flows
      summary: Bulk run a flow
      description: >-
        Start a flow over many input sets and return one `task_id`. Poll `GET
        /v1/tasks/{task_id}`. Results are aligned to `inputs`: one element per
        input, in the same order, with `null` for misses — same contract as
        `POST /v1/enrichments/{id}/bulk-run`.
      operationId: bulk_run_flow_v1_flows__flow_id__bulk_run_post
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            title: Flow ID
          description: Flow identifier, e.g. `fl_ab12cd34`
        - name: x-apikey
          in: header
          required: true
          schema:
            type: string
            title: API Key
            description: API Key for authentication
          description: API Key for authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkRunFlowIn'
            example:
              inputs:
                - domain: stripe.com
                - domain: databar.ai
      responses:
        '200':
          description: Task created — poll GET /v1/tasks/{task_id} for results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/app__api__v1__flow__Task'
              example:
                task_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                status: processing
        '403':
          description: Forbidden
        '404':
          description: Flow not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    BulkRunFlowIn:
      properties:
        inputs:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
          minItems: 1
          title: Inputs
          description: >-
            One input set per record, in the order you want results back. Each
            object maps flow input id → value string, same shape as `POST
            /flows/{id}/run`.
      type: object
      required:
        - inputs
      title: BulkRunFlowIn
    app__api__v1__flow__Task:
      properties:
        task_id:
          type: string
          title: Task Id
        status:
          type: string
          title: Status
      type: object
      required:
        - task_id
        - status
      title: Task
    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
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````