Webhook Ingress API

Docs
Home Dashboard

Push messages to your chat room from external services, bots, and integrations.

SSN
Using Social Stream Ninja?

SSN has built-in Ninja Chatter support. Just copy your API key and enable the toggle in SSN.

Quick Setup

Endpoint

POST /rooms/{room_id}/ingress

Send a message to a chat room via HTTP POST request.

Authentication

Two authentication methods are supported:

1. API Key (Recommended)

Include your room's API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Find your API key in the Dashboard under "Bot & Webhook Integration" for each room.

2. HMAC Signature

Sign the request body using HMAC-SHA256 with your webhook secret:

X-Chat-Signature: sha256=COMPUTED_SIGNATURE

Request Body

FieldTypeDescription
type*required string Message type. Use "chat" for chat messages.
payload*required object Message payload containing the message data.

Payload Fields - Core

FieldTypeDescription
text*required string The message content to display in chat.
displayNameoptional string Display name for the message sender. Defaults to "webhook".
userIdoptional string Unique identifier for the sender.
avataroptional string URL to the sender's avatar image.
sourceoptional string Platform name (e.g., "youtube", "twitch", "discord").
sourceIconoptional string URL to an icon representing the source platform.

Payload Fields - Badges

FieldTypeDescription
badgesoptional array Array of badge objects. Each badge can have: src (image URL), type ("img" or "svg"), html (SVG markup).
isModeratoroptional boolean Whether the sender is a moderator.
nameColoroptional string CSS color for the display name.

Payload Fields - Donations

FieldTypeDescription
donationoptional string Donation amount as displayed (e.g., "$5.00", "500 bits").
donationValueoptional number Numeric donation value for sorting/filtering.
backgroundColoroptional string Background color for Super Chat style messages.
textColoroptional string Text color for Super Chat style messages.

Payload Fields - Memberships

FieldTypeDescription
membershipoptional string Membership status or tier (e.g., "MEMBER", "Tier 1 Sub").
subtitleoptional string Additional membership info (e.g., "12 months", "Gifted by User").

Payload Fields - Events

FieldTypeDescription
eventoptional string Event type: "follow", "raid", "subscription", "giftpurchase", "sponsorship", etc.
titleoptional string Event title or label.

Payload Fields - Additional

FieldTypeDescription
contentImageoptional string URL to content image (stickers, emotes, etc.).
replyTooptional string Name of user being replied to.
replyTextoptional string Text of message being replied to.
sourceNameoptional string Channel or stream name.
sourceImageoptional string Channel thumbnail or logo URL.

Top-Level Meta Field

In addition to the payload object, you can include a top-level meta field for custom data:

{
  "type": "chat",
  "payload": { ... },
  "meta": {
    "customField": "value",
    "anyOtherData": 123
  }
}

The meta field passes through to connected clients unchanged, useful for custom integrations.

Examples

Simple Message

curl -X POST "https://api.ninjachatter.com/rooms/YOUR_ROOM_ID/ingress" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "chat",
    "payload": {
      "text": "Hello from my bot!"
    }
  }'

Message with User Info

curl -X POST "https://api.ninjachatter.com/rooms/YOUR_ROOM_ID/ingress" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "chat",
    "payload": {
      "text": "Check out this stream!",
      "displayName": "StreamBot",
      "userId": "bot-123",
      "source": "twitch",
      "sourceIcon": "https://example.com/twitch-icon.png",
      "avatar": "https://example.com/bot-avatar.png"
    }
  }'

Super Chat / Donation

curl -X POST "https://api.ninjachatter.com/rooms/YOUR_ROOM_ID/ingress" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "chat",
    "payload": {
      "text": "Great stream! Keep it up!",
      "displayName": "GenerousViewer",
      "userId": "viewer-456",
      "source": "youtube",
      "donation": "$10.00",
      "donationValue": 10.00,
      "backgroundColor": "#1565c0",
      "textColor": "#ffffff"
    }
  }'

Event (Raid, Follow, etc.)

curl -X POST "https://api.ninjachatter.com/rooms/YOUR_ROOM_ID/ingress" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "event",
    "payload": {
      "text": "",
      "displayName": "BigStreamer",
      "event": "raid",
      "title": "RAID",
      "subtitle": "123 viewers"
    }
  }'

Response

StatusBodyDescription
202 queued Message accepted and queued for delivery.
202 filtered Message was filtered (blocked by bad word filter).
401 Unauthorized Invalid or missing API key.
400 Bad Request Invalid JSON payload.
404 Not Found Room does not exist.

Social Stream Ninja Integration

Social Stream Ninja has built-in support for Ninja Chatter. Push messages from YouTube, Twitch, TikTok, and 30+ platforms directly to your chat room with just a few clicks.

This integration allows you to consolidate chat from all your streaming platforms into one unified, shareable chat experience for your audience.

Quick Setup (2 Steps)

  1. Get your API Key from Ninja Chatter:
    • Go to Dashboard and create or select a room
    • Expand "Integrations" section
    • Copy your API Key (click "Copy Key")
  2. Enable in Social Stream Ninja:
    • Open SSN extension popup
    • Find "Send messages to Ninja Chatter" toggle and enable it
    • Paste your API key when prompted
    • Done! Messages will now flow to your Ninja Chatter room

Share with Your Audience

Once connected, share your chat link with viewers:

https://ninjachatter.com/YOUR_ROOM_ID

Viewers can watch chat from all your platforms in one place, without needing accounts or the SSN extension.

Advanced: Custom HTTP Integration

For developers building custom integrations or needing more control, you can send messages directly via HTTP POST:

Show manual setup instructions
  1. Create an HTTP POST request to: https://api.ninjachatter.com/rooms/YOUR_ROOM_ID/ingress
  2. Add headers:
    • Authorization: Bearer YOUR_API_KEY
    • Content-Type: application/json
  3. Send the payload:
    {
      "type": "chat",
      "payload": {
        "text": "{message}",
        "displayName": "{author}",
        "userId": "{authorId}",
        "source": "{platform}",
        "avatar": "{authorPhoto}"
      }
    }

SSN Field Mapping Reference

SSN FieldMaps ToDescription
{message}payload.textThe chat message content
{author}payload.displayNameUsername of the sender
{authorId}payload.userIdUnique user identifier
{platform}payload.sourcePlatform name (youtube, twitch, etc.)
{authorPhoto}payload.avatarUser's profile picture URL

Content Filtering & Moderation

Messages sent via webhook ingress are subject to the same filtering and moderation as regular chat messages.

Bad Word Filter

When enabled in room settings, the bad word filter automatically blocks messages containing inappropriate content:

To enable: Dashboard → Room Settings → "Enable chat filter"

Moderation Actions

Room moderators can take action on webhook users just like regular users:

Rate Limits

LimitValueScope
Messages per user20 / 10 secondsPer user ID
Messages per IP60 / 10 secondsPer source IP
Message size64 KB maxPer message

Security Best Practices

Related Documentation

Need Help?

If you have questions or need assistance with your integration: