---
title: "Deletes a global slash command."
method: POST
path: "/deleteGlobalSlashCommand"
---

# Deletes a global slash command.

`POST /deleteGlobalSlashCommand`

This function removes a previously registered global slash command from Discord. It takes the command ID as a parameter and returns a Promise that resolves when the deletion is complete. This allows for programmatic management of global slash commands in a Discord application.

## Request body

- object
  - `body` object — Body of the deleteGlobalSlashCommand sls call
    - `arguments` unknown[], required
      - unknown
    - `auth` object — Authentication object
      - `strategy` 'apikey' — Authentication strategy
      - `variables` unknown[] — Variables for the authentication strategy
        - unknown
    - `packageName` string — @microfox/discord

## Response `200`

Command successfully deleted

- object
  - `success` boolean — Indicates if the command was successfully deleted

## Other responses

- `400` — Bad request - invalid command ID
- `404` — Command not found
- `500` — Internal server error

## Changes

- **2025-05-29** `2deb154b9766` — 1 warning, 3 info
  - removed the optional property `data` from the response with the `200` status
  - added the media type `application/json` for the response with the status `400`
  - added the media type `application/json` for the response with the status `500`
  - added the non-success response with the status `404`
- **2025-05-28** `d03e8c66c195` — 2 breaking, 2 info
  - removed the media type `application/json` for the response with the status `400`
  - removed the media type `application/json` for the response with the status `500`
  - removed the non-success response with the status `404`
  - added the optional property `data` to the response with the `200` status

[Change history](https://skmtc.dev/microfox-ai/apis/microfox-discord-sdk-api/changes/deleteGlobalSlashCommand/post.md)

---

[API](https://skmtc.dev/microfox-ai/apis/microfox-discord-sdk-api.md) · [All operations](https://skmtc.dev/microfox-ai/apis/microfox-discord-sdk-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/microfox-ai/microfox-discord-sdk-api/revisions/7cb5b64ae924/schema)
