interactions_create_response
Send the initial reply to Discord interactions like slash commands or buttons within the 3-second deadline, or defer it for later follow-up.
Instructions
Purpose: Send the initial response to an interaction (slash command, button, modal submit, etc.).
3-SECOND DEADLINE: Discord rejects this response if not received within 3 seconds of the interaction event. If you need more time, respond with type=5 (DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE) and follow up via interactions_edit_original_response or interactions_create_followup.
Auth: token-secured; no bot token. The initial callback may be sent once. Its interaction token remains a scoped continuation credential for follow-ups for up to 15 minutes, unless the initial 3-second deadline is missed.
INTERACTION_RESPONSE_TYPE values: 1=PONG, 4=CHANNEL_MESSAGE_WITH_SOURCE, 5=DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE, 6=DEFERRED_UPDATE_MESSAGE, 7=UPDATE_MESSAGE, 8=APPLICATION_COMMAND_AUTOCOMPLETE_RESULT, 9=MODAL, 10=PREMIUM_REQUIRED (deprecated), 12=LAUNCH_ACTIVITY.
Returns: {acknowledged:true} (or {message:…} when with_response:true).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Response payload - shape depends on `type`. Message body for type=4; modal for type=9. | |
| type | Yes | INTERACTION_RESPONSE_TYPE (1=PONG, 4=MESSAGE, 5=DEFER, 9=MODAL, 10=PREMIUM, 12=ACTIVITY) | |
| with_response | No | When true, server returns the resulting message body. Query param. | |
| interaction_id | Yes | Interaction ID (snowflake) - from the interaction event | |
| interaction_token | Yes | Scoped interaction credential, reusable for follow-ups for up to 15 minutes. Treat as a credential. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||