SOKE
API ReferenceJobs

Poll Job Status

Check the status of an async job and retrieve results when complete.

GET /api/v1/jobs/{id}

Check the status of an async job. When the job is complete, the result is included in the response.

Path Parameters

ParameterTypeDescription
idstringThe job ID returned by the async endpoint

Example Request

curl https://api.usesoke.ai/api/v1/jobs/job_abc123def456 \
  -H "X-Soke-Key: sk_live_your_api_key"

Response (Processing)

200 OK
{
  "success": true,
  "data": {
    "jobId": "job_abc123def456",
    "status": "processing",
    "progress": 60
  }
}

Response (Completed)

200 OK
{
  "success": true,
  "data": {
    "jobId": "job_abc123def456",
    "status": "completed",
    "result": {
      // Operation-specific results
    }
  }
}

Response (Failed)

200 OK
{
  "success": true,
  "data": {
    "jobId": "job_abc123def456",
    "status": "failed",
    "error": {
      "code": "PROCESSING_ERROR",
      "message": "Failed to process the request."
    }
  }
}

Job Statuses

StatusDescription
queuedWaiting to be processed
processingCurrently running
completedFinished — results in data.result
failedFailed — error in data.error

See Async Jobs for polling best practices.

On this page