---
search:
  tags:
    - Webhook events
    - POST
    - Webhook
seo:
  description: >-
    A viewer executed one of the streamer's custom chat commands - the hook for
    turning… Reference for the POST chat.command webhook in the TipPage
    Developer API.
sidebar:
  label: chat.command
  badge: POST
title: chat.command
type: openapi-operation
---
A viewer executed one of the streamer's custom chat commands - the hook for turning commands into real-world triggers (`!explode` firing actual hardware). Emits only after the command's permission and cooldown checks pass, and only for custom commands - built-ins like `!queue` never fire it. `command` is the canonical command name; `invoked_as` is what the viewer typed (differs when an alias was used). Delivery is at-least-once: dedupe on `data.message_id`.

`POST chat.command`

**Webhook.** The API sends this request to your endpoint.

**Payload** (`application/json`)

- `id` (string, required) — Unique event id.
- `type` (any, required)
- `created` (string<date-time>, required)
- `actor` (object | null, required) — Who caused the event. \`null\` for system-originated events (a payment landing, an overlay heartbeat lapsing). Otherwise one of \`user\` (a team member in the dashboard), \`chat\` (a moderator's chat command via the bot), \`api\_key\` (a developer API key), \`oauth\_app\` (an OAuth-connected app), \`overlay\` (the overlay reporting start/finish) or \`bot\`.
- `data` (ChatCommandData, required) — Custom chat command execution payload.

Payload example:

```json
{
  "id": "evt_9f1e2d3c4b5a6978",
  "type": "chat.command",
  "created": "2019-08-24T14:15:22Z",
  "actor": {
    "type": "chat",
    "user_id": null,
    "platform": "twitch",
    "platform_id": "123456789",
    "login": "modname",
    "display_name": "ModName"
  },
  "data": {
    "platform": "twitch",
    "command": "string",
    "invoked_as": "string",
    "args": "string",
    "user_id": "string",
    "user_login": "string",
    "user_name": "string",
    "is_mod": true,
    "message_id": "string"
  }
}
```

**Responses**

- `200` — Return any 2xx quickly.
