> This page is for mk.io.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://mediakind.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://mediakind.ferndocs.com/_mcp/server.

# Create a Job

PUT https://app.mk.io/api/v1/projects/{project_name}/media/transforms/{transform_name}/jobs/{job_name}
Content-Type: application/json

Create a new Job.

RBAC Capability Required: `ams.job.create`

Reference: https://mediakind.ferndocs.com/mkio/api/media/jobs/create-job

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `project_name` (string, required)
- `transform_name` (string, required)
- `job_name` (string, required)

### Body (application/json)

This endpoint expects a JobPutSchema.

- `properties` (JobPutProperties, required) — Properties of the job

## Response

### 201

Job was created

- `properties` (JobProperties, required) — Properties of the job
- `id` (string, optional) — Fully qualified resource ID for the resource. Ex - /subscriptions/\{subscriptionId}/resourceGroups/\{resourceGroupName}/providers/\{resourceProviderNamespace}/\{resourceType}/\{resourceName}
- `name` (string, optional) — The name of the resource
- `systemData` (SystemDataSchema, optional) — Metadata pertaining to creation and last modification of the resource.
- `type` (string, optional) — The type of the resource. E.g. "Microsoft.Media/mediaservices/assets"

## Errors

### 400 Bad Request Error

Bad Request

- `error` (ErrorDetail, required) — Pertinent information about the error
- `ref` (string, required) — A reference to the request that caused the error.
- `status` (integer, required) — The HTTP status code

### 401 Unauthorized Error

Unauthorized

- `error` (ErrorDetail, required) — Pertinent information about the error
- `ref` (string, required) — A reference to the request that caused the error.
- `status` (integer, required) — The HTTP status code

### 403 Forbidden Error

Forbidden

- `error` (ErrorDetail, required) — Pertinent information about the error
- `ref` (string, required) — A reference to the request that caused the error.
- `status` (integer, required) — The HTTP status code

### 404 Not Found Error

Not Found

- `error` (ErrorDetail, required) — Pertinent information about the error
- `ref` (string, required) — A reference to the request that caused the error.
- `status` (integer, required) — The HTTP status code

### 409 Conflict Error

Conflict

- `error` (ErrorDetail, required) — Pertinent information about the error
- `ref` (string, required) — A reference to the request that caused the error.
- `status` (integer, required) — The HTTP status code

### 422 Unprocessable Entity Error

Unprocessable Entity

- `error` (ErrorDetail, required) — Pertinent information about the error
- `ref` (string, required) — A reference to the request that caused the error.
- `status` (integer, required) — The HTTP status code

### 429 Too Many Requests Error

Too Many Requests

- `error` (ErrorDetail, required) — Pertinent information about the error
- `ref` (string, required) — A reference to the request that caused the error.
- `status` (integer, required) — The HTTP status code

### 500 Internal Server Error

Internal Server Error

- `error` (ErrorDetail, required) — Pertinent information about the error
- `ref` (string, required) — A reference to the request that caused the error.
- `status` (integer, required) — The HTTP status code

## Types

### JobPutProperties

- `input` (JobPutPropertiesInput, required) — The inputs of the Job.
- `outputs` (list of JobPutPropertiesOutputsItems, required) — The outputs for the Job.
- `correlationData` (map from string to any, optional) — Customer provided key, value pairs that will be returned in Job and JobOutput state events.
- `description` (string, optional, nullable) — The description of the Job.
- `priority` (enum, optional, default: Normal) — Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not set, the default is normal.
  - Allowed values: `High`, `Low`, `Normal`

### JobProperties

- `input` (JobPropertiesInput, required) — The inputs of the Job.
- `outputs` (list of JobPropertiesOutputsItems, required) — The outputs for the Job.
- `correlationData` (map from string to any, optional) — Customer provided key, value pairs that will be returned in Job and JobOutput state events.
- `created` (datetime, optional) — The creation date and time of the Job. Set by the system.
- `description` (string, optional, nullable) — The description of the Job.
- `endTime` (string, optional, nullable) — The UTC date and time at which this Job finished processing
- `lastModified` (datetime, optional) — The last modified date and time of the Job. Set by the system.
- `priority` (enum, optional, default: Normal) — Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not set, the default is normal.
  - Allowed values: `High`, `Low`, `Normal`
- `recording` (JobRecording, optional) — Recording status. Present only for recording jobs.
- `startTime` (datetime, optional, nullable) — The UTC date and time at which this Job started processing
- `state` (enum, optional, default: Queued) — The current state of the job.
  - Allowed values: `Canceled`, `Canceling`, `Error`, `Finished`, `Processing`, `Queued`, `Scheduled`

### SystemDataSchema

- `createdAt` (datetime, required) — The timestamp of resource creation (UTC).
- `createdBy` (string, required) — The identity that created the resource.
- `createdByType` (enum, required) — The type of identity that created the resource.
  - Allowed values: `User`, `Application`, `ManagedIdentity`, `Key`
- `internalId` (string, required) — The internal ID of the resource.
- `lastModifiedAt` (datetime, required) — The timestamp of resource last modification (UTC).
- `lastModifiedBy` (string, required) — The identity that last modified the resource.
- `lastModifiedByType` (enum, required) — The type of identity that last modified the resource.
  - Allowed values: `User`, `Application`, `ManagedIdentity`, `Key`

### ErrorDetail

- `code` (string, required) — The error code.
- `detail` (string, required) — The error message.
- `extraDetail` (map from string to any, optional) — Extra information regarding this error.

### JobPutPropertiesInput

The inputs of the Job.

### JobPutPropertiesOutputsItems

### JobPropertiesInput

The inputs of the Job.

### JobPropertiesOutputsItems

### JobRecording

- `actualEndTime` (string, optional, nullable) — The content range actually captured: end.
- `actualStartTime` (string, optional, nullable) — The content range actually captured: start.
- `details` (string, optional, nullable) — Error details; empty otherwise.
- `state` (enum, optional) — Current recording lifecycle state.
  - Allowed values: `Scheduled`, `Waiting`, `InProgress`, `Completed`, `Error`
- `targetEndTime` (string, optional, nullable) — The boundary the pod is currently targeting for clip end.
- `targetStartTime` (string, optional, nullable) — The boundary the pod is currently targeting for clip start.

### JobInputAsset

- `@odata.type` (string, required) — The discriminator for derived types.
- `assetName` (string, required) — The name of the input Asset
- `end` (JobInputAssetEnd, optional) — Defines a point on the timeline of the input media at which processing will end. Defaults to the end of the input media.
- `files` (list of string, optional) — List of files.
- `label` (string, optional) — A label that is assigned to a JobInputClip
- `start` (JobInputAssetStart, optional) — Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input media.

### JobInputHttp

- `@odata.type` (string, required) — The discriminator for derived types.
- `files` (list of string, required) — List of files. Required for JobInputHttp.
- `baseUri` (string, optional) — Base URI for HTTPS job input. It will be concatenated with provided file names. If no base uri is given, then the provided file list is assumed to be fully qualified uris.
- `end` (JobInputHttpEnd, optional) — (NOT IMPLEMENTED) Defines a point on the timeline of the input media at which processing will end. Defaults to the end of the input media.
- `label` (string, optional) — A label that is assigned to a JobInputClip
- `start` (JobInputHttpStart, optional) — (NOT IMPLEMENTED) Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input media.

### JobOutputAsset

- `@odata.type` (string, required) — The discriminator for derived types.
- `assetName` (string, required) — The name of the output Asset
- `endTime` (string, optional, nullable) — The UTC date and time at which this Output finished processing.
- `error` (JobError, optional) — Details of the Job Output if it is in error state.
- `label` (string, optional) — A label that is assigned to a JobOutput in order to help uniquely identify it.
- `progress` (integer, optional, nullable, default: 0) — If the JobOutput is in a Processing state, this contains the Job completion percentage. The value is an estimate and not intended to be used to predict Job completion times.
- `startTime` (string, optional, nullable) — The UTC date and time at which this Output began processing.
- `state` (enum, optional, nullable, default: Queued) — The current state of the job.
  - Allowed values: `Canceled`, `Canceling`, `Error`, `Finished`, `Processing`, `Queued`, `Scheduled`

### JobInputAssetEnd

Defines a point on the timeline of the input media at which processing will end. Defaults to the end of the input media.

### JobInputAssetStart

Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input media.

### JobInputHttpEnd

(NOT IMPLEMENTED) Defines a point on the timeline of the input media at which processing will end. Defaults to the end of the input media.

### JobInputHttpStart

(NOT IMPLEMENTED) Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input media.

### JobError

- `category` (enum, optional)
  - Allowed values: `Account`, `Configuration`, `Content`, `Download`, `Service`, `Upload`
- `code` (enum, optional)
  - Allowed values: `ConfigurationUnsupported`, `ContentMalformed`, `ContentUnsupported`, `DownloadNotAccessible`, `DownloadTransientError`, `IdentityUnsupported`, `ServiceError`, `ServiceTransientError`, `UploadNotAccessible`, `UploadTransientError`
- `message` (string, optional)
- `retry` (enum, optional)
  - Allowed values: `DoNotRetry`, `MayRetry`

### AbsoluteClipTime

- `@odata.type` (string, required) — The discriminator for derived types.
- `time` (string, optional) — The time position on the timeline of the input media. Specified as an ISO8601 period. e.g PT30S for 30 seconds.

### UtcClipTime

- `@odata.type` (string, required) — The discriminator for derived types.
- `time` (datetime, optional) — The time position on the timeline of the input media based on UTC time.
- `trigger` (ScteTrigger, optional) — SCTE-35 signal trigger. Recording starts/stops at the first matching signal.

### ScteTrigger

- `signalType` (enum, required) — Signal type.
  - Allowed values: `SCTE35`
- `filters` (list of list of map from string to any, optional) — Outer array is OR-combined; each inner array is AND-combined field matchers.
- `searchRange` (ScteTriggerSearchRange, optional) — Bounds the signal search to [anchor+startOffset, anchor+endOffset]. Anchor is `time` if present, else dispatch_time (start) or resolved_start (end).

### ScteTriggerSearchRange

- `endOffset` (string, required) — Closes the signal-search window relative to the anchor (ISO 8601 Duration, e.g. "PT2M").
- `startOffset` (string, required) — Opens the signal-search window relative to the anchor (ISO 8601 Duration; negative allowed, e.g. "-PT5M").

## Examples

**Request**

```json
{
  "properties": {
    "input": {
      "@odata.type": "string",
      "assetName": "string"
    },
    "outputs": [
      {
        "@odata.type": "string",
        "assetName": "string"
      }
    ]
  }
}
```

**Response**

```json
{
  "properties": {
    "input": {
      "@odata.type": "string",
      "assetName": "string",
      "end": {
        "@odata.type": "string",
        "time": "string"
      },
      "files": [
        "string"
      ],
      "label": "string",
      "start": {
        "@odata.type": "string",
        "time": "string"
      }
    },
    "outputs": [
      {
        "@odata.type": "string",
        "assetName": "string",
        "endTime": "string",
        "error": {
          "category": "Account",
          "code": "ConfigurationUnsupported",
          "message": "string",
          "retry": "DoNotRetry"
        },
        "label": "string",
        "progress": 0,
        "startTime": "string",
        "state": "Queued"
      }
    ],
    "correlationData": {},
    "created": "2024-01-15T09:30:00Z",
    "description": "string",
    "endTime": "string",
    "lastModified": "2024-01-15T09:30:00Z",
    "priority": "Normal",
    "recording": {
      "actualEndTime": "string",
      "actualStartTime": "string",
      "details": "string",
      "state": "Scheduled",
      "targetEndTime": "string",
      "targetStartTime": "string"
    },
    "startTime": "2024-01-15T09:30:00Z",
    "state": "Queued"
  },
  "id": "string",
  "name": "name",
  "systemData": {
    "createdAt": "2024-01-15T09:30:00Z",
    "createdBy": "string",
    "createdByType": "User",
    "internalId": "string",
    "lastModifiedAt": "2024-01-15T09:30:00Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "User"
  },
  "type": "string"
}
```

**SDK Code**

```python
import requests

url = "https://app.mk.io/api/v1/projects/project_name/media/transforms/transform_name/jobs/job_name"

payload = { "properties": {
        "input": {
            "@odata.type": "string",
            "assetName": "string"
        },
        "outputs": [
            {
                "@odata.type": "string",
                "assetName": "string"
            }
        ]
    } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.mk.io/api/v1/projects/project_name/media/transforms/transform_name/jobs/job_name';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"properties":{"input":{"@odata.type":"string","assetName":"string"},"outputs":[{"@odata.type":"string","assetName":"string"}]}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.mk.io/api/v1/projects/project_name/media/transforms/transform_name/jobs/job_name"

	payload := strings.NewReader("{\n  \"properties\": {\n    \"input\": {\n      \"@odata.type\": \"string\",\n      \"assetName\": \"string\"\n    },\n    \"outputs\": [\n      {\n        \"@odata.type\": \"string\",\n        \"assetName\": \"string\"\n      }\n    ]\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.mk.io/api/v1/projects/project_name/media/transforms/transform_name/jobs/job_name")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"properties\": {\n    \"input\": {\n      \"@odata.type\": \"string\",\n      \"assetName\": \"string\"\n    },\n    \"outputs\": [\n      {\n        \"@odata.type\": \"string\",\n        \"assetName\": \"string\"\n      }\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://app.mk.io/api/v1/projects/project_name/media/transforms/transform_name/jobs/job_name")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"properties\": {\n    \"input\": {\n      \"@odata.type\": \"string\",\n      \"assetName\": \"string\"\n    },\n    \"outputs\": [\n      {\n        \"@odata.type\": \"string\",\n        \"assetName\": \"string\"\n      }\n    ]\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://app.mk.io/api/v1/projects/project_name/media/transforms/transform_name/jobs/job_name', [
  'body' => '{
  "properties": {
    "input": {
      "@odata.type": "string",
      "assetName": "string"
    },
    "outputs": [
      {
        "@odata.type": "string",
        "assetName": "string"
      }
    ]
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.mk.io/api/v1/projects/project_name/media/transforms/transform_name/jobs/job_name");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"properties\": {\n    \"input\": {\n      \"@odata.type\": \"string\",\n      \"assetName\": \"string\"\n    },\n    \"outputs\": [\n      {\n        \"@odata.type\": \"string\",\n        \"assetName\": \"string\"\n      }\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["properties": [
    "input": [
      "@odata.type": "string",
      "assetName": "string"
    ],
    "outputs": [
      [
        "@odata.type": "string",
        "assetName": "string"
      ]
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.mk.io/api/v1/projects/project_name/media/transforms/transform_name/jobs/job_name")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```