---
title: "Delete an AI Routine"
method: DELETE
path: "/v1/ai/routines/{routineId}"
tags: ["AI Routines"]
---

# Delete an AI Routine

`DELETE /v1/ai/routines/{routineId}`

Delete an AI Routine. This action cannot be undone.

## Path parameters

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

## Query parameters

- `userId` string, uuid

## Response `200`

Routine deleted successfully.

- object
  - `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.
- `429` — Too Many Requests - Rate limit exceeded (60 requests/minute)
- `500` — Internal Server Error

---

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