---
title: "Update a job"
method: PATCH
path: "/jobs/{jobId}"
tags: ["jobs"]
---

# Update a job

`PATCH /jobs/{jobId}`

## Request

- Base URL: `https://api.smartrecruiters.com`
- URL: `https://api.smartrecruiters.com/jobs/{jobId}`
- Auth: one of:
  - API key in header `x-smarttoken`
  - OAuth 2
    - Authorization code: `https://www.smartrecruiters.com/identity/oauth/allow`
    - Token URL: `https://api.smartrecruiters.com/identity/oauth/token` scopes: `jobs_manage`

Update a job per [JSON Merge Patch specification (RFC 6902)](https://datatracker.ietf.org/doc/html/rfc6902). The endpoint ignores all absent job properties.

- updating of a field might trigger job approval
- modification date is changed
- all validations rules are applied for required fields and dependencies

## Usage Examples

### Upsert Free Text Property
```json
[
  {
    "op":"add",
    "path":"/properties/-",
    "value":{
      "id":"5ec29396d4a5de40e44b1f5a",
      "value":{
        "label":"Some text"
      }
    }
  }
]
```
### Upsert Drop-down Property

```json
[
  {
    "op":"add",
    "path":"/properties/-",
    "value":{
      "id":"5ec29396d4a5de40e44b1f5a",
      "value":{
        "id":"XXX"
      }
    }
  }
]
```

### Upsert Drop-down Property via externalCode

```json
[
  {
    "op":"add",
    "path":"/properties/-",
    "value":{
      "id":"5ec29396d4a5de40e44b1f5a",
      "value":{
        "externalCode":"FULL_TIME"
      }
    }
  }
]
```

### Remove a Property

```json
[
  {
    "op":"add",
    "path":"/properties/-",
    "value":{
      "id":"5ec29396d4a5de40e44b1f5a",
      "value":{}
    }
  }
]
```

### Upsert Compensation
Create/update job `compensation` field. Sets `min`, `currency` and `period` values but leaves `max` null.
```json
[
  {
    "op":"add",
    "path":"/compensation",
    "value":{
      "min":25,
      "max":null,
      "currency":"PLN",
      "period":"HOURLY"
    }
  }
]
```

### Upsert Compensation Properties
Update job `compensation.min` and `compensation.currency` fields but leave current `compensation.max` and `compensation.period` intact.

*Note: The compensation field must not be null. Use the previous approach if that's the case*

```json
[
  {
    "op": "add",
    "path": "/compensation/min",
    "value": 425
  },
  {
    "op": "add",
    "path": "/compensation/currency",
    "value": "USD"
  }
]
```
### Delete Compensation Properties
Delete the `currency.min` field but leave `compensation.max`, `compensation.currency` and `compensation.period` intact.
```json
[
  {
    "op": "remove",
    "path": "/compensation/min"
  }
]
```

## Request body

- Path[]
  - `path` string, required

## Response `200`

Updated job

- JobDetails
  - `id` string
  - `title` string
  - `refNumber` string
  - `createdOn` string, date-time
  - `updatedOn` string, date-time: Job modification date
  - `lastActivityOn` string, date-time: Indicates last activity associated with a job
  - `department` Department
    - `id` string
    - `label` string, required
    - `description` string
  - `location` Location
    - `country` string
    - `countryCode` string, required
    - `regionCode` string
    - `region` string
    - `city` string, required
    - `address` string, address
    - `postalCode` string
    - `longitude` string
    - `latitude` string
    - `manual` boolean
    - `remote` boolean
    - `hybrid` boolean
    - `hybridDescription` string
  - `status` 'CREATED' | 'SOURCING' | 'FILLED' | 'INTERVIEW' | 'OFFER' | 'CANCELLED' | 'ON_HOLD' | 'OTHER'
  - `postingStatus` 'PUBLIC' | 'INTERNAL' | 'NOT_PUBLISHED' | 'PRIVATE'
  - `targetHiringDate` string, date-time
  - `hiringProcessId` string: ID of hiring process associated with this job
  - `industry` Property
    - `id` string, required
    - `label` string
  - `function` Property
    - `id` string, required
    - `label` string
  - `typeOfEmployment` Property
    - `id` string, required
    - `label` string
  - `experienceLevel` Property
    - `id` string, required
    - `label` string
  - `eeoCategory` Property
    - `id` string, required
    - `label` string
  - `template` boolean
  - `creator` UserIdentity
    - `id` string
    - `firstName` string
    - `lastName` string
  - `compensation` Compensation
    - `min` number, double, nullable
    - `max` number, double, nullable
    - `currency` string, nullable
    - `period` 'HOURLY' | 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'YEARLY', nullable: The time period to which the proposed min and max compensation values apply
  - `jobAd` JobAdInput
    - `sections` JobAdSections
      - `companyDescription` JobAdSection
        - `title` string
        - `text` string
      - `jobDescription` JobAdSection
        - `title` string
        - `text` string
      - `qualifications` JobAdSection
        - `title` string
        - `text` string
      - `additionalInformation` JobAdSection
        - `title` string
        - `text` string
      - `videos` JobAdVideos
        - `urls` string[]
    - `language` Language
      - `code` string, required
      - `label` string
      - `labelNative` string
  - `properties` JobProperty[]
    - `id` string, required
    - `key` string
    - `label` string
    - `value` JobPropertyValue, required
      - `id` string
      - `externalCode` string: Cross-system code identifying the value in an external system, when one is set.
      - `label` string
  - `actions` object
    - `hiringTeam` Action
      - `url` string, required
      - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'OPTIONS' | 'DELETE' | 'HEAD', required
    - `publications` Action
      - `url` string, required
      - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'OPTIONS' | 'DELETE' | 'HEAD', required
    - `positions` Action
      - `url` string, required
      - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'OPTIONS' | 'DELETE' | 'HEAD', required
    - `applyOnWeb` Action
      - `url` string, required
      - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'OPTIONS' | 'DELETE' | 'HEAD', required
    - `details` Action
      - `url` string, required
      - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'OPTIONS' | 'DELETE' | 'HEAD', required

## Other responses

- `400`: with codes * **DEPARTMENT_NOT_FOUND** when provided department does not exist, * **INDUSTRY_NOT_FOUND** when provided industry does not exist, * **FUNCTION_NOT_FOUND** when provided function does not exist, * **TYPE_OF_EMPLOYMENT_NOT_FOUND** when provided type of employment does not exist, * **JOB_AD_LANGUAGE_NOT_FOUND** when provided job ad language does not exist, * **EEO_CATEGORY_NOT_FOUND** when provided eeo category does not exist, * **LOCATION_IDENTIFIER_NOT_FOUND** when provided location `identifier` does not match any predefined location for this company * **JOB_PROPERTY_REQUIRED** when some job property is required, * **INVALID_JOB_PROPERTY_VALUE_ID** when provided job property value id does not exist for required property, * **INVALID_JOB_PROPERTY_VALUE_TYPE** when invalid value type is used for job property, * **VALUE_INACTIVE** when job property's value is not active and cannot be set. * **INVALID_TEXT_FORMAT** when job property's value contains invalid text * **INVALID_BRAND_VALUE** when provided brand value is invalid * **TYPE_OF_EMPLOYMENT_NOT_ALLOWED** when provided type of employment is not allowed in country * **PROPERTY_INVALID** when one of provided properties contains invalid characters
- `401`: Job access denied
- `403`: with code * **JOB_TEMPLATES_MANAGEMENT_FORBIDDEN** when not allowed to change job to a job template.
- `422`: Input validation fails with codes * **COMPENSATION_INVALID_CURRENCY** – the currency code provided is invalid or not supported. * **TAGLINES_EXCEEDS_SECTION_SIZE** – Combined Additional Information and Job Ad Footers exceed the maximum allowed length.

---

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