---
title: "Delete a routine"
method: DELETE
path: "/api/v1/ai/routines/{id}"
tags: ["AI Routines"]
---

# Delete a routine

`DELETE /api/v1/ai/routines/{id}`

Delete a routine. It stops running immediately and no longer appears in list or get responses.

## Path parameters

- `id` string, uuid, required — The UUID of the routine.

## Query parameters

- `userId` string, uuid — Target user membership ID (for org-scoped API keys)

## Response `200`

Routine deleted successfully.

- RoutineDeleteResponse
  - `deleted` true, required — Always true on a successful delete.
  - `id` string, uuid, required — The deleted routine’s ID.

## Other responses

- `400` — Invalid routine ID.
- `401` — Missing or invalid API key.
- `403` — AI routines or AI query generation are not enabled for the organization, or a user-scoped API key tried to delete another user's routine.
- `404` — Routine not found or has already been deleted.

---

[API](https://skmtc.net/omniapp/apis/omni-api.md) · [All operations](https://skmtc.net/omniapp/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omniapp/omni-api/versions/4701f292c621/schema)
