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

# Update a job target

`PUT /api/jobs/{id}/targets/{targetId}`

## Request

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

Updates a target associated with a job. It ensures that both the job and target exist and that the user has access to them. Properties or relations not included in the request will be set to null.

## Path parameters

- `id` integer, required
- `targetId` integer, required

## Request body

- EntityResource: Represents an entity resource with various properties, relations and metadata.
  - `id` integer: The ID for the entity, for example `39752`.
  - `identifier` string, nullable: The identifier for the entity.
  - `cultures` string[], nullable: The cultures associated with the entity, for example `en-US`.
  - `properties` object, nullable: The properties of the entity.
  - `relations` object, nullable: The relations of the entity.
  - `created_by` 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.
  - `created_on` string, date-time: The date and time when the entity was created.
  - `modified_by` 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.
  - `modified_on` string, date-time: The date and time when the entity was last modified.
  - `locked_by` 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.
  - `locked_on` string, date-time, nullable: The date and time when the entity was locked.
  - `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.
  - `copy` 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.
  - `copyasync` 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.
  - `permissions` 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.
  - `requested_permissions` object, nullable: The requested permissions with identification if a certain user has permission.
  - `lifecycle` 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.
  - `saved_selections` 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.
  - `roles` 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.
  - `annotations` 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_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.
  - `inherits_security` boolean: Gets or sets a value indicating whether the entity inherits security.
  - `is_system_owned` boolean: Gets or sets a value indicating whether the entity is system owned.
  - `version` integer: The version of the entity.
  - `full` 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.
  - `modules` string[], nullable: The modules associated with the entity.
  - `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 `204`

Successful operation.

## Other responses

- `400`: Request not valid or error during operation.
- `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)
