---
title: "POST /ota-tasks"
method: POST
path: "/ota-tasks"
---

# POST /ota-tasks

`POST /ota-tasks`

Create an over-the-air (OTA) task to target a device.

## Request body

- object
  - `Description` string — The description of the over-the-air (OTA) task.
  - `S3Url` string, required — The URL to the Amazon S3 bucket where the over-the-air (OTA) task is stored.
  - `Protocol` 'HTTP' — The connection protocol the over-the-air (OTA) task uses to update the device.
  - `Target` String[] — The device targeted for the over-the-air (OTA) task.
  - `TaskConfigurationId` string — The identifier for the over-the-air (OTA) task configuration.
  - `OtaMechanism` 'PUSH' — The deployment mechanism for the over-the-air (OTA) task.
  - `OtaType` 'ONE_TIME' | 'CONTINUOUS', required — The frequency type for the over-the-air (OTA) task.
  - `OtaTargetQueryString` string — The query string to add things to the thing group.
  - `ClientToken` string — An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.
  - `OtaSchedulingConfig` object — Over-the-air (OTA) task scheduling config.
    - `EndBehavior` 'STOP_ROLLOUT' | 'CANCEL' | 'FORCE_CANCEL' — Specifies the end behavior for all task executions after a task reaches the selected <code>endTime</code>. If <code>endTime</code> is not selected when creating the task, then <code>endBehavior</code> does not apply.
    - `EndTime` string — The time an over-the-air (OTA) task will stop.
    - `MaintenanceWindows` ScheduleMaintenanceWindow[] — Maintenance window list for over-the-air (OTA) task scheduling config.
      - `DurationInMinutes` integer — Displays the duration of the next maintenance window.
      - `StartTime` string — Displays the start time of the next maintenance window.
    - `StartTime` string — The time an over-the-air (OTA) task will start.
  - `OtaTaskExecutionRetryConfig` object — Over-the-air (OTA) task retry config.
    - `RetryConfigCriteria` RetryConfigCriteria[] — The list of retry config criteria.
      - `FailureType` 'FAILED' | 'TIMED_OUT' | 'ALL' — Over-the-air (OTA) retry criteria failure type.
      - `MinNumberOfRetries` integer — The number of retries allowed for a failure type for the over-the-air (OTA) task.
  - `Tags` object — A set of key/value pairs that are used to manage the over-the-air (OTA) task.

## Response `201`

Success

- CreateOtaTaskResponse
  - `TaskId` string — The identifier of the over-the-air (OTA) task.
  - `TaskArn` string — The Amazon Resource Name (ARN) of the over-the-air (OTA) task.
  - `Description` string — A description of the over-the-air (OTA) task.

## Other responses

- `480` — AccessDeniedException
- `481` — ValidationException
- `482` — InternalServerException
- `483` — UnauthorizedException
- `484` — ConflictException
- `485` — ThrottlingException
- `486` — ResourceNotFoundException

---

[API](https://skmtc.net/aws/apis/iot-managed-integrations.md) · [All operations](https://skmtc.net/aws/apis/iot-managed-integrations/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/iot-managed-integrations/revisions/d043c13c812a/schema)
