HTTP API Reference

Jobs API reference

Reference documentation for the Jobs HTTP endpoint.

The Jobs API allows you to monitor and manage processes running inside Sanity's infrastructure.

Authentication

Base API server URL

Sanity API base URL

https://api.sanity.io/{apiVersion}

Variables

  • apiVersionstringdefault: "v2021-06-07"

    API version

Endpoints

Job status

get/jobs/{jobId}

Get the status of a job.

Path parameters

Responses

200

Returns the status of the job.

Listen for job updates

get/jobs/{jobId}/listen

Each job has a /listen endpoint to allow you to monitor its status programmatically. While listening, event data will be sent back at intervals providing updates on the status of your job.

Path parameters

Responses

200

Returns the status of the job.

  • string (binary)
Examplestext/event-stream
event: job
data: {"job_id":"jacsfsmnxp","state":"running","progress":60}