---
title: "POST /v1/mission/create-batch"
method: POST
path: "/v1/mission/create-batch"
tags: ["Mission"]
---

# POST /v1/mission/create-batch

`POST /v1/mission/create-batch`

## Request

- Base URL: `https://api.bearrobotics.ai`
- URL: `https://api.bearrobotics.ai/v1/mission/create-batch`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bearrobotics/apis/bear-cloud-api/docs/v1/mission/create-batch/post.ts> (a function with typed inputs; its response is checked against the schema)

Atomically create multiple missions.

 The returned mission IDs match the order of the missions in the request.

 This call will fail if:
 - Another mission is running or queued.
 - The robot is unable to start a mission.

 If any mission in the batch fails validation or creation, no missions are created.

## Request body

- CreateMissionBatchRequest: Request object for atomically creating multiple missions
  - `robotId` string, required: Unique identifier of the robot
  - `missions` Mission[], required: The missions to create, in request order.
    - union: Represents a mission that can be assigned to a robot. Only one mission type can be set per Mission instance.
      - object
        - `baseMission` union, required: Base missions are applicable to all robot families
          - object
            - `navigateMission` NavigateMission, required: A simple mission with a predefined goal
              - …
          - object
            - `navigateAutoMission` NavigateAutoMission, required: A mission that automatically selects the best available goal from the provided list
              - …
      - object
        - `serviMission` union, required: Servi missions are specific to the Servi robot family
          - object
            - `deliveryMission` DeliveryMission, required: A delivery mission that navigates to one or more goals, stopping at each for a time limit or until weight is removed
              - …
          - object
            - `bussingMission` BussingMission, required: A bussing mission that navigates to one or more goals, stopping at each for a time limit or until weight is added
              - …
          - object
            - `deliveryPatrolMission` DeliveryPatrolMission, required: A delivery patrol mission that continuously loops through goals, stopping at each for a time limit until all weight is removed
              - …
          - object
            - `bussingPatrolMission` BussingPatrolMission, required: A bussing patrol mission that continuously loops through goals, stopping at each for a time limit until weight exceeds a threshold
              - …
          - object
            - `navigateMission` NavigateMission, required: A simple mission with a predefined goal
              - …
          - object
            - `navigateAutoMission` NavigateAutoMission, required: A mission that automatically selects the best available goal from the provided list
              - …
      - object
        - `cartiMission` union, required: Carti missions are specific to the Carti robot family
          - object
            - `traverseMission` TraverseMission, required: A traverse mission that navigates to one or more goals
              - …
          - object
            - `traversePatrolMission` TraversePatrolMission, required: A traverse patrol mission that navigates to one or more goals and continuously loops through the goals stopping at each for a time limit
              - …
          - object
            - `navigateMission` NavigateMission, required: A simple mission with a predefined goal
              - …
          - object
            - `navigateAutoMission` NavigateAutoMission, required: A mission that automatically selects the best available goal from the provided list
              - …

## Response `200`

OK

- CreateMissionBatchResponse
  - `missionIds` string[]: The IDs of the created missions, in the same order as the request.

## Other responses

- `400`: Bad Request, usually caused by malfored request body.
- `401`: Unauthorized credentials, ensure the JWT is correct and up to date.
- `500`: Internal Server Error
- `503`: Service is temporarily unavailable, which can usually be resolved by backoff retries.
- `504`: Server-side timeout, usually caused by the failure to send/receive commands/responses to the designated robot.

---

[API](https://skmtc.dev/bearrobotics/apis/bear-cloud-api.md) - [All operations](https://skmtc.dev/bearrobotics/apis/bear-cloud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bearrobotics/apis/bear-cloud-api/revisions/b90843b624b5?raw)
