---
title: "Create a job target"
method: POST
path: "/api/jobs/{id}/targets"
tags: ["Targets"]
---

# Create a job target

`POST /api/jobs/{id}/targets`

## Request

- Base URL: `https://your-server`
- URL: `https://your-server/api/jobs/{id}/targets`
- Auth: OAuth 2
  - Authorization code: `/oauth/authorize`
  - Client credentials
  - Token URL: `/oauth/token`
- TypeScript: <https://skmtc.dev/sitecore/apis/jobs-api/docs/api/jobs/:id/targets/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new target for the specified job and returns the job target ID, for example `39605`.

## Path parameters

- `id` integer, required

## Request body

- EntityPostResource: Represents a resource for creating an entity.
  - `id` integer, nullable: Gets or sets the entity ID.
  - `identifier` string, nullable: Gets or sets the entity identifier.
  - `properties` object, nullable: Gets or sets the properties of the entity.
  - `relations` object, nullable: Gets or sets the relations of the entity.
  - `is_root_taxonomy_item` boolean, nullable: Gets or sets a value indicating whether the entity is a root taxonomy item.
  - `is_path_root` boolean, nullable: Gets or sets a value indicating whether the entity is a path root.
  - `entitydefinition` Link: Represents a link to a resource.
    - `href` string, nullable: Gets or sets the URI that points to the resource this link refers to.
    - `filename_properties` string[], nullable: Gets or sets the URI that points to the resource this link refers to.
    - `title` string, nullable: Gets or sets the title that describes this link.
    - `templated` boolean: Gets or sets a value indicating whether the contained URI is a template.
  - `is_system_owned` boolean: Gets or sets a value indicating whether the entity is system owned.
  - `inherits_security` boolean: Gets or sets a value indicating whether the entity inherits security.
  - `self` Link: Represents a link to a resource.
    - `href` string, nullable: Gets or sets the URI that points to the resource this link refers to.
    - `filename_properties` string[], nullable: Gets or sets the URI that points to the resource this link refers to.
    - `title` string, nullable: Gets or sets the title that describes this link.
    - `templated` boolean: Gets or sets a value indicating whether the contained URI is a template.

## Response `201`

Target successfully created.

## Other responses

- `400`: Request not valid (for example, less than or equal to zero), or target resource is null.
- `401`: Unauthorized request.
- `404`: Entity not found or user not authorized.

---

[API](https://skmtc.dev/sitecore/apis/jobs-api.md) - [All operations](https://skmtc.dev/sitecore/apis/jobs-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sitecore/apis/jobs-api/revisions/365efd74790f?raw)
