---
title: "Handles DELETE requests to `/delete`."
url: "https://developer.rucho.org/apis/rucho/versions/5bdf1bcb-8db4-40f1-a293-72c7198e26c8/operations/delete_handler"
---

> Full API specification: https://developer.rucho.org/apis/rucho/versions/5bdf1bcb-8db4-40f1-a293-72c7198e26c8.md

# Handles DELETE requests to `/delete`.

`DELETE` `/delete`

Operation ID: `delete_handler`

Echoes back the request's method and headers. If a JSON body is provided, it will also be echoed. Otherwise, the body in the response will be `null`. # HTTP Method: - `DELETE` # Request Body: - `Payload` (optional): A generic JSON object. # Responses: - `200 OK`: Returns a JSON object containing method, headers, and body (if provided).

## Request body

Content types: `application/json`

## Responses

- `200` - Echoes request details, body is null if not provided

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: rucho
  version: 1.6.0
servers:
  - url: https://rucho.org
    description: Production (EKS us-east-2, behind Kong)
paths:
  /delete:
    delete:
      tags:
        - crate::routes::core_routes
      summary: Handles DELETE requests to `/delete`.
      description: >-
        Echoes back the request's method and headers. If a JSON body is
        provided,

        it will also be echoed. Otherwise, the body in the response will be
        `null`.


        # HTTP Method:

        - `DELETE`


        # Request Body:

        - `Payload` (optional): A generic JSON object.


        # Responses:

        - `200 OK`: Returns a JSON object containing method, headers, and body
        (if provided).
      operationId: delete_handler
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Payload"
              nullable: true
        required: false
      responses:
        "200":
          description: Echoes request details, body is null if not provided
          content:
            application/json:
              schema: {}
components:
  schemas:
    Payload:
      description: |-
        Request payload wrapper for POST, PUT, PATCH, and DELETE handlers.

        This newtype wraps a `serde_json::Value` to accept arbitrary JSON bodies
        in requests that support request bodies.
```
