---
title: "Create a job todo"
method: POST
path: "/orgs/{orgId}/projects/{projectId}/scout/todos"
tags: ["Todos"]
---

# Create a job todo

`POST /orgs/{orgId}/projects/{projectId}/scout/todos`

Git provider webhook triggers Scout to create a job todo.
Similarly, a lint job started or completed triggers jobs todo.
Since Scout is stateless and distributed, this is the API for storing things to do.
It's also a way to communicate with Scout by making jobs for it to do too (such as communicating status back to Git).
Finally, it can be used to trigger Scout to update again in the case of a GitHub webhook outage.

## Path parameters

- `orgId` string, required
- `projectId` string, required

## Headers

- `x-redocly-scout-version` string

## Request body

- 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, required — Organization ID.
  - `projectId` string, required — 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.

## Response `201`

Created.

- 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, required — Organization ID.
  - `projectId` string, required — 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.

---

[API](https://skmtc.net/redocly/apis/redocly-scout.md) · [All operations](https://skmtc.net/redocly/apis/redocly-scout/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/redocly/redocly-scout/revisions/193cacd75700/schema)
