interactions_create_response
interactions_create_response
Section titled “interactions_create_response”Category: interactions
Send the initial response to an interaction (slash command, button, modal submit, etc.).
When to use
Section titled “When to use”When NOT to use
Section titled “When NOT to use”| Field | Type | Required | Description |
|---|---|---|---|
interaction_id | string | yes | Interaction ID (snowflake) — from the interaction event |
interaction_token | string | yes | Interaction token (one-time signed secret, 15-minute TTL). Treat as a credential. |
type | integer | yes | INTERACTION_RESPONSE_TYPE (1=PONG, 4=MESSAGE, 5=DEFER, 9=MODAL, 10=PREMIUM, 12=ACTIVITY) |
data | object | no | Response payload — shape depends on type. Message body for type=4; modal for type=9. |
with_response | boolean | no | When true, server returns the resulting message body. Query param. |
Returns
Section titled “Returns”\{acknowledged:true\} (or \{message:…\} when with_response:true).
Output schema
Section titled “Output schema”| Field | Type | Required | Description |
|---|---|---|---|
acknowledged | boolean | yes | |
message | object | no |
Annotations
Section titled “Annotations”| Property | Value |
|---|---|
| Read-only | no |
| Destructive | no |
| Idempotent | no |
| Open-world | yes |
| Confirmation required | no |