> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wiseyield.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete block

> Soft-delete a block + cascade soft-delete to its plants.

```
DELETE https://www.wiseyield.co/api/v1/farms/{id}/fields/{fieldId}/blocks/{blockId}
```

### Authentication

Requires a key with the `fields:write` scope.

### Path parameters

<ParamField path="id" type="string" required>Farm UUID.</ParamField>
<ParamField path="fieldId" type="string" required>Field UUID.</ParamField>
<ParamField path="blockId" type="string" required>Block UUID.</ParamField>

### Response

Returns `204 No Content` on success. **Cascade**: any active `block_plants` under this block are also soft-deleted with the same `deletedAt` timestamp.

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE 'https://www.wiseyield.co/api/v1/farms/11111111.../fields/88888888.../blocks/aaaaaaaa...' \
    -H "Authorization: Bearer $WISEYIELD_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```http 204 No Content theme={null}
  (no body)
  ```

  ```json 404 Not found theme={null}
  { "error": "Not found", "code": "NOT_FOUND", "message": "Block not found" }
  ```
</ResponseExample>

## Errors

| Status                    | When                                                                                     |
| ------------------------- | ---------------------------------------------------------------------------------------- |
| `400 INVALID_ID`          | Any path UUID is malformed                                                               |
| `401`                     | Missing, malformed, expired, or revoked API key                                          |
| `403 INSUFFICIENT_SCOPE`  | Key lacks `fields:write` scope                                                           |
| `404 NOT_FOUND`           | Farm, field, or block doesn't exist, is already soft-deleted, or belongs to another user |
| `429 RATE_LIMIT_EXCEEDED` | Per-user rate limit reached                                                              |
| `5xx`                     | Server error                                                                             |
