---
title: "Activate an Automation"
method: POST
path: "/v1/automations/{id}/activate"
tags: ["Automations"]
---

# Activate an Automation

`POST /v1/automations/{id}/activate`

Den schedules Automations and keeps durable run history; execution is dispatched to the owner's connected desktop app. If no desktop runner is connected when an occurrence is due, that occurrence is recorded as missed. Creation makes an Automation active immediately and uses the owner's current OpenWork Connect integrations. Deactivation stops future runs but does not cancel a run already in progress.

## Path parameters

- `id` string, required

## Response `200`

Automation state returned.

- object
  - `automation` object, required
    - `id` string, required
    - `organizationId` string, required
    - `ownerMemberId` string, required
    - `name` string, required
    - `state` 'active' | 'inactive' | 'needs_attention' | 'archived', required
    - `currentRevisionId` string, required
    - `nextDueAt` integer, nullable, required
    - `latestRunAt` integer, nullable, required
    - `needsAttentionReason` object, nullable, required
      - `code` 'owner_membership_lost' | 'model_access_lost' | 'provider_unavailable' | 'connect_access_unavailable' | 'execution_runtime_unavailable', required
      - `message` string, required
      - `occurredAt` integer, required
    - `createdAt` integer, required
    - `updatedAt` integer, required
    - `archivedAt` integer, nullable, required
  - `revision` object, required
    - `id` string, required
    - `automationId` string, required
    - `version` integer, required
    - `instructions` string, required
    - `schedule` union, required
      - object
        - `kind` 'once', required
        - `timezone` string, required
        - `at` integer, required
      - object
        - `kind` 'daily', required
        - `timezone` string, required
        - `hour` integer, required
        - `minute` integer, required
      - object
        - `kind` 'weekly', required
        - `timezone` string, required
        - `daysOfWeek` integer[], required
        - `hour` integer, required
        - `minute` integer, required
    - `model` object, required
      - `providerId` string, required
      - `modelId` string, required
      - `variant` string, nullable
    - `executionTarget` 'desktop', required
    - `maximumRuntimeMs` integer, required
    - `digest` string, required
    - `createdAt` integer, required
  - `latestRun` object, nullable, required
    - `id` string, required
    - `automationId` string, required
    - `revisionId` string, required
    - `trigger` 'scheduled' | 'recovery' | 'manual', required
    - `scheduledFor` integer, nullable, required
    - `idempotencyKey` string, required
    - `status` 'queued' | 'claimed' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'skipped', required
    - `leaseOwner` string, nullable, required
    - `leaseExpiresAt` integer, nullable, required
    - `heartbeatAt` integer, nullable, required
    - `attemptCount` integer, required
    - `executionTarget` 'desktop', required
    - `executionThread` object, nullable, required
      - `id` string, required
      - `threadKind` 'automation', required
      - `executionLocation` 'desktop', required
      - `automationId` string, required
      - `automationRunId` string, required
      - `engineKind` string, required
    - `providerId` string, required
    - `modelId` string, required
    - `modelVariant` string, nullable
    - `startedAt` integer, nullable, required
    - `finishedAt` integer, nullable, required
    - `error` object, nullable, required
      - `code` 'owner_membership_lost' | 'model_access_lost' | 'provider_unavailable' | 'connect_access_unavailable' | 'execution_runtime_unavailable' | 'execution_failed' | 'execution_timed_out' | 'runner_unavailable' | 'cancelled' | 'lease_lost' | 'internal_error', required
      - `message` string, required
      - `retryable` boolean, required
    - `resultSummary` string, nullable, required
    - `usage` object, required
      - `inputTokens` integer, nullable, required
      - `outputTokens` integer, nullable, required
      - `costMicros` integer, nullable, required
    - `createdAt` integer, required
    - `updatedAt` integer, required

## Other responses

- `404` — Not found.

## Changes

- **2026-08-05** `073bc652adfb` — 2 info
  - added the optional property `latestRun/anyOf[subschema #1]/modelVariant` to the response with the `200` status
  - added the optional property `revision/model/variant` to the response with the `200` status

[Change history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/automations/:id/activate/post.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) · [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openworklabs/den-api/revisions/073bc652adfb/schema)
