Skip to main content
GET
/
api
/
v1
/
mpc
/
jobs
/
{job_id}
Get Job Status
curl --request GET \
  --url https://api.example.com/api/v1/mpc/jobs/{job_id}
{
  "type": "job-status",
  "job-id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "pending"
}

Overview

Retrieves the current status and result of an MPC computation job. Use this endpoint to poll for completion of create, read, update, or delete operations.
Jobs are processed asynchronously. Poll this endpoint periodically until the status becomes “completed” or “failed”.

Path Parameters

job_id
string
required
UUID of the job returned from create/read/update/delete operations

Response

type
string
required
Will always be “job-status”
job-id
string
required
UUID of the job being queried
status
string
required
Current job status: “created”, “pending”, “completed”, or “failed”
mpc-result
object
MPC computation result (only present when status is “completed”)
ledger-result
string
Ledger transaction result: “ok” or “failed” (only present when payment was involved)
{
  "type": "job-status",
  "job-id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "pending"
}

Polling Strategy

Implement exponential backoff for efficient polling:
async function pollJobStatus(jobId) {
  let delay = 1000; // Start with 1 second
  const maxDelay = 30000; // Cap at 30 seconds

  while (true) {
    const response = await fetch(`/api/v1/mpc/jobs/${jobId}`);
    const result = await response.json();

    if (result.status === 'completed' || result.status === 'failed') {
      return result;
    }

    await new Promise(resolve => setTimeout(resolve, delay));
    delay = Math.min(delay * 1.5, maxDelay);
  }
}

Result Types

Authentication Results

  • code: “ok”, “vendor-not-consented”, “user-not-found”, etc.
  • attributes-shares: Hex-encoded attribute data

CRUD Operation Results

  • result: “ok”, “user-not-found”, “invalid-request”, etc.
  • read-shares: User data (read operations only)

Rate Limits

  • 1000 status checks per minute per API key
  • No hourly limit for status checks