---
title: "Update or end a run"
method: PATCH
path: "/v1/runs/{id}"
tags: ["Runs"]
---

# Update or end a run

`PATCH /v1/runs/{id}`

Update a run's status or end it.

When transitioning to COMPLETED, FAILED, CANCELLED, or TIMEOUT, the run's
endedAt timestamp is automatically set and duration is computed.

## Path parameters

- `id` string, required

## Response `200`

Run updated

- object — Run updated
  - `id` string
  - `status` string
  - `startedAt` string, date-time, nullable
  - `endedAt` string, date-time, nullable
  - `durationMs` integer, nullable
  - `eventCount` integer
  - `totalCostUnits` string, nullable

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `404` — Run not found

---

[API](https://skmtc.net/usedrip/apis/drip-api.md) · [All operations](https://skmtc.net/usedrip/apis/drip-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usedrip/drip-api/versions/2cb1567969ca/schema)
