---
title: "Responds to a slash command interaction in Discord."
method: POST
path: "/respondToInteraction"
---

# Responds to a slash command interaction in Discord.

`POST /respondToInteraction`

This function sends a response back to the user who interacted with a slash command in Discord. It allows for customization of the response content, including text, embeds, and components, with an option to make the response ephemeral. The function returns a Promise that resolves when the response is successfully sent.

## Request body

- object
  - `body` object — Body of the respondToInteraction 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`

Successful response

- object
  - `success` boolean — Indicates if the response was sent successfully.

## Other responses

- `400` — Bad Request - Invalid parameters
- `401` — Unauthorized - Invalid interaction token
- `500` — Internal Server Error

---

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