---
title: "Create multiple job targets at once"
method: POST
path: "/api/jobs/{id}/targets/bulk"
tags: ["Targets"]
---

# Create multiple job targets at once

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

## Request

- Base URL: `https://your-server`
- URL: `https://your-server/api/jobs/{id}/targets/bulk`
- 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/bulk/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates new targets for the specified job and returns the job target IDs.

## Path parameters

- `id` integer, required

## Request body

- EntityPostCollectionResource: Represents a collection resource for posting entities. Inherits from Stylelabs.M.Base.Web.Api.Models.ListResource`1.
  - `items` EntityPostResource[], nullable: Gets or sets the list of items.
    - `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 `200`

Successful operation.

- EntityCreatedCollectionResource: Represents a collection resource of entities that have been created. Inherits from Stylelabs.M.Base.Web.Api.Models.ListResource`1.
  - `items` EntityCreatedResource[], nullable: Gets or sets the list of items.
    - `id` integer: The unique identifier for the entity.
    - `identifier` string, nullable: The identifier string for the entity.
    - `link` 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.
    - `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.
  - `total_items` integer, nullable: Gets or sets the total number of items.
  - `returned_items` integer, nullable: Gets or sets the number of returned items.
  - `offset` integer, nullable: Gets or sets the offset of the items.
  - `next` 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.
  - `previous` 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.
  - `identifier` string, nullable: Gets or sets the identifier of the resource.
  - `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.

## Other responses

- `201`: Targets successfully created.
- `400`: Request not valid (for example, less than or equal to zero), or target resources are 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)
