---
title: "Update job"
method: PATCH
path: "/orgs/{orgId}/projects/{projectId}/scout/tasks/{jobId}"
tags: ["Tasks"]
---

# Update job

`PATCH /orgs/{orgId}/projects/{projectId}/scout/tasks/{jobId}`

## Request

- Base URL: `https://app.cloud.redocly.com/api`
- URL: `https://app.cloud.redocly.com/api/orgs/{orgId}/projects/{projectId}/scout/tasks/{jobId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/redocly/apis/redocly-scout/docs/orgs/:orgId/projects/:projectId/scout/tasks/:jobId/patch.ts> (a function with typed inputs; its response is checked against the schema)

Scout sends this API request after completing a job.
Supports only `PROCESSING` -> `COMPLETED` and `PROCESSING` -> `FAILED` transitions.

## Path parameters

- `orgId` string, required
- `projectId` string, required
- `jobId` string, ulid, required

## Headers

- `x-redocly-scout-version` string

## Request body

- PatchJob
  - `status` 'COMPLETED' | 'FAILED', required: Job status.
  - `metadata` JobMetadata: Additional information about job.
    - `scoutVersion` string: Scout version.
    - `errorMessage` string: Error message, if any.
    - `errorStack` string: Error stack trace, if any.

## Response `200`

OK.

- Job
  - `id` string, ulid, required: ID of the job.
  - `status` 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED', required: Job status.
  - `type` 'PROCESS_GIT_REPO' | 'UPDATE_STATUS', required: Type of job.
  - `organizationId` string: Organization ID.
  - `projectId` string: Project ID.
  - `providerId` string: Git provider identifier (appId for GitHub).
  - `providerType` 'GITHUB_CLOUD' | 'GITHUB_SERVER' | 'GITLAB_CLOUD' | 'GITLAB_SELF_MANAGED' | 'BITBUCKET_CLOUD' | 'BITBUCKET_DATACENTER' | 'AZURE', required: Git provider type.
  - `namespaceId` string, required: Git repo namespace id (organization login for GitHub).
  - `repositoryId` string, required: Git repo id.
  - `branch` string, required: Git branch name.
  - `commitSha` string, required: Git commit SHA.
  - `isMainBranch` boolean: True if branch is main.
  - `prId` string: Git pull request ID.
  - `attempts` integer, required: Number of attempts to process the job.
  - `parentJobId` string, ulid: ID of the parent job, if any.
  - `checks` GitCommitCheck[]: Commit status checks.
    - `name` string, required: Check name.
    - `status` 'IN_PROGRESS' | 'SUCCESS' | 'FAILED', required: Git commit status.
    - `description` string: Git commit status description.
    - `targetUrl` string: Git commit status target URL.
  - `metadata` JobMetadata: Additional information about job.
    - `scoutVersion` string: Scout version.
    - `errorMessage` string: Error message, if any.
    - `errorStack` string: Error stack trace, if any.
  - `startedAt` string, date-time: Job start date.
  - `createdAt` string, date-time, required: Job creation date.
  - `updatedAt` string, date-time, required: Job last update date.

## Other responses

- `400`: Bad Request.
- `404`: Resource not found.

## Changes

- **2026-08-21** `5dc606d075e4`: 2 breaking
  - the response property `organizationId` became optional for the status `200`
  - the response property `projectId` became optional for the status `200`

[Operation history](https://skmtc.dev/redocly/apis/redocly-scout/changes/orgs/:orgId/projects/:projectId/scout/tasks/:jobId/patch.md)

---

[API](https://skmtc.dev/redocly/apis/redocly-scout.md) - [All operations](https://skmtc.dev/redocly/apis/redocly-scout/llms.txt) - [OpenAPI document](https://skmtc.dev/redocly/apis/redocly-scout/revisions/18944395275b?raw)
