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

# Create a mission

> Creates a mission and dispatches its tasks to collectors in the Capibo
app. Credits are only charged as videos are accepted. Pass
`"dispatch": false` to create a draft you can launch later.




## OpenAPI

````yaml /openapi.yaml post /missions
openapi: 3.1.0
info:
  title: Capibo API
  version: '1.0'
  description: |
    Plan data-collection missions, track quality review, and pull accepted
    egocentric videos into your robot-training pipeline.
  contact:
    name: Capibo support
    email: support@capibo.work
servers:
  - url: https://api.capibo.work/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Missions
    description: Create and manage data-collection missions.
  - name: Planning
    description: Price a mission before you launch it.
  - name: Datasets
    description: Accepted videos, grouped per mission.
  - name: Videos
    description: Individual submissions and their quality-review results.
  - name: Exports
    description: Package a dataset into a training format and deliver it.
  - name: Billing
    description: Prepaid credits, transactions and promo codes.
  - name: Usage
    description: Collection volume and spend over time.
  - name: Webhooks
    description: Get notified when videos are accepted, missions finish and more.
paths:
  /missions:
    post:
      tags:
        - Missions
      summary: Create a mission
      description: |
        Creates a mission and dispatches its tasks to collectors in the Capibo
        app. Credits are only charged as videos are accepted. Pass
        `"dispatch": false` to create a draft you can launch later.
      operationId: createMission
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MissionCreate'
      responses:
        '201':
          description: The created mission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mission'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/InsufficientCredits'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      description: >-
        A unique key (e.g. a UUID). Retrying with the same key returns the
        original response instead of doing the work twice.
      schema:
        type: string
        format: uuid
  schemas:
    MissionCreate:
      type: object
      required:
        - name
        - tasks
      properties:
        name:
          type: string
          example: Household laundry folding
        description:
          type: string
          example: >-
            Egocentric videos of people folding everyday garments for a
            clothes-folding robot policy.
        regions:
          type: array
          items:
            $ref: '#/components/schemas/Region'
          example:
            - US
            - PT
            - MX
        tasks:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/TaskInput'
        guidelines:
          type: array
          description: Recording rules applied to every task.
          items:
            type: string
          example:
            - Chest- or head-mounted phone, landscape, 1080p or higher
            - Both hands visible for the whole clip
        dispatch:
          type: boolean
          default: true
          description: Send tasks to collectors immediately. `false` creates a `draft`.
    Mission:
      type: object
      properties:
        id:
          type: string
          example: MSN-1042
        name:
          type: string
          example: Household laundry folding
        description:
          type: string
        status:
          $ref: '#/components/schemas/MissionStatus'
        regions:
          type: array
          items:
            $ref: '#/components/schemas/Region'
        target:
          type: integer
          description: Accepted videos to collect across all tasks.
          example: 10000
        accepted:
          type: integer
          example: 7339
        progress:
          type: integer
          description: Percent of target accepted.
          example: 73
        cost:
          type: number
          description: USD charged so far.
          example: 24783.4
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/Task'
        dataset_id:
          type:
            - string
            - 'null'
          description: Set once the first video is accepted.
          example: DS-301
        started_at:
          type: string
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
    Region:
      type: string
      description: ISO 3166-1 alpha-2 country code (UK for the United Kingdom).
      enum:
        - US
        - CA
        - MX
        - BR
        - UK
        - DE
        - ES
        - PT
        - PL
        - IN
    TaskInput:
      type: object
      required:
        - name
        - videos
      properties:
        name:
          type: string
          example: Fold t-shirt
        instructions:
          type: string
          description: >-
            Shown to collectors in the Capibo app. Generated from `name` if
            omitted.
          example: Fold sleeves in, then fold the shirt in thirds lengthwise.
        videos:
          type: integer
          minimum: 1
          description: Accepted videos to collect for this task.
          example: 900
        duration:
          type: array
          description: Target clip length in seconds, `[min, max]`.
          items:
            type: integer
          minItems: 2
          maxItems: 2
          example:
            - 20
            - 45
        labels:
          type: array
          items:
            type: string
          example:
            - t-shirt
            - fold
            - two-hand
    MissionStatus:
      type: string
      enum:
        - draft
        - dispatching
        - active
        - paused
        - completed
    Task:
      allOf:
        - $ref: '#/components/schemas/TaskInput'
        - type: object
          properties:
            id:
              type: string
              example: T-2
            price:
              type: number
              description: USD per accepted video.
              example: 3.19
            accepted:
              type: integer
              example: 1612
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
          properties:
            type:
              type: string
              enum:
                - invalid_request
                - authentication_error
                - permission_denied
                - not_found
                - conflict
                - payment_required
                - rate_limited
                - api_error
            code:
              type: string
              description: Machine-readable reason.
            message:
              type: string
              description: Human-readable explanation.
            param:
              type: string
              description: The parameter that caused the error
              if any.: null
  responses:
    BadRequest:
      description: The request is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: invalid_request
              code: parameter_invalid
              message: tasks[0].videos must be at least 1.
              param: tasks[0].videos
    Unauthorized:
      description: The API key is missing, invalid or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: authentication_error
              code: api_key_invalid
              message: Invalid API key.
    InsufficientCredits:
      description: Your balance doesn't cover the mission's estimated cost.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: payment_required
              code: insufficient_credits
              message: Estimated cost $26,412.00 exceeds your balance of $18,420.55.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key from **Settings → API keys**, e.g. `cpb_live_…` or
        `cpb_test_…`.

````

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