---
title: "Create Task"
method: POST
path: "/v1/tasks/create-task"
tags: ["Tasks"]
---

# Create Task

`POST /v1/tasks/create-task`

## Headers

- `Idempotency-Key` string, nullable

## Request body

- CreateTaskRequest
  - `sport` 'soccer' | 'mma' | 'baseball' | 'american_football' | 'squash', required
  - `srt_zero_relative_smpte_timecode` string
  - `framerate` string, nullable
  - `webhook_id` string, nullable
  - `render_videos` RenderVideoOptions
    - `render_video` 'ffmpeg' | 'none', required
    - `retention_seconds` integer
  - `team_names` TeamNames
    - `home_team_name` string, required
    - `away_team_name` string, required
  - `otio` OtioOutputConfig
    - `target_url` string, nullable
    - `source_start_offset` integer
    - `metadata` object, nullable
  - `webhook_schema` 'otio' | 'none'
  - `wh_schema_config` OtioOutputConfig
    - `target_url` string, nullable
    - `source_start_offset` integer
    - `metadata` object, nullable
  - `max_life_hours` number
  - `name` string, nullable
  - `source_type` 'srt_listener' | 'hls_pull'
  - `source_url` string, nullable
  - `source_start` HlsSourceStart
    - `mode` 'live_edge' | 'offset' | 'program_date_time', required
    - `seconds` number, nullable
    - `timestamp` string, date-time, nullable

## Response `200`

Success

- CreateTaskResponse
  - `success` 'success' | 'failure', required
  - `task_id` string, nullable
  - `srt_url` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/narrative-sports/apis/narrative-sports-api.md) · [All operations](https://skmtc.net/narrative-sports/apis/narrative-sports-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/narrative-sports/narrative-sports-api/revisions/6a222f10647c/schema)
