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

# Create Task

`POST /v1/tasks/create-task`

## Request

- Base URL: `https://api.narrative-sports.com`
- URL: `https://api.narrative-sports.com/v1/tasks/create-task`
- Auth: HTTP bearer

## Headers

- `Idempotency-Key` string, nullable

## Request body

- CreateTaskRequest
  - `sport` 'soccer' | 'mma' | 'baseball' | 'american_football' | 'squash' | 'cheer' | 'pickleball' | 'hockey' | 'volleyball', required
  - `srt_zero_relative_smpte_timecode` string
  - `framerate` string, nullable
  - `webhook_id` string, nullable
  - `render_videos` RenderVideoOptions, nullable
    - `render_video` 'ffmpeg' | 'none', required
    - `retention_seconds` integer
  - `team_names` TeamNames, nullable
    - `home_team_name` string, required
    - `away_team_name` string, required
  - `otio` OtioOutputConfig, nullable
    - `target_url` string, nullable
    - `source_start_offset` integer
    - `metadata` object, nullable
  - `webhook_schema` 'otio' | 'none'
  - `wh_schema_config` OtioOutputConfig, nullable
    - `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, nullable
    - `mode` 'live_edge' | 'offset' | 'program_date_time', required
    - `seconds` number, nullable
    - `timestamp` string, date-time, nullable
  - `scheduled_start_at` string, date-time, nullable

## Response `200`

Success

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

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-06** `bab6af886f8e`: 1 info
  - added the new `volleyball` enum value to the request property `sport`
- **2026-09-05** `a77826615086`: 2 info
  - added the new optional request property `scheduled_start_at`
  - added the optional property `scheduled_start_at` to the response with the `200` status
- **2026-09-02** `27c40dc8db48`: 1 info
  - added the new `hockey` enum value to the request property `sport`
- **2026-08-21** `86b5690d9e38`: 1 info
  - added the new `pickleball` enum value to the request property `sport`
- **2026-08-17** `dc4af14374f8`: 1 info
  - added the new `cheer` enum value to the request property `sport`

[Operation history](https://skmtc.dev/narrative-sports/apis/narrative-sports-api/changes/v1/tasks/create-task/post.md)

---

[API](https://skmtc.dev/narrative-sports/apis/narrative-sports-api.md) - [All operations](https://skmtc.dev/narrative-sports/apis/narrative-sports-api/llms.txt) - [OpenAPI document](https://skmtc.dev/narrative-sports/apis/narrative-sports-api/revisions/bab6af886f8e?raw)
