---
title: "Delete all rules"
method: DELETE
path: "/rules"
tags: ["rules"]
---

# Delete all rules

`DELETE /rules`

## Request

- Base URL: `https://api.smartthings.com/v1`
- URL: `https://api.smartthings.com/v1/rules`
- Auth: OAuth 2
  - Implicit: `https://auth-global.api.smartthings.com`
  - Scopes: `w:rules:*`, `service`
- TypeScript: <https://skmtc.dev/smartthings/apis/smartthings-api/docs/rules/delete.ts> (a function with typed inputs; its response is checked against the schema)

Delete all rules in a location

## Query parameters

- `locationId` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required

## Response `204`

The rules were deleted

## Other responses

- `401`: Not Authenticated
- `403`: Not Authorized or Not Found
- `429`: Too Many Requests
- `default`: Unexpected Error

## Changes

- **2023-11-27** `e8dd260a33ec`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/smartthings/apis/smartthings-api/changes/rules/delete.md)

---

[API](https://skmtc.dev/smartthings/apis/smartthings-api.md) - [All operations](https://skmtc.dev/smartthings/apis/smartthings-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smartthings/apis/smartthings-api/revisions/2788a4236800?raw)
