Skip to main content
PUT
/
jobs
/
:id
Update Job
curl --request PUT \
  --url https://api.techforgeinnovate.com/jobs/:id \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "job_status": "<string>",
  "output": {},
  "output.credit_used": 123
}
'

Update Job

Updates job_status and output for an existing job owned by the authenticated account. If output.credit_used is present, the controller also decrements the user’s credit balance. This endpoint is usually used by controlled internal workflows, but it is reachable with an API key and is documented here for completeness.

Path parameters

id
string
required
Job UUID.

Request body

job_status
string
New job status value.
output
object
Arbitrary output payload to persist on the job.
output.credit_used
number
Optional credit usage value. When present, it is subtracted from the current user credit balance.

Example request

curl -X PUT "https://api.techforgeinnovate.com/jobs/15a6331b-3837-4ae8-8fa7-d3ead3388d77" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $TFI_API_KEY" \
  -d '{
    "job_status": "SUCCESS",
    "output": {
      "output": "ai-talking-videos/468ea7a0-66e1-4357-a760-236e54167f3e/outputs/15a6331b-3837-4ae8-8fa7-d3ead3388d77.mp4",
      "credit_used": 12.5
    }
  }'

Response

Returns the updated job record. If the job cannot be found for the authenticated account, the controller returns:
{
  "message": "Job not found"
}

Status codes

  • 200 OK when the update runs
  • 401 Unauthorized when the key is missing or invalid