AutoMod Message Hold
Sends a notification when a chatter's message in the chat of the channel specified in
broadcaster_user_id is held for review. This includes messages held by AutoMod and messages held
for other reasons, such as containing one of the channel's public blocked terms; for those,
level is 0. Messages that match any of the channel's private
blocked terms or blocked links don't trigger a notification, even if they also match public ones.
Subscription
- Type
automod.message.hold- Version
1
Authorization
Requires one of the following:
- A user access token that includes the moderator:manage:automod scope.The User ID associated with the token must match the moderator_user_id in the event's condition.
- An app access token.The application, through prior authorization, must have been granted:
- The moderator:manage:automod scope for the user represented by the moderator_user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name. Must beautomod.message.hold.versionStringRequiredThe subscription type version. Must be1.conditionObjectRequiredSubscription-specific parametersHide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredUser ID of the broadcaster channel.condition.moderator_user_idStringRequiredThe ID of the broadcaster or one of the broadcaster's moderators. To subscribe as the broadcaster, set it to the same ID as broadcaster_user_id.
transportObjectRequiredTransport-specific parameters.Hide child attributesShow child attributes
transport.methodStringRequiredThe transport method for EventSub.Possible values
webhookwebsocketconduit
transport.callbackStringThe callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
NOTE: Redirects are not followed.
transport.secretStringThe secret used to verify the signature. The secret must be an ASCII string that's a minimum of 10 characters long and a maximum of 100 characters long. For information about how the secret is used, see Verifying the event message.
Required if method is webhook. Don't specify it for other methods.
transport.session_idStringAn ID that identifies the WebSocket to send notifications to. When you connect to EventSub using WebSockets, the server returns the ID in the Welcome message.
Required if method is websocket. Don't specify it for other methods.
transport.conduit_idStringAn ID that identifies the conduit to send this notification to. When you create a conduit, the server returns the ID in the API response.
Required if method is conduit. Don't specify it for other methods.
Event Payload
subscriptionObjectMetadata about the subscription.Hide child attributesShow child attributes
subscription.idStringThe Subscription ID of the subscription.subscription.typeStringThe notification's subscription type.subscription.versionStringThe version of the subscription.subscription.statusStringThe status of the subscription.subscription.costIntegerHow much the subscription counts against your limit. See Subscription Limits for more information.subscription.conditionObjectSubscription-specific parameters.Hide child attributesShow child attributes
subscription.condition.broadcaster_user_idStringUser ID of the broadcaster channel.subscription.condition.moderator_user_idStringThe ID of the broadcaster or one of the broadcaster's moderators. To subscribe as the broadcaster, set it to the same ID as broadcaster_user_id.
subscription.created_atStringThe UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis conduit.
eventObjectThe event information.Hide child attributesShow child attributes
event.broadcaster_user_idStringThe ID of the broadcaster specified in the subscription condition.event.broadcaster_user_loginStringThe login of the broadcaster specified in the subscription condition.event.broadcaster_user_nameStringThe display name of the broadcaster specified in the subscription condition.event.user_idStringThe message sender's User ID.event.user_loginStringThe message sender's login name.event.user_nameStringThe message sender's display name.event.message_idStringThe ID of the message that was flagged by AutoMod.event.messageObjectThe body of the message.Hide child attributesShow child attributes
event.message.textStringThe contents of the message caught by AutoMod.event.message.fragmentsObject[]The message, split into text, emote and Cheermote fragments, in order. Together, the fragments make up the whole message, not only the parts that caused the hold.Hide child attributesShow child attributes
event.message.fragments.typeStringThe type of fragment. Any part of the message that isn't an emote or a Cheermote, such as a mention or a link, is text.Possible values
textemotecheermote
event.message.fragments.textStringMessage text within a fragment.event.message.fragments.emoteObjectNullableMetadata pertaining to the emote.Hide child attributesShow child attributes
event.message.fragments.emote.idStringAn ID that uniquely identifies this emote.event.message.fragments.emote.emote_set_idStringAn ID that identifies the emote set that the emote belongs to.
event.message.fragments.cheermoteObjectNullableMetadata pertaining to the cheermote.Hide child attributesShow child attributes
event.message.fragments.cheermote.prefixStringThe name portion of the Cheermote string that you use in chat to cheer Bits, converted to lowercase. The full Cheermote string is the concatenation of {prefix} + {number of Bits}.
For example, if the prefix is "cheer" and you want to cheer 100 Bits, the full Cheermote string is cheer100. When the Cheermote string is entered in chat, Twitch converts it to the image associated with the Bits tier that was cheered.
event.message.fragments.cheermote.bitsIntegerThe amount of Bits cheered.event.message.fragments.cheermote.tierIntegerThe minimum number of Bits for the Cheermote tier that the cheer reached. For example, if a Cheermote's tiers start at 1, 100, 1000, 5000 and 10000 Bits, cheer150 has atierof 100.
event.categoryStringThe AutoMod category that caused the hold.event.levelIntegerThe level of severity, from 1 to 4, where 1 is the most severe. AutoMod holds a message when its level is at or below the channel's AutoMod level for that category. Is 0 if the message was held for another reason, such as a blocked term.event.held_atStringThe UTC date and time (in RFC3339 format) of when Twitch received the chat message.
{
"type": "automod.message.hold",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"moderator_user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "automod.message.hold",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"moderator_user_id": "9001"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "automod.message.hold",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"moderator_user_id": "9001"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "automod.message.hold",
"version": "1",
"status": "enabled",
"cost": 0,
"condition": {
"broadcaster_user_id": "1337",
"moderator_user_id": "9001"
},
"created_at": "2023-04-11T10:11:12.123Z",
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
}
},
"event": {
"broadcaster_user_id": "1337",
"broadcaster_user_login": "blahblah",
"broadcaster_user_name": "blah",
"user_id": "456789012",
"user_login": "baduserbla",
"user_name": "baduser",
"message_id": "bad-message-id",
"message": {
"text": "This is a bad message badtextemote1 cheer100",
"fragments": [
{
"type": "text",
"text": "This is a bad message ",
"emote": null,
"cheermote": null
},
{
"type": "emote",
"text": "badtextemote1",
"emote": {
"id": "emote-123",
"emote_set_id": "set-emote-1"
},
"cheermote": null
},
{
"type": "text",
"text": " ",
"emote": null,
"cheermote": null
},
{
"type": "cheermote",
"text": "cheer100",
"emote": null,
"cheermote": {
"prefix": "cheer",
"bits": 100,
"tier": 100
}
}
]
},
"category": "aggression",
"level": 4,
"held_at": "2022-12-02T15:00:00Z"
}
}AutoMod Message Hold V2
The automod.message.hold subscription type notifies a user if a message was caught by AutoMod for review. Messages that match any of the channel's private blocked terms or blocked links don't trigger a notification, even if they also match public ones.
Subscription
- Type
automod.message.hold- Version
2
Authorization
Requires one of the following:
- A user access token that includes the moderator:manage:automod scope.The User ID associated with the token must match the moderator_user_id in the event's condition.
- An app access token.The application, through prior authorization, must have been granted:
- The moderator:manage:automod scope for the user represented by the moderator_user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name:automod.message.hold.versionStringRequiredThe subscription type version:2.conditionObjectRequiredSubscription-specific parameters.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredUser ID of the broadcaster channel.condition.moderator_user_idStringRequiredThe ID of the broadcaster or one of the broadcaster's moderators. To subscribe as the broadcaster, set it to the same ID as broadcaster_user_id.
transportObjectRequiredTransport-specific parameters.Hide child attributesShow child attributes
transport.methodStringRequiredThe transport method for EventSub.Possible values
webhookwebsocketconduit
transport.callbackStringThe callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
NOTE: Redirects are not followed.
transport.secretStringThe secret used to verify the signature. The secret must be an ASCII string that's a minimum of 10 characters long and a maximum of 100 characters long. For information about how the secret is used, see Verifying the event message.
Required if method is webhook. Don't specify it for other methods.
transport.session_idStringAn ID that identifies the WebSocket to send notifications to. When you connect to EventSub using WebSockets, the server returns the ID in the Welcome message.
Required if method is websocket. Don't specify it for other methods.
transport.conduit_idStringAn ID that identifies the conduit to send this notification to. When you create a conduit, the server returns the ID in the API response.
Required if method is conduit. Don't specify it for other methods.
Event Payload
subscriptionObjectMetadata about the subscription.Hide child attributesShow child attributes
subscription.idStringThe Subscription ID of the subscription.subscription.typeStringThe notification's subscription type.subscription.versionStringThe version of the subscription.subscription.statusStringThe status of the subscription.subscription.costIntegerHow much the subscription counts against your limit. See Subscription Limits for more information.subscription.conditionObjectSubscription-specific parameters.Hide child attributesShow child attributes
subscription.condition.broadcaster_user_idStringUser ID of the broadcaster channel.subscription.condition.moderator_user_idStringThe ID of the broadcaster or one of the broadcaster's moderators. To subscribe as the broadcaster, set it to the same ID as broadcaster_user_id.
subscription.created_atStringThe UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis conduit.
eventObjectThe event information.Hide child attributesShow child attributes
event.broadcaster_user_idStringThe ID of the broadcaster specified in the request.event.broadcaster_user_loginStringThe login of the broadcaster specified in the request.event.broadcaster_user_nameStringThe display name of the broadcaster specified in the request.event.user_idStringThe message sender's user ID.event.user_loginStringThe message sender's login name.event.user_nameStringThe message sender's display name.event.message_idStringThe ID of the held message.event.messageObjectThe body of the message.Hide child attributesShow child attributes
event.message.textStringThe contents of the message caught by automod.event.message.fragmentsObject[]The message, split into text, emote and Cheermote fragments, in order. Together, the fragments make up the whole message. For the parts that caused the hold, seeautomod.boundariesandblocked_term.terms_found.boundary.Hide child attributesShow child attributes
event.message.fragments.typeStringThe type of fragment. Any part of the message that isn't an emote or a Cheermote, such as a mention or a link, is text.Possible values
textemotecheermote
event.message.fragments.textStringMessage text in a fragment.event.message.fragments.emoteObjectNullableMetadata pertaining to the emote.Hide child attributesShow child attributes
event.message.fragments.emote.idStringAn ID that uniquely identifies this emote.event.message.fragments.emote.emote_set_idStringAn ID that identifies the emote set that the emote belongs to.
event.message.fragments.cheermoteObjectNullableMetadata pertaining to the cheermote.Hide child attributesShow child attributes
event.message.fragments.cheermote.prefixStringThe name portion of the Cheermote string that you use in chat to cheer Bits, converted to lowercase. The full Cheermote string is the concatenation of {prefix} + {number of Bits}.
For example, if the prefix is "cheer" and you want to cheer 100 Bits, the full Cheermote string is cheer100. When the Cheermote string is entered in chat, Twitch converts it to the image associated with the Bits tier that was cheered.
event.message.fragments.cheermote.bitsIntegerThe amount of Bits cheered.event.message.fragments.cheermote.tierIntegerThe minimum number of Bits for the Cheermote tier that the cheer reached. For example, if a Cheermote's tiers start at 1, 100, 1000, 5000 and 10000 Bits, cheer150 has atierof 100.
event.held_atStringThe UTC date and time (in RFC3339 format) of when Twitch received the chat message.event.reasonStringPossible values
automodblocked_termblocked_linkunknownAutoMod held the message for a reason that isn't listed here.
event.automodObjectNullableThe details of the AutoMod check that caught the message. Is null unlessreasonis automod.Hide child attributesShow child attributes
event.automod.categoryStringThe category of the caught message.event.automod.levelIntegerThe level of severity, from 1 to 4, where 1 is the most severe. AutoMod holds a message when its level is at or below the channel's AutoMod level for that category. Is 0 if AutoMod couldn't determine the category.event.automod.boundariesObject[]The bounds of the text that caused the message to be caught.Hide child attributesShow child attributes
event.automod.boundaries.start_posIntegerThe position of the first character of the problem text. Positions start at 0 and count Unicode code points, not bytes or UTF-16 code units.event.automod.boundaries.end_posIntegerThe position of the last character of the problem text (inclusive). Positions start at 0 and count Unicode code points, not bytes or UTF-16 code units.
event.blocked_termObjectNullableThe details of the blocked terms or blocked links that caught the message. Is null unlessreasonis blocked_term or blocked_link. At most one ofautomodandblocked_termis populated, even if the message also matched the other check.Hide child attributesShow child attributes
event.blocked_term.terms_foundObject[]The blocked terms and blocked links found in the message, one entry per occurrence. A term that appears more than once in the message has an entry for each occurrence.Hide child attributesShow child attributes
event.blocked_term.terms_found.term_idStringThe id of the blocked term found.event.blocked_term.terms_found.boundaryObjectThe bounds of the text that caused the message to be caught.Hide child attributesShow child attributes
event.blocked_term.terms_found.boundary.start_posIntegerThe position of the first character of the problem text. Positions start at 0 and count Unicode code points, not bytes or UTF-16 code units.event.blocked_term.terms_found.boundary.end_posIntegerThe position of the last character of the problem text (inclusive). Positions start at 0 and count Unicode code points, not bytes or UTF-16 code units.
event.blocked_term.terms_found.owner_broadcaster_user_idStringThe id of the broadcaster that owns the blocked term.event.blocked_term.terms_found.owner_broadcaster_user_loginStringThe login of the broadcaster that owns the blocked term.event.blocked_term.terms_found.owner_broadcaster_user_nameStringThe display name of the broadcaster that owns the blocked term.
{
"type": "automod.message.hold",
"version": "2",
"condition": {
"broadcaster_user_id": "1337",
"moderator_user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "automod.message.hold",
"version": "2",
"status": "enabled",
"cost": 0,
"condition": {
"broadcaster_user_id": "1337",
"moderator_user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
},
"created_at": "2023-04-11T10:11:12.123Z"
},
"event": {
"broadcaster_user_id": "1337",
"broadcaster_user_login": "blah",
"broadcaster_user_name": "blahblah",
"user_id": "4242",
"user_login": "baduser",
"user_name": "badbaduser",
"message_id": "bcd4f4a4-2b6d-4a84-a1d4-e1e5d8c0a6b2",
"message": {
"text": "This is a bad message… cheer1000",
"fragments": [
{
"type": "text",
"text": "This is a bad message… ",
"cheermote": null,
"emote": null
},
{
"type": "cheermote",
"text": "cheer1000",
"cheermote": {
"prefix": "cheer",
"bits": 1000,
"tier": 1000
},
"emote": null
}
]
},
"reason": "automod",
"automod": {
"category": "aggression",
"level": 1,
"boundaries": [
{
"start_pos": 0,
"end_pos": 10
},
{
"start_pos": 20,
"end_pos": 30
}
]
},
"blocked_term": null,
"held_at": "2022-12-02T15:00:00Z"
}
}AutoMod Message Update
The automod.message.update subscription type sends a notification when the broadcaster or a moderator approves or denies a message that AutoMod held for review. No notification is sent when a held message expires. A message can still be denied after it expires, and that sends a notification with status set to denied. Messages that match any of the channel's private blocked terms or blocked links don't trigger a notification, even if they also match public ones.
Subscription
- Type
automod.message.update- Version
1
Authorization
Requires one of the following:
- A user access token that includes the moderator:manage:automod scope.The User ID associated with the token must match the moderator_user_id in the event's condition.
- An app access token.The application, through prior authorization, must have been granted:
- The moderator:manage:automod scope for the user represented by the moderator_user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name:automod.message.update.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredUser ID of the broadcaster (channel). Maximum:1.condition.moderator_user_idStringRequiredThe ID of the broadcaster or one of the broadcaster's moderators. The subscription isn't limited to this user's actions: it receives every approval or denial in the broadcaster's channel.
transportObjectRequiredTransport-specific parameters.Hide child attributesShow child attributes
transport.methodStringRequiredThe transport method for EventSub.Possible values
webhookwebsocketconduit
transport.callbackStringThe callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
NOTE: Redirects are not followed.
transport.secretStringThe secret used to verify the signature. The secret must be an ASCII string that's a minimum of 10 characters long and a maximum of 100 characters long. For information about how the secret is used, see Verifying the event message.
Required if method is webhook. Don't specify it for other methods.
transport.session_idStringAn ID that identifies the WebSocket to send notifications to. When you connect to EventSub using WebSockets, the server returns the ID in the Welcome message.
Required if method is websocket. Don't specify it for other methods.
transport.conduit_idStringAn ID that identifies the conduit to send this notification to. When you create a conduit, the server returns the ID in the API response.
Required if method is conduit. Don't specify it for other methods.
Event Payload
subscriptionObjectMetadata about the subscription.Hide child attributesShow child attributes
subscription.idStringThe Subscription ID of the subscription.subscription.typeStringThe notification's subscription type.subscription.versionStringThe version of the subscription.subscription.statusStringThe status of the subscription.subscription.costIntegerHow much the subscription counts against your limit. See Subscription Limits for more information.subscription.conditionObjectSubscription-specific parameters.Hide child attributesShow child attributes
subscription.condition.broadcaster_user_idStringUser ID of the broadcaster (channel). Maximum:1.subscription.condition.moderator_user_idStringThe ID of the broadcaster or one of the broadcaster's moderators. The subscription isn't limited to this user's actions: it receives every approval or denial in the broadcaster's channel.
subscription.created_atStringThe UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis conduit.
eventObjectThe event information.Hide child attributesShow child attributes
event.broadcaster_user_idStringThe ID of the broadcaster specified in the request.event.broadcaster_user_loginStringThe login of the broadcaster specified in the request.event.broadcaster_user_nameStringThe display name of the broadcaster specified in the request.event.user_idStringThe message sender's user ID.event.user_loginStringThe message sender's login name.event.user_nameStringThe message sender's display name.event.moderator_user_idStringThe ID of the user who approved or denied the message. This is the broadcaster or one of the broadcaster's moderators, and may differ from the moderator_user_id in the subscription's condition.event.moderator_user_nameStringThe display name of the user who approved or denied the message.event.moderator_user_loginStringThe login of the user who approved or denied the message.event.message_idStringThe ID of the message that was flagged by automod.event.messageObjectThe body of the message.Hide child attributesShow child attributes
event.message.textStringThe contents of the message caught by automod.event.message.fragmentsObject[]The message, split into text, emote and Cheermote fragments, in order. Together, the fragments make up the whole message, not only the parts that caused the hold.Hide child attributesShow child attributes
event.message.fragments.typeStringThe type of fragment. Any part of the message that isn't an emote or a Cheermote, such as a mention or a link, is text.Possible values
textemotecheermote
event.message.fragments.textStringMessage text in a fragment.event.message.fragments.emoteObjectNullableMetadata pertaining to the emote.Hide child attributesShow child attributes
event.message.fragments.emote.idStringAn ID that uniquely identifies this emote.event.message.fragments.emote.emote_set_idStringAn ID that identifies the emote set that the emote belongs to.
event.message.fragments.cheermoteObjectNullableMetadata pertaining to the cheermote.Hide child attributesShow child attributes
event.message.fragments.cheermote.prefixStringThe name portion of the Cheermote string that you use in chat to cheer Bits, converted to lowercase. The full Cheermote string is the concatenation of {prefix} + {number of Bits}.
For example, if the prefix is "cheer" and you want to cheer 100 Bits, the full Cheermote string is cheer100. When the Cheermote string is entered in chat, Twitch converts it to the image associated with the Bits tier that was cheered.
event.message.fragments.cheermote.bitsIntegerThe amount of Bits cheered.event.message.fragments.cheermote.tierIntegerThe minimum number of Bits for the Cheermote tier that the cheer reached. For example, if a Cheermote's tiers start at 1, 100, 1000, 5000 and 10000 Bits, cheer150 has atierof 100.
event.categoryStringThe AutoMod category that caused the hold.event.levelIntegerThe level of severity, from 1 to 4, where 1 is the most severe. AutoMod holds a message when its level is at or below the channel's AutoMod level for that category. Is 0 if the message was held for another reason, such as a blocked term.event.statusStringThe message's status.Possible values
approvedA moderator or the broadcaster allowed the message.deniedA moderator or the broadcaster denied the message.
event.held_atStringThe UTC date and time (in RFC3339 format) of when Twitch received the chat message. It doesn't change when the message is approved or denied.
{
"type": "automod.message.update",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"moderator_user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "automod.message.update",
"version": "1",
"status": "enabled",
"cost": 0,
"condition": {
"broadcaster_user_id": "1337",
"moderator_user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
},
"created_at": "2023-04-11T10:11:12.123Z"
},
"event": {
"broadcaster_user_id": "1337",
"broadcaster_user_name": "blah",
"broadcaster_user_login": "blahblah",
"user_id": "456789012",
"user_name": "baduser",
"user_login": "baduserbla",
"moderator_user_id": "9001",
"moderator_user_login": "the_mod",
"moderator_user_name": "The_Mod",
"message_id": "bad-message-id",
"message": {
"text": "This is a bad message badtextemote1 cheer100",
"fragments": [
{
"type": "text",
"text": "This is a bad message ",
"emote": null,
"cheermote": null
},
{
"type": "emote",
"text": "badtextemote1",
"emote": {
"id": "emote-123",
"emote_set_id": "set-emote-1"
},
"cheermote": null
},
{
"type": "text",
"text": " ",
"emote": null,
"cheermote": null
},
{
"type": "cheermote",
"text": "cheer100",
"emote": null,
"cheermote": {
"prefix": "cheer",
"bits": 100,
"tier": 100
}
}
]
},
"category": "aggression",
"level": 4,
"status": "approved",
"held_at": "2022-12-02T15:00:00Z"
}
}AutoMod Message Update V2
The automod.message.update subscription type sends a notification when the broadcaster or a moderator approves or denies a message that AutoMod held for review. No notification is sent when a held message expires. A message can still be denied after it expires, and that sends a notification with status set to denied. Messages that match any of the channel's private blocked terms or blocked links don't trigger a notification, even if they also match public ones.
Subscription
- Type
automod.message.update- Version
2
Authorization
Requires one of the following:
- A user access token that includes the moderator:manage:automod scope.The User ID associated with the token must match the moderator_user_id in the event's condition.
- An app access token.The application, through prior authorization, must have been granted:
- The moderator:manage:automod scope for the user represented by the moderator_user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name:automod.message.update.versionStringRequiredThe subscription type version:2.conditionObjectRequiredSubscription-specific parameters.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredUser ID of the broadcaster (channel). Maximum:1.condition.moderator_user_idStringRequiredThe ID of the broadcaster or one of the broadcaster's moderators. The subscription isn't limited to this user's actions: it receives every approval or denial in the broadcaster's channel.
transportObjectRequiredTransport-specific parameters.Hide child attributesShow child attributes
transport.methodStringRequiredThe transport method for EventSub.Possible values
webhookwebsocketconduit
transport.callbackStringThe callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
NOTE: Redirects are not followed.
transport.secretStringThe secret used to verify the signature. The secret must be an ASCII string that's a minimum of 10 characters long and a maximum of 100 characters long. For information about how the secret is used, see Verifying the event message.
Required if method is webhook. Don't specify it for other methods.
transport.session_idStringAn ID that identifies the WebSocket to send notifications to. When you connect to EventSub using WebSockets, the server returns the ID in the Welcome message.
Required if method is websocket. Don't specify it for other methods.
transport.conduit_idStringAn ID that identifies the conduit to send this notification to. When you create a conduit, the server returns the ID in the API response.
Required if method is conduit. Don't specify it for other methods.
Event Payload
subscriptionObjectMetadata about the subscription.Hide child attributesShow child attributes
subscription.idStringThe Subscription ID of the subscription.subscription.typeStringThe notification's subscription type.subscription.versionStringThe version of the subscription.subscription.statusStringThe status of the subscription.subscription.costIntegerHow much the subscription counts against your limit. See Subscription Limits for more information.subscription.conditionObjectSubscription-specific parameters.Hide child attributesShow child attributes
subscription.condition.broadcaster_user_idStringUser ID of the broadcaster (channel). Maximum:1.subscription.condition.moderator_user_idStringThe ID of the broadcaster or one of the broadcaster's moderators. The subscription isn't limited to this user's actions: it receives every approval or denial in the broadcaster's channel.
subscription.created_atStringThe UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis conduit.
eventObjectThe event information.Hide child attributesShow child attributes
event.broadcaster_user_idStringThe ID of the broadcaster specified in the request.event.broadcaster_user_loginStringThe login of the broadcaster specified in the request.event.broadcaster_user_nameStringThe display name of the broadcaster specified in the request.event.user_idStringThe message sender's user ID.event.user_loginStringThe message sender's login name.event.user_nameStringThe message sender's display name.event.moderator_user_idStringThe ID of the user who approved or denied the message. This is the broadcaster or one of the broadcaster's moderators, and may differ from the moderator_user_id in the subscription's condition.event.moderator_user_nameStringThe display name of the user who approved or denied the message.event.moderator_user_loginStringThe login of the user who approved or denied the message.event.message_idStringThe ID of the message that was flagged by automod.event.messageObjectThe body of the message.Hide child attributesShow child attributes
event.message.textStringThe contents of the message caught by automod.event.message.fragmentsObject[]The message, split into text, emote and Cheermote fragments, in order. Together, the fragments make up the whole message. For the parts that caused the hold, seeautomod.boundariesandblocked_term.terms_found.boundary.Hide child attributesShow child attributes
event.message.fragments.textStringMessage text in a fragment.event.message.fragments.typeStringThe type of fragment. Any part of the message that isn't an emote or a Cheermote, such as a mention or a link, is text.Possible values
textemotecheermote
event.message.fragments.emoteObjectNullableMetadata pertaining to the emote.Hide child attributesShow child attributes
event.message.fragments.emote.idStringAn ID that uniquely identifies this emote.event.message.fragments.emote.emote_set_idStringAn ID that identifies the emote set that the emote belongs to.
event.message.fragments.cheermoteObjectNullableMetadata pertaining to the cheermote.Hide child attributesShow child attributes
event.message.fragments.cheermote.prefixStringThe name portion of the Cheermote string that you use in chat to cheer Bits, converted to lowercase. The full Cheermote string is the concatenation of {prefix} + {number of Bits}.
For example, if the prefix is "cheer" and you want to cheer 100 Bits, the full Cheermote string is cheer100. When the Cheermote string is entered in chat, Twitch converts it to the image associated with the Bits tier that was cheered.
event.message.fragments.cheermote.bitsIntegerThe amount of Bits cheered.event.message.fragments.cheermote.tierIntegerThe minimum number of Bits for the Cheermote tier that the cheer reached. For example, if a Cheermote's tiers start at 1, 100, 1000, 5000 and 10000 Bits, cheer150 has atierof 100.
event.statusStringThe message's status.Possible values
approvedA moderator or the broadcaster allowed the message.deniedA moderator or the broadcaster denied the message.
event.held_atStringThe UTC date and time (in RFC3339 format) of when Twitch received the chat message. It doesn't change when the message is approved or denied.event.reasonStringThe reason why the message was caught.Possible values
automodblocked_termblocked_linkunknownAutoMod held the message for a reason that isn't listed here.
event.automodObjectNullableThe details of the AutoMod check that caught the message. Is null unlessreasonis automod.Hide child attributesShow child attributes
event.automod.categoryStringThe category of the caught message.event.automod.levelIntegerThe level of severity, from 1 to 4, where 1 is the most severe. AutoMod holds a message when its level is at or below the channel's AutoMod level for that category. Is 0 if AutoMod couldn't determine the category.event.automod.boundariesObject[]The bounds of the text that caused the message to be caught.Hide child attributesShow child attributes
event.automod.boundaries.start_posIntegerThe position of the first character of the problem text. Positions start at 0 and count Unicode code points, not bytes or UTF-16 code units.event.automod.boundaries.end_posIntegerThe position of the last character of the problem text (inclusive). Positions start at 0 and count Unicode code points, not bytes or UTF-16 code units.
event.blocked_termObjectNullableThe details of the blocked terms or blocked links that caught the message. Is null unlessreasonis blocked_term or blocked_link. At most one ofautomodandblocked_termis populated, even if the message also matched the other check.Hide child attributesShow child attributes
event.blocked_term.terms_foundObject[]The blocked terms and blocked links found in the message, one entry per occurrence. A term that appears more than once in the message has an entry for each occurrence.Hide child attributesShow child attributes
event.blocked_term.terms_found.term_idStringThe id of the blocked term found.event.blocked_term.terms_found.boundaryObjectThe bounds of the text that caused the message to be caught.Hide child attributesShow child attributes
event.blocked_term.terms_found.boundary.start_posIntegerThe position of the first character of the problem text. Positions start at 0 and count Unicode code points, not bytes or UTF-16 code units.event.blocked_term.terms_found.boundary.end_posIntegerThe position of the last character of the problem text (inclusive). Positions start at 0 and count Unicode code points, not bytes or UTF-16 code units.
event.blocked_term.terms_found.owner_broadcaster_user_idStringThe id of the broadcaster that owns the blocked term.event.blocked_term.terms_found.owner_broadcaster_user_loginStringThe login of the broadcaster that owns the blocked term.event.blocked_term.terms_found.owner_broadcaster_user_nameStringThe display name of the broadcaster that owns the blocked term.
{
"type": "automod.message.update",
"version": "2",
"condition": {
"broadcaster_user_id": "1337",
"moderator_user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "automod.message.update",
"version": "2",
"status": "enabled",
"cost": 0,
"condition": {
"broadcaster_user_id": "1337",
"moderator_user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
},
"created_at": "2023-04-11T10:11:12.123Z"
},
"event": {
"broadcaster_user_id": "1337",
"broadcaster_user_login": "blah",
"broadcaster_user_name": "blahblah",
"moderator_user_id": "9001",
"moderator_user_login": "the_mod",
"moderator_user_name": "The_Mod",
"user_id": "4242",
"user_login": "baduser",
"user_name": "badbaduser",
"message_id": "bad-message-id",
"message": {
"text": "This is a bad message… cheer1000",
"fragments": [
{
"type": "text",
"text": "This is a bad message… ",
"cheermote": null,
"emote": null
},
{
"type": "cheermote",
"text": "cheer1000",
"cheermote": {
"prefix": "cheer",
"bits": 1000,
"tier": 1000
},
"emote": null
}
]
},
"reason": "blocked_term",
"automod": null,
"blocked_term": {
"terms_found": [
{
"term_id": "123",
"owner_broadcaster_user_id": "1337",
"owner_broadcaster_user_login": "blah",
"owner_broadcaster_user_name": "blahblah",
"boundary": {
"start_pos": 0,
"end_pos": 31
}
}
]
},
"status": "approved",
"held_at": "2022-12-02T15:00:00Z"
}
}AutoMod Settings Update
The automod.settings.update subscription type sends a notification each time a broadcaster's AutoMod settings are saved, even if no level changed. This includes the changes that Shield Mode makes when it's turned on or off, and default settings that Twitch applies automatically. The notification contains all of the channel's current levels, not only the ones that changed.
Subscription
- Type
automod.settings.update- Version
1
Authorization
Requires one of the following:
- A user access token that includes the moderator:read:automod_settings scope.The User ID associated with the token must match the moderator_user_id in the event's condition.
- An app access token.The application, through prior authorization, must have been granted:
- The moderator:read:automod_settings scope for the user represented by the moderator_user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name:automod.settings.update.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredUser ID of the broadcaster (channel). Maximum:1.condition.moderator_user_idStringRequiredThe ID of the broadcaster or one of the broadcaster's moderators.
transportObjectRequiredTransport-specific parameters.Hide child attributesShow child attributes
transport.methodStringRequiredThe transport method for EventSub.Possible values
webhookwebsocketconduit
transport.callbackStringThe callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
NOTE: Redirects are not followed.
transport.secretStringThe secret used to verify the signature. The secret must be an ASCII string that's a minimum of 10 characters long and a maximum of 100 characters long. For information about how the secret is used, see Verifying the event message.
Required if method is webhook. Don't specify it for other methods.
transport.session_idStringAn ID that identifies the WebSocket to send notifications to. When you connect to EventSub using WebSockets, the server returns the ID in the Welcome message.
Required if method is websocket. Don't specify it for other methods.
transport.conduit_idStringAn ID that identifies the conduit to send this notification to. When you create a conduit, the server returns the ID in the API response.
Required if method is conduit. Don't specify it for other methods.
Event Payload
subscriptionObjectMetadata about the subscription.Hide child attributesShow child attributes
subscription.idStringThe Subscription ID of the subscription.subscription.typeStringThe notification's subscription type.subscription.versionStringThe version of the subscription.subscription.statusStringThe status of the subscription.subscription.costIntegerHow much the subscription counts against your limit. See Subscription Limits for more information.subscription.conditionObjectSubscription-specific parameters.Hide child attributesShow child attributes
subscription.condition.broadcaster_user_idStringUser ID of the broadcaster (channel). Maximum:1.subscription.condition.moderator_user_idStringThe ID of the broadcaster or one of the broadcaster's moderators.
subscription.created_atStringThe UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis conduit.
eventObjectThe event information.Hide child attributesShow child attributes
event.broadcaster_user_idStringThe ID of the broadcaster specified in the request.event.broadcaster_user_loginStringThe login of the broadcaster specified in the request.event.broadcaster_user_nameStringThe user name of the broadcaster specified in the request.event.moderator_user_idStringThe ID of the user who changed the settings. This is the broadcaster or one of the broadcaster's moderators. If Twitch changed the settings automatically, such as when it turns on AutoMod for a channel that has never configured it, this is the ID of Twitch's own account (12826).event.moderator_user_loginStringThe login of the user who changed the settings.event.moderator_user_nameStringThe display name of the user who changed the settings.event.bullyingIntegerThe Automod level for hostility involving name calling or insults.event.overall_levelIntegerNullableThe default AutoMod level for the broadcaster. This field is null if the channel's AutoMod settings don't match one of the default levels, such as when the broadcaster has set one or more of the individual settings.event.disabilityIntegerThe Automod level for discrimination against disability.event.race_ethnicity_or_religionIntegerThe Automod level for racial discrimination.event.misogynyIntegerThe Automod level for discrimination against women.event.sexuality_sex_or_genderIntegerThe AutoMod level for discrimination based on sexuality, sex, or gender.event.aggressionIntegerThe Automod level for hostility involving aggression.event.sex_based_termsIntegerThe Automod level for sexual content.event.swearingIntegerThe Automod level for profanity.
{
"type": "automod.settings.update",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"moderator_user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "automod.settings.update",
"version": "1",
"status": "enabled",
"cost": 0,
"condition": {
"broadcaster_user_id": "1337",
"moderator_user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
},
"created_at": "2023-04-11T10:11:12.123Z"
},
"event": {
"broadcaster_user_id": "1337",
"broadcaster_user_login": "cooluser",
"broadcaster_user_name": "CoolUser",
"moderator_user_id": "9001",
"moderator_user_login": "coolmod",
"moderator_user_name": "CoolMod",
"bullying": 3,
"overall_level": null,
"disability": 3,
"race_ethnicity_or_religion": 3,
"misogyny": 3,
"sexuality_sex_or_gender": 3,
"aggression": 3,
"sex_based_terms": 3,
"swearing": 0
}
}AutoMod Terms Update
The automod.terms.update subscription type sends a notification when a term is added to or removed from the broadcaster's AutoMod blocked terms or permitted terms list. Changes to private terms are not sent. Adding a term that's on the other list moves it to the new list. You receive only the add_blocked or add_permitted notification, not a remove_permitted or remove_blocked notification for the list the term left. If the broadcaster removes a blocked term without logging the removal for moderators, no notification is sent.
Subscription
- Type
automod.terms.update- Version
1
Authorization
Requires one of the following:
- A user access token that includes the moderator:manage:automod scope.The User ID associated with the token must match the moderator_user_id in the event's condition.
- An app access token.The application, through prior authorization, must have been granted:
- The moderator:manage:automod scope for the user represented by the moderator_user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name:automod.terms.update.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredUser ID of the broadcaster (channel). Maximum:1.condition.moderator_user_idStringRequiredThe ID of the broadcaster or one of the broadcaster's moderators. Maximum: 1.
transportObjectRequiredTransport-specific parameters.Hide child attributesShow child attributes
transport.methodStringRequiredThe transport method for EventSub.Possible values
webhookwebsocketconduit
transport.callbackStringThe callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
NOTE: Redirects are not followed.
transport.secretStringThe secret used to verify the signature. The secret must be an ASCII string that's a minimum of 10 characters long and a maximum of 100 characters long. For information about how the secret is used, see Verifying the event message.
Required if method is webhook. Don't specify it for other methods.
transport.session_idStringAn ID that identifies the WebSocket to send notifications to. When you connect to EventSub using WebSockets, the server returns the ID in the Welcome message.
Required if method is websocket. Don't specify it for other methods.
transport.conduit_idStringAn ID that identifies the conduit to send this notification to. When you create a conduit, the server returns the ID in the API response.
Required if method is conduit. Don't specify it for other methods.
Event Payload
subscriptionObjectMetadata about the subscription.Hide child attributesShow child attributes
subscription.idStringThe Subscription ID of the subscription.subscription.typeStringThe notification's subscription type.subscription.versionStringThe version of the subscription.subscription.statusStringThe status of the subscription.subscription.costIntegerHow much the subscription counts against your limit. See Subscription Limits for more information.subscription.conditionObjectSubscription-specific parameters.Hide child attributesShow child attributes
subscription.condition.broadcaster_user_idStringUser ID of the broadcaster (channel). Maximum:1.subscription.condition.moderator_user_idStringThe ID of the broadcaster or one of the broadcaster's moderators. Maximum: 1.
subscription.created_atStringThe UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis conduit.
eventObjectThe event information.Hide child attributesShow child attributes
event.broadcaster_user_idStringThe ID of the broadcaster specified in the request.event.broadcaster_user_loginStringThe login of the broadcaster specified in the request.event.broadcaster_user_nameStringThe user name of the broadcaster specified in the request.event.moderator_user_idStringThe ID of the user who added or removed the term. This is the broadcaster or one of the broadcaster's moderators, and may differ from the moderator_user_id in the subscription's condition.event.moderator_user_loginStringThe login of the user who added or removed the term.event.moderator_user_nameStringThe display name of the user who added or removed the term.event.actionStringThe status change applied to the terms.Possible values
add_permittedremove_permittedadd_blockedremove_blocked
event.from_automodBooleanIndicates whether this term was added or removed due to an AutoMod message approve/deny action.event.termsString[]The list of terms that had a status change.
{
"type": "automod.terms.update",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"moderator_user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "automod.terms.update",
"version": "1",
"status": "enabled",
"cost": 0,
"condition": {
"broadcaster_user_id": "1337",
"moderator_user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
},
"created_at": "2023-04-11T10:11:12.123Z"
},
"event": {
"broadcaster_user_id": "1337",
"broadcaster_user_name": "BlahBlah",
"broadcaster_user_login": "blahblah",
"moderator_user_id": "9001",
"moderator_user_login": "the_mod",
"moderator_user_name": "The_Mod",
"action": "add_blocked",
"from_automod": true,
"terms": ["automodterm1"]
}
}