Request Body
The new status for the job.
Valid values: Pending, Active, Paused, Hired, Closed
Authentication
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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"
}'
Response
Indicates if the job status was updated successfully
The unique identifier of the updated job
The new status of the job
{
"success": true,
"id": "xyz456abc123",
"status": "Active"
}
Error Responses
Authorization Errors
400 - Bad Request
{
"success": false,
"error": "Authorization header is required."
}
400 - Bad Request
{
"success": false,
"error": "Authorization header must start with 'Bearer '."
}
Request Validation Errors
400 - Bad Request
{
"success": false,
"error": "Job ID is required and cannot be empty."
}
400 - Bad Request
{
"success": false,
"error": "Job status is required and cannot be empty."
}
400 - Bad Request
{
"success": false,
"error": "Invalid job status: '[status]'. Allowed values are: Pending, Active, Paused, Hired, Closed"
}
Token Validation Errors
400 - Bad Request
{
"success": false,
"error": "Invalid token"
}
401 - Unauthorized
{
"success": false,
"error": "Token is expired"
}
403 - Forbidden
{
"success": false,
"error": "Token has been deleted"
}
401 - Unauthorized
{
"success": false,
"error": "Token is missing required scope"
}
Job Access Errors
401 - Unauthorized
{
"success": false,
"error": "Invalid job id"
}
401 - Unauthorized
{
"success": false,
"error": "Unauthorized. You don't have the permission to update this job."
}