Background Tasks

Ensure first-party workflows

Idempotently provisions or upgrades the six Oppulence-managed relationship workflows for the authenticated user. User pause choices are preserved during definition upgrades. Replica races converge on the same per-user task slugs.

post/v1/background-tasks/first-party/ensure

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /v1/background-tasks/first-party/ensure
  • Auth: HTTP bearer

Response

Maintained workflows.

Example response

{
  "tasks": [
    {
      "active": true,
      "createdAt": "2026-06-04T20:38:00Z",
      "executionTarget": "desktop",
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "instructions": "Summarize important account changes.",
      "lastAttemptAt": "2026-06-04T21:00:00Z",
      "lastRunAt": "2026-06-04T21:02:00Z",
      "lastRunId": "run-20260604-210000",
      "lastRunSummary": "No high-priority account changes.",
      "model": "openai/gpt-4.1-mini",
      "name": "Daily Account Summary",
      "provider": "openai",
      "revision": 2,
      "scheduleSyncState": "current",
      "scheduleSyncedAt": "2026-06-04T20:39:00Z",
      "slug": "daily-summary",
      "templateSlug": "relationship-refresh",
      "templateVersion": 1,
      "triggers": {
        "cronExpr": "0 9 * * *",
        "timezone": "America/New_York"
      },
      "updatedAt": "2026-06-04T20:39:00Z"
    }
  ]
}

Changes

No recorded changes to this operation across all 50 revisions of this API.