---
title: "Desktop uploads local job runtime patch (Mongo LWW, no git writeback)"
method: POST
path: "/v1/cloud/runtime/job-runtime/upsert"
tags: ["v1", "Cloud Runtime"]
---

# Desktop uploads local job runtime patch (Mongo LWW, no git writeback)

`POST /v1/cloud/runtime/job-runtime/upsert`

## Request

- Base URL: `https://memory.papr.ai`
- URL: `https://memory.papr.ai/v1/cloud/runtime/job-runtime/upsert`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

## Request body

- JobRuntimePatch
  - `jobId` string, required
  - `status` string, required
  - `lastRunAt` string, nullable
  - `completedAt` string, nullable
  - `exitCode` integer, nullable
  - `error` string, nullable
  - `lastOutput` string, nullable
  - `scheduleState` JobScheduleStatePatch
    - `nextRunAt` string, nullable
    - `lastScheduledRunAt` string, nullable
    - `lastTriggeredAt` string, nullable
    - `currentIdempotencyKey` string, nullable
    - `lastIdempotencyKey` string, nullable
    - `pendingDueAtForApproval` string, nullable
  - `recordedAt` string, required
  - `source` string, nullable
  - `jobName` string, nullable
  - `orgId` string, nullable
  - `namespaceId` string, nullable
  - `userId` string, nullable
  - `notificationId` string, nullable

## Response `200`

Successful Response

- JobRuntimeUpsertResponse
  - `accepted` boolean, required
  - `jobId` string, required
  - `recordedAt` string, required
  - `runtime` object, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-16** `0e7a5c0d125d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/papr-ai/apis/papr-memory-api/changes/v1/cloud/runtime/job-runtime/upsert/post.md)

---

[API](https://skmtc.dev/papr-ai/apis/papr-memory-api.md) - [All operations](https://skmtc.dev/papr-ai/apis/papr-memory-api/llms.txt) - [OpenAPI document](https://skmtc.dev/papr-ai/apis/papr-memory-api/revisions/6fc381dc78b3?raw)
