> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hirempire.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update job

> Update an existing job — partial update, send only the fields you want to change

Send only the fields you want to change. All fields except `job_id` are optional. The job must belong to your workspace.

## Request Body

<ParamField body="job_id" type="string" required placeholder="Job UUID">
  The job to update.
</ParamField>

<ParamField body="status" type="string">
  New status. Accepted input values: `Pending` `Active` `Paused` `Hired` `Closed`. `Pending` maps to `draft`. `Hired` is accepted as a **deprecated alias** for `Closed`. Storage and response always use the canonical lowercase value: `draft` `active` `paused` `closed`.
</ParamField>

<ParamField body="job_title" type="string">New job title.</ParamField>

<ParamField body="job_description" type="string">New job description (markdown).</ParamField>

<ParamField body="department" type="string">Department.</ParamField>

<ParamField body="industry" type="string">Industry classification.</ParamField>

<ParamField body="job_country" type="string">Country.</ParamField>

<ParamField body="city" type="string">City (or `null` to clear).</ParamField>

<ParamField body="workplace" type="string">One of: `On-site` `Remote` `Hybrid` (stored lowercase).</ParamField>

<ParamField body="job_type" type="string">One of: `Full-time` `Part-time` `Contract` `Freelance` `Internship` `Temporary` `Project-based`.</ParamField>

<ParamField body="career_level" type="string">One of: `Junior` `Mid-level` `Senior` `Team Leader` `Manager` `Director` `VP` `C-level`.</ParamField>

<ParamField body="salary" type="number">New salary amount.</ParamField>

<ParamField body="currency" type="string">Three-letter ISO currency code.</ParamField>

<ParamField body="salary_period" type="string">One of: `Per hour` `Per day` `Per week` `Bi-weekly` `Per month` `Per year`.</ParamField>

<ParamField body="hide_salary" type="boolean">Hide salary on the public board.</ParamField>

<ParamField body="questions" type="object">Replace the application form configuration. See [Get specific job](/developers/jobs/get-specific-job) for the `{ fields, custom }` structure.</ParamField>

<Info>
  At least one field beyond `job_id` must be provided. Otherwise the response is `400 At least one updatable field must be provided`.
</Info>

## Authentication

<ResponseField name="Authorization" type="string" required>
  Bearer authentication header of the form `Bearer <token>`, where `<token>` is your auth token.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request PATCH 'https://api.hirempire.com/v1/update-job' \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "job_id": "xyz456abc123",
      "status": "Active"
  }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.hirempire.com/v1/update-job', {
    method: 'PATCH',
    headers: {
      'Authorization': 'Bearer YOUR_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      job_id: "xyz456abc123",
      status: "Active"
    })
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests
  import json

  url = "https://api.hirempire.com/v1/update-job"
  headers = {
      "Authorization": "Bearer YOUR_TOKEN",
      "Content-Type": "application/json"
  }

  payload = {
      "job_id": "xyz456abc123",
      "status": "Active"
  }

  response = requests.patch(url, headers=headers, data=json.dumps(payload))
  data = response.json()
  print(data)
  ```

  ```php PHP theme={null}
  <?php
  $curl = curl_init();

  $payload = json_encode([
      "job_id" => "xyz456abc123",
      "status" => "Active"
  ]);

  curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.hirempire.com/v1/update-job',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'PATCH',
    CURLOPT_POSTFIELDS => $payload,
    CURLOPT_HTTPHEADER => array(
      'Authorization: Bearer YOUR_TOKEN',
      'Content-Type: application/json'
    ),
  ));

  $response = curl_exec($curl);
  curl_close($curl);

  $data = json_decode($response, true);
  print_r($data);
  ?>
  ```

  ```ruby Ruby theme={null}
  require 'net/http'
  require 'json'

  uri = URI('https://api.hirempire.com/v1/update-job')
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true

  request = Net::HTTP::Patch.new(uri)
  request['Authorization'] = 'Bearer YOUR_TOKEN'
  request['Content-Type'] = 'application/json'
  request.body = {
    job_id: "xyz456abc123",
    status: "Active"
  }.to_json

  response = http.request(request)
  data = JSON.parse(response.body)
  puts data
  ```

  ```go Go theme={null}
  package main

  import (
      "bytes"
      "encoding/json"
      "fmt"
      "io"
      "net/http"
  )

  func main() {
      payload := map[string]interface{}{
          "job_id": "xyz456abc123",
          "status": "Active",
      }
      
      jsonPayload, _ := json.Marshal(payload)
      
      client := &http.Client{}
      req, _ := http.NewRequest("PATCH", "https://api.hirempire.com/v1/update-job", bytes.NewBuffer(jsonPayload))
      req.Header.Add("Authorization", "Bearer YOUR_TOKEN")
      req.Header.Add("Content-Type", "application/json")
      
      resp, _ := client.Do(req)
      defer resp.Body.Close()
      
      body, _ := io.ReadAll(resp.Body)
      fmt.Println(string(body))
  }
  ```

  ```java Java theme={null}
  import java.net.http.HttpClient;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;
  import java.net.URI;

  public class HirempireAPI {
      public static void main(String[] args) throws Exception {
          String payload = """
          {
              "job_id": "xyz456abc123",
              "status": "Active"
          }
          """;
          
          HttpClient client = HttpClient.newHttpClient();
          HttpRequest request = HttpRequest.newBuilder()
              .uri(URI.create("https://api.hirempire.com/v1/update-job"))
              .header("Authorization", "Bearer YOUR_TOKEN")
              .header("Content-Type", "application/json")
              .method("PATCH", HttpRequest.BodyPublishers.ofString(payload))
              .build();
              
          HttpResponse<String> response = client.send(request, 
              HttpResponse.BodyHandlers.ofString());
          System.out.println(response.body());
      }
  }
  ```

  ```csharp C# theme={null}
  using System;
  using System.Net.Http;
  using System.Text;
  using System.Threading.Tasks;

  class Program
  {
      private static readonly HttpClient client = new HttpClient();

      static async Task Main(string[] args)
      {
          client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_TOKEN");
          
          var payload = """
          {
              "job_id": "xyz456abc123",
              "status": "Active"
          }
          """;
          
          var content = new StringContent(payload, Encoding.UTF8, "application/json");
          HttpResponseMessage response = await client.PatchAsync("https://api.hirempire.com/v1/update-job", content);
          string responseBody = await response.Content.ReadAsStringAsync();
          
          Console.WriteLine(responseBody);
      }
  }
  ```

  ```swift Swift theme={null}
  import Foundation

  let url = URL(string: "https://api.hirempire.com/v1/update-job")!
  var request = URLRequest(url: url)
  request.httpMethod = "PATCH"
  request.setValue("Bearer YOUR_TOKEN", forHTTPHeaderField: "Authorization")
  request.setValue("application/json", forHTTPHeaderField: "Content-Type")

  let payload: [String: Any] = [
      "job_id": "xyz456abc123",
      "status": "Active"
  ]

  request.httpBody = try? JSONSerialization.data(withJSONObject: payload)

  let task = URLSession.shared.dataTask(with: request) { data, response, error in
      if let data = data {
          let json = try? JSONSerialization.jsonObject(with: data)
          print(json ?? "No data")
      }
  }

  task.resume()
  ```

  ```kotlin Kotlin theme={null}
  import kotlinx.coroutines.*
  import java.net.http.HttpClient
  import java.net.http.HttpRequest
  import java.net.http.HttpResponse
  import java.net.URI

  fun main() = runBlocking {
      val payload = """
      {
          "job_id": "xyz456abc123",
          "status": "Active"
      }
      """.trimIndent()
      
      val client = HttpClient.newHttpClient()
      val request = HttpRequest.newBuilder()
          .uri(URI.create("https://api.hirempire.com/v1/update-job"))
          .header("Authorization", "Bearer YOUR_TOKEN")
          .header("Content-Type", "application/json")
          .method("PATCH", HttpRequest.BodyPublishers.ofString(payload))
          .build()
          
      val response = client.send(request, HttpResponse.BodyHandlers.ofString())
      println(response.body())
  }
  ```

  ```rust Rust theme={null}
  use reqwest::header::{HeaderMap, HeaderValue, AUTHORIZATION, CONTENT_TYPE};
  use serde_json::json;

  #[tokio::main]
  async fn main() -> Result<(), Box<dyn std::error::Error>> {
      let mut headers = HeaderMap::new();
      headers.insert(AUTHORIZATION, HeaderValue::from_str("Bearer YOUR_TOKEN")?);
      headers.insert(CONTENT_TYPE, HeaderValue::from_str("application/json")?);
      
      let payload = json!({
          "job_id": "xyz456abc123",
          "status": "Active"
      });
      
      let client = reqwest::Client::new();
      let response = client
          .patch("https://api.hirempire.com/v1/update-job")
          .headers(headers)
          .json(&payload)
          .send()
          .await?;
          
      let body = response.text().await?;
      println!("{}", body);
      
      Ok(())
  }
  ```
</RequestExample>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the job status was updated successfully
</ResponseField>

<ResponseField name="id" type="string">
  The unique identifier of the updated job
</ResponseField>

<ResponseField name="status" type="string">
  The new status of the job
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "id": "f3a2c1d4-1111-4222-9333-444455556666",
    "status": "active"
  }
  ```
</ResponseExample>

## Error Responses

### Authorization Errors

**400 - Bad Request**

```json theme={null}
{
    "success": false,
    "error": "Authorization header is required."
}
```

**400 - Bad Request**

```json theme={null}
{
    "success": false,
    "error": "Authorization header must start with 'Bearer '."
}
```

### Request Validation Errors

**400 - Bad Request**

```json theme={null}
{
    "success": false,
    "error": "Job ID is required and cannot be empty."
}
```

**400 - Bad Request**

```json theme={null}
{
    "success": false,
    "error": "Job status is required and cannot be empty."
}
```

**400 - Bad Request**

```json theme={null}
{
    "success": false,
    "error": "status must be one of: Pending, Active, Paused, Hired, Closed"
}
```

### Token Validation Errors

**401 - Unauthorized**

```json theme={null}
{
    "success": false,
    "error": "Invalid token"
}
```

**401 - Unauthorized**

```json theme={null}
{
    "success": false,
    "error": "Token is expired"
}
```

### Job Access Errors

**401 - Unauthorized**

```json theme={null}
{
    "success": false,
    "error": "Invalid job id"
}
```
