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

# Create Brand Bulk Load Run

> Accept a URL list, persist the whole run durably, return a run id.

Nothing expensive happens on this request: two INSERTs and one queue push.
The run is durable before the 202 is written, which is exactly what the
operator's old submit/429/backoff loop never had — a Railway deploy one
minute later resumes it instead of losing it.



## OpenAPI

````yaml /openapi.json post /api/v1/admin/brand-bulk-load
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/admin/brand-bulk-load:
    post:
      tags:
        - Admin Brand Bulk Load
        - Admin
      summary: Create Brand Bulk Load Run
      description: >-
        Accept a URL list, persist the whole run durably, return a run id.


        Nothing expensive happens on this request: two INSERTs and one queue
        push.

        The run is durable before the 202 is written, which is exactly what the

        operator's old submit/429/backoff loop never had — a Railway deploy one

        minute later resumes it instead of losing it.
      operationId: create_brand_bulk_load_run_api_v1_admin_brand_bulk_load_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrandBulkLoadCreateRequest'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandBulkLoadCreateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BrandBulkLoadCreateRequest:
      properties:
        urls:
          items:
            anyOf:
              - type: string
              - $ref: '#/components/schemas/BulkLoadUrlEntry'
          type: array
          maxItems: 5000
          minItems: 1
          title: Urls
        market:
          $ref: '#/components/schemas/BrandMarketSelection'
        max_spend_usd:
          type: number
          exclusiveMinimum: 0
          title: Max Spend Usd
      type: object
      required:
        - urls
        - market
        - max_spend_usd
      title: BrandBulkLoadCreateRequest
    BrandBulkLoadCreateResponse:
      properties:
        run_id:
          type: string
          title: Run Id
        status:
          type: string
          title: Status
        accepted_urls:
          type: integer
          title: Accepted Urls
        duplicates_dropped:
          type: integer
          title: Duplicates Dropped
        invalid_urls:
          items:
            type: string
          type: array
          title: Invalid Urls
        max_spend_usd:
          type: number
          title: Max Spend Usd
        estimated_cost_per_brand_usd:
          type: number
          title: Estimated Cost Per Brand Usd
        estimated_total_cost_usd:
          type: number
          title: Estimated Total Cost Usd
        spend_basis:
          type: string
          title: Spend Basis
        spend_note:
          type: string
          title: Spend Note
        eta:
          additionalProperties: true
          type: object
          title: Eta
      type: object
      required:
        - run_id
        - status
        - accepted_urls
        - duplicates_dropped
        - invalid_urls
        - max_spend_usd
        - estimated_cost_per_brand_usd
        - estimated_total_cost_usd
        - spend_basis
        - spend_note
        - eta
      title: BrandBulkLoadCreateResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BulkLoadUrlEntry:
      properties:
        url:
          type: string
          maxLength: 500
          minLength: 3
          title: Url
        name:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
          title: Name
      type: object
      required:
        - url
      title: BulkLoadUrlEntry
      description: A URL with an optional operator-supplied Brand name.
    BrandMarketSelection:
      properties:
        country_code:
          type: string
          maxLength: 2
          minLength: 2
          title: Country Code
        country_name:
          type: string
          maxLength: 100
          minLength: 1
          title: Country Name
        location_code:
          type: integer
          title: Location Code
        language_locale:
          type: string
          maxLength: 10
          minLength: 2
          title: Language Locale
        language_code:
          type: string
          maxLength: 10
          minLength: 2
          title: Language Code
      type: object
      required:
        - country_code
        - country_name
        - location_code
        - language_locale
        - language_code
      title: BrandMarketSelection
    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:
    HTTPBearer:
      type: http
      scheme: bearer

````