> For the complete documentation index, see [llms.txt](https://docs.ggwp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ggwp.com/api-docs-chat/standard-package/chat-api-v3.md).

# Chat API v3

\[ Base URL: `api.ggwp.com`]

`POST` /chat/v3/message

## **Description**

This API endpoint will process an input message, session id, and user id, along with configurable filter sensitivity settings, and return information at 4 levels:

* **Message Details** - indicators for the presence and severity of toxic content, as well as different variations of the input message removing toxicity.
* **Player Details** - attributes to describe the behavior of that particular user up until that point in the conversation. This includes player mood, reputation score, and current status.
* **Conversation Summary** - metrics that explain prior activity in that session. These include session duration, message volume, participant count, conversation mood, and total incidents detected.
* **Recommendations** - information about the penalties imposed upon that particular user due to a history or recent series of toxic behaviors. This includes the penalty itself, the trigger message and time, and the duration of the penalty. The `recommended_message` field will return an empty string while a penalty is in place. This part of the API output will provide the following penalties:
  * Session-mute: the user will be muted for the remaining duration of the session/match.
  * Mute: the user will be muted across all sessions/matches for a specific duration of time.

## **Headers**

Configuration settings can be provided either through your GGWP account setup (recommended) or dynamically on each request using HTTP headers.

<table><thead><tr><th width="219.04296875">Header</th><th width="116.37890625">Required</th><th>Description</th></tr></thead><tbody><tr><td><strong>x-api-key</strong></td><td>Yes</td><td>Your GGWP API key used for authentication.</td></tr><tr><td><strong>Content-Type</strong></td><td>Yes</td><td>Must be set to <code>application/json</code>.</td></tr><tr><td><strong>x-api-config</strong></td><td>Optional</td><td>Base64-encoded JSON object with per-request filter sensitivity settings. See below for more details. If not provided, default or onboarding-time settings apply.</td></tr></tbody></table>

#### Filter Sensitivity Settings (via `x-api-config`)

For severity-based categories, sensitivity controls which severity levels are blocked:

* `off` — do not filter that category
* `low` — filter `high` severity only
* `medium` — filter `medium` and `high` severity
* `high` — filter `low`, `medium`, and `high` severity

Sensitivity is inverse to severity. A higher sensitivity blocks more content.

#### Supported Categories

<details>

<summary><code>age_disclosure</code> <em>[off | low | medium | high]</em></summary>

Flags messages where a user explicitly or implicitly indicates their age. This category is informational and supports age-aware safety controls rather than harmful-intent detection.

**Severity taxonomy**

* `high severity` — indications that a user is under `13`
* `medium severity` — indications that a user is under `18` but at least `13`
* `low severity` — indications that a user is under `21`

**Examples by severity**

* `high severity` — `"I'm 10"`, `"I'm 12 years old"`, `"I'm in elementary school"`, `"I'm a kid"`
* `medium severity` — `"I'm 15"`, `"I'm 17"`, `"I'm in high school"`, `"I'm a minor"`
* `low severity` — `"I'm 19"`, `"I'm not 21 yet"`, `"I can't legally drink"`, `"I'm 20"`

</details>

<details>

<summary><code>drugs</code> <em>[off | low | medium | high]</em></summary>

Flags language that references illegal drugs, misuse of controlled substances, or encouragement of drug-related behavior.

**Severity taxonomy**

* `high severity` — selling illegal drugs or facilitating access to them
* `medium severity` — encouragement, suggestions, or guidance around drug use
* `low severity` — casual mentions or jokes about drug use without encouragement or instruction

**Examples by severity**

* `high severity` — `"DM me to buy weed"`, `"I can get you pills cheap"`, `"I sell coke if you need"`
* `medium severity` — `"you should try coke"`, `"how do I get shrooms?"`, `"let’s get high together"`
* `low severity` — `"420 lol"`, `"I'm high rn"`, `"weed vibes"`

</details>

<details>

<summary><code>extremism</code> <em>[off | low | medium | high]</em></summary>

Flags language that supports, glorifies, justifies, or promotes real-world extremist ideologies, organizations, or acts of mass violence. This includes praise, propaganda, recruitment, or justification of movements that promote violence, hatred, or discrimination against real-world groups.

**Severity taxonomy**

* `high severity` — promotion or advocacy of extremist ideology, organizations, or violence
* `medium severity` — justification or normalization of extremist ideology or mass violence
* `low severity` — casual references or non-supportive mentions of extremist groups, ideology, or historical events

**Examples by severity**

* `high severity` — `"heil hitler"`, `"death to the jews"`, `"kill the blacks"`, `"join the KKK"`, `"ISIS was right"`, `"we need another genocide"`, `"Palestinians should all be eliminated"`, `"kill every Zionist you see"`, `"wipe out the Ukrainians"`, `"Taiwanese people need to be crushed"`, `"we need ethnic cleansing to fix this country"`
* `medium severity` — `"hitler was misunderstood"`, `"genocide isn't all that bad"`, `"the KKK had some good ideas"`, `"white nationalism makes sense"`, `"I think hamas really has a point"`, `"those attacks were bad, but I understand why civilians were targeted"`, `"maybe Palestinians need to be wiped out for peace"`, `"Iranians only understand force anyway"`, `"Ukraine should just be erased as a nation"`, `"Taiwan doesn’t deserve to exist"`, `"expelling all Muslims from Europe would solve a lot"`
* `low severity` — `"you're a nazi"`, `"grammar nazi"`, `"the KKK was a real group"`, `"9/11 involved a lot of terrorists"`, `"that guy acts like a dictator"`

</details>

<details>

<summary><code>gameplay_criticism</code> <em>[off | low | medium | high]</em></summary>

Flags negative comments about another player’s in-game performance, decisions, or skill. Unlike Verbal Abuse, the primary focus is gameplay rather than the player’s personal worth.

**Severity taxonomy**

* `high severity` — severe verbal abuse triggered by gameplay and escalated into degrading personal attacks
* `medium severity` — personal attacks framed around gameplay performance
* `low severity` — competitive banter or mild frustration about gameplay without a strong personal attack

**Examples by severity**

* `high severity` — `"you’re a worthless piece of shit at this game"`, `"you’re so fucking useless every match"`, `"you’re absolute human garbage in ranked"`, `"you play like a complete fucking idiot"`
* `medium severity` — `"you’re useless"`, `"you’re garbage"`, `"you’re a fucking noob"`, `"delete the game"`, `"this mf is playing as if he doesn't have hands"`
* `low severity` — `"you’re bad at this"`, `"learn how to aim"`, `"that was a terrible play"`, `"why did you push there?"`, `"stop feeding, you're ruining the match"`, `"you're throwing"`, `"wtf how hard is it to just click on the enemies"`

</details>

<details>

<summary><code>identity_harm</code> <em>[off | low | medium | high]</em></summary>

Flags language that demeans, discriminates against, or targets individuals or groups based on non-gender identity attributes. This includes race, ethnicity, nationality, religion, caste, disability, sexual orientation, serious medical condition, age, and immigration status. These expressions create a hostile or unsafe environment and can reinforce broader discrimination, exclusion, or tension.

**Severity taxonomy**

* `high severity` — slurs, dehumanization, or calls for violence against protected groups
* `medium severity` — identity-based attacks that demean, exclude, or assign negative traits
* `low severity` — mild biases, stereotypes, or casual identity-based expressions

**Examples by severity**

* `high severity` — racial slurs, `"I hate gays"`, `"Muslims should die"`, `"All [race] are animals"`
* `medium severity` — `"Immigrants are ruining this place"`, `"Muslims can’t be trusted"`, `"Gay people are disgusting"`
* `low severity` — `"That’s so gay"`, `"You Asians must be good at math"`, `"Bro, you’re acting autistic"`, `"you're gay"`

</details>

<details>

<summary><code>links</code> <em>[off | medium | high]</em></summary>

Flags messages that contain external links to prevent players from sharing inappropriate websites, ads, scams, or other potentially harmful content.

`medium` filters URLs associated with common inappropriate or mature content. `high` filters all URLs.

</details>

<details>

<summary><code>minor_safety</code> <em>[off | low | medium | high]</em></summary>

Flags language that may place minors at risk by indicating grooming behavior, predatory intent, sexualization of minors, or attempts to exploit, manipulate, or endanger children. This also includes references to exploitation or sexual abuse of children, excluding first-person disclosures or statements from potential victims. The category captures risk to minors whether or not a minor is present in the conversation.

**Severity taxonomy**

* `high severity` — sexual exploitation, CSAM, or explicit sexual targeting of minors
* `medium severity` — grooming signals or inappropriate adult-minor interaction
* `low severity` — boundary testing, minor safety concerns, or references to child exploitation or sexual abuse

**Examples by severity**

* `high severity` — `"I like little kids sexually"`, `"kids should be taught sex early"`, `"I want to fuck minors"`, `"children are better partners"`, `"I enjoy abusing kids"`, `"I have 10 TB of cp"`, `"can’t wait to see underage girls"`
* `medium severity` — `"you're mature for your age"`, `"don't tell your parents we're talking"`, `"you can trust me more than your parents"`, `"let’s chat somewhere adults won’t see"`, `"you seem older than other kids your age"`
* `low severity` — `"do you have a boyfriend?"`, `"we can keep this between us"`, `"what school do you go to?"`, `"are you home alone?"`, `"how old are you really?"`, `"you're a pedophile"`, `"he was arrested for pedophilia"`, `"i can't imagine being targeted for grooming"`

</details>

<details>

<summary><code>offensive_language</code> <em>[off | low | medium | high]</em></summary>

Flags profanity, vulgar expressions, or crude terms that are not directed at another person. This includes standalone swearing, emotional outbursts, or graphic language about situations, objects, or the game environment. Offensive Language is about tone, not target.

**Severity taxonomy**

* `high severity` — graphic, extreme, or sexualized profanity used as general expression
* `medium severity` — explicit swearing that is intense but not targeted
* `low severity` — mild swearing or casual profanity used to react or emphasize a point

**Examples by severity**

* `high severity` — `"Fuck this disgusting shit"`, `"This boss can go fuck itself"`, `"I’m horny as fuck"`, `"This is porn-level garbage"`, `"What the fucking hell is this show"`
* `medium severity` — `"What the fuck"`, `"This game is fucking stupid"`, `"I’m so pissed off"`, `"This is fucked"`
* `low severity` — `"Damn"`, `"Hell yeah"`, `"Crap"`, `"This is BS"`, `"What the hell"`, `"Holy shit"`

</details>

<details>

<summary><code>pii</code> <em>[off | medium | high]</em></summary>

Flags messages that contain personally identifiable information. This includes bank numbers, credit cards, email addresses, phone numbers, and physical addresses.

`medium` filters content that strongly appears to contain PII based on recognized patterns and context. `high` filters all content that matches common PII formats, regardless of confidence level.

</details>

<details>

<summary><code>real_threat</code> <em>[off | low | medium | high]</em></summary>

Flags language that expresses credible, serious, or potentially actionable plans or intentions to commit real-world violence. This includes threats involving weapons, explosives, schools, workplaces, public spaces, organizations, or individuals outside the game context. Unlike general Violence, Real Threat signals intent, planning, capability, or imminence and may require urgent escalation.

**Severity taxonomy**

* `high severity` — direct, credible, or imminent threats of real-world violence
* `medium severity` — ambiguous, concerning, or preparatory statements that suggest planning, capability, or targets
* `low severity` — speculative or non-credible violent statements without actionable details

**Examples by severity**

* `high severity` — `"I'm planning to bomb this school tomorrow"`, `"I'm bringing a gun to campus in the morning"`, `"I'm going to shoot up my workplace"`, `"I'm making a pipe bomb right now"`, `"I'm going to kill everyone at that event"`
* `medium severity` — `"I know how to make a bomb from household stuff"`, `"I could bring a gun to school if I wanted"`, `"I’ve been thinking about doing something big tomorrow"`, `"people at my school won’t be safe soon"`
* `low severity` — `"someone could bomb this place lol"`, `"I feel like blowing everything up"`, `"imagine if someone shot up the server"`

</details>

<details>

<summary><code>scam</code> <em>[off | low | medium | high]</em></summary>

Flags messages that attempt to obtain money, digital assets, accounts, or sensitive information through deception, impersonation, or fraudulent schemes. Scams rely on misleading claims, fake authority, or manipulation to trick users into giving up value.

**Severity taxonomy**

* `high severity` — credential theft or financial fraud through phishing, impersonation, or fraudulent instructions
* `medium severity` — fraudulent schemes or fake offers used to obtain money, assets, or accounts
* `low severity` — suspicious or misleading claims about guaranteed rewards, exploits, or unrealistic opportunities

**Examples by severity**

* `high severity` — `"this is steam support send your password to verify your account"`, `"enter your credit card here to unlock your prize"`, `"send your 2FA code so I can recover your account"`, `"log in here to confirm your account or it will be banned"`
* `medium severity` — `"I'm a game moderator send me your account so I can fix it"`, `"send me your skins and I'll duplicate them"`, `"log into this site to claim your free reward"`, `"send me your items and I'll double them"`
* `low severity` — `"this strategy guarantees you win every time"`, `"I found a secret way to beat the casino algorithm"`, `"use this trick to always win jackpots"`, `"this site guarantees daily winnings"`

</details>

<details>

<summary><code>self_harm_incitement</code> <em>[off | low | medium | high]</em></summary>

Flags language that encourages, promotes, glorifies, or pressures another person to engage in self-harm or suicide. This includes direct commands, indirect encouragement, or dismissive statements that minimize the seriousness of self-harm.

**Severity taxonomy**

* `high severity` — graphic, instructional, or actionable incitement to self-harm or suicide
* `medium severity` — direct incitement using common, non-graphic language
* `low severity` — indirect or implied encouragement of self-harm or suicide

**Examples by severity**

* `high severity` — `"cut your veins"`, `"hang yourself"`, `"take these pills and you’ll die"`, `"here’s how to kill yourself"`, `"slit your wrists until you bleed out"`
* `medium severity` — `"go kill yourself"`, `"kys"`, `"you should kill yourself"`, `"do everyone a favor and die"`, `"end your life already"`
* `low severity` — `"maybe you’d be better off not being here"`, `"no one would care if you were gone"`, `"the world would be better without you"`, `"you should just disappear forever"`

</details>

<details>

<summary><code>sexual_content</code> <em>[off | low | medium | high]</em></summary>

Flags sexual language, references, or descriptions that are not directed at another player. This includes innuendo, explicit content, or sexual discussion expressed generally or about oneself.

**Severity taxonomy**

* `high severity` — graphic or extreme sexual content shared broadly without a specific target
* `medium severity` — explicit sexual language that is not aimed at another user
* `low severity` — mild sexual references or innuendo with no target

**Examples by severity**

* `high severity` — describing explicit sex acts in detail, hardcore porn talk, graphic sexual fantasies
* `medium severity` — `"they were fucking all night"`, `"I'm horny"`, `"I want to have sex"`, `"he was talking about sucking dick"`, `"that movie had a lot of blowjob scenes"`
* `low severity` — `"sexy play"`, `"big penis"`, `"Bruh that was orgasmic"`, `"I’m simping for this character"`, `"that's what she said"`, `"porn is wild"`

</details>

<details>

<summary><code>sexual_harassment</code> <em>[off | low | medium | high]</em></summary>

Flags sexual language or behavior directed at a specific person or their family. This includes sexual comments, propositions, sexualized insults, or degrading language that sexualizes, objectifies, pressures, or demeans the target.

**Severity taxonomy**

* `high severity` — coercive or sexually degrading language directed at a person, without explicit sexual violence
* `medium severity` — explicit sexual propositions or sexualized statements directed at a person or their family
* `low severity` — sexualized insults, flirts, or mild directed comments that are sexual in nature

**Examples by severity**

* `high severity` — `"Send nudes or else"`, `"I'll share your nudes with everyone"`, `"you owe me sex"`, `"you're my little slut"`, `"Touch yourself for me"`
* `medium severity` — `"I want to fuck you"`, `"show me your tits"`, `"Let's hook up"`, `"I'd fuck your mom"`, `"let me see your body"`, `"send me topless pictures"`
* `low severity` — `"you're sexy"`, `"damn you look hot"`, `"I'd date you"`, `"you’re cute ngl"`, `"you're a cuck"`, `"your mom's hot"`, `"I'd smash your sister"`

</details>

<details>

<summary><code>sexual_violence</code> <em>[off | low | medium | high]</em></summary>

Flags sexual language that references, threatens, glorifies, or describes sexual acts involving violence, force, coercion, or lack of consent. This includes both targeted and general statements.

**Severity taxonomy**

* `high severity` — graphic, explicit, or actionable sexual violence
* `medium severity` — normalization or endorsement of sexual violence
* `low severity` — non-graphic references to sexual violence

**Examples by severity**

* `high severity` — `"I'm going to rape you"`, `"I’ll pin you down and force myself on you"`, `"I want to sexually torture her"`, `"I’m going to fuck you until you bleed"`, `"she deserved to be raped"`, `"I’ll cut your balls off and watch you bleed"`
* `medium severity` — `"rape fixes people"`, `"they should be sexually punished"`, `"we just got raped"`, `"Cheaters should be castrated"`
* `low severity` — `"rape is everywhere in society"`, `"this story talks about sexual assault"`, `"that plot involves rape"`

</details>

<details>

<summary><code>solicitation</code> <em>[off | low | medium | high]</em></summary>

Flags messages that attempt to obtain personal information, move a user off-platform, extract real-world value, or promote unauthorized commercial activity. This includes direct requests, transactional offers, recruitment attempts, and advertisements.

Solicitation focuses on intent to extract value or redirect interaction, not on deception, which belongs under Scam.

**Severity taxonomy**

* `high severity` — unauthorized commercial activity or direct financial requests, especially off-platform
* `medium severity` — commercial or transactional offers involving services, assets, or external platforms
* `low severity` — casual off-platform requests or low-risk promotional messages

**Examples by severity**

* `high severity` — `"send me $100 via paypal"`, `"pay me first then I’ll give you the item"`, `"wire me the money"`, `"send crypto to this wallet"`
* `medium severity` — `"I sell cheap game gold"`, `"pay me and I’ll boost your rank"`, `"buy my account"`, `"join my paid discord server"`, `"dm me to trade skins"`
* `low severity` — `"let’s talk on WhatsApp"`, `"add me on Discord"`, `"follow my page for better tips"`, `"check out my channel if you want good builds"`, `"I post all the leaks on my Telegram"`, `"join my server it’s better than this one"`

</details>

<details>

<summary><code>spam</code> <em>[off | low | medium | high]</em></summary>

Flags repetitive, irrelevant, or nonsensical messages that clutter or disrupt chat. This includes high-frequency posting, gibberish, and automated or bot-like behavior.

**Severity taxonomy**

* `high severity` — excessive nonsensical content that overwhelms chat due to size, density, or visual impact
* `medium severity` — disruptive frequency or duplication over a short time window
* `low severity` — mild repetition, gibberish, or low-noise spam

**Examples by severity**

* `high severity` — large ASCII walls, emoji floods, or long strings of random symbols
* `medium severity` — triggered by either of the following:
  * high-frequency messaging — `10+` messages within `5` seconds
  * exact repetition — `3` identical messages within `10` seconds
* `low severity` — `"lol lol lol lol lol"`, `"asdfasdfasdf"`, `"😂😂😂😂😂"`, `"hello world hello world hello world"`

</details>

<details>

<summary><code>verbal_abuse</code> <em>[off | low | medium | high]</em></summary>

Flags insults, name-calling, or language meant to demean, belittle, or emotionally harm another user. This includes attacks on intelligence, competence, appearance, or personal worth. Unlike Identity Hate, Verbal Abuse does not reference protected characteristics.

**Severity taxonomy**

* `high severity` — extreme harassment, degrading attacks, or dehumanization
* `medium severity` — strong personal attacks that express anger, contempt, or aggression
* `low severity` — mild insults or common competitive banter directed at another player

**Examples by severity**

* `high severity` — `"you're a worthless piece of shit"`, `"you're absolute human garbage"`, `"you're pathetic and nobody wants you here"`, `"you useless fucking waste of space"`, `"you're subhuman"`, `"you're a waste of life"`, `"everyone hates you"`, `"kill yourself loser"`, `"you're nothing but a piece of shit"`
* `medium severity` — `"fuck you"`, `"shut the fuck up"`, `"go to hell"`, `"you're a goddamn bastard"`, `"eat shit"`, `"nobody likes you"`
* `low severity` — `"you suck"`, `"noob"`, `"you're so bad"`, `"lmao you're trash"`

</details>

<details>

<summary><code>violence</code> <em>[off | low | medium | high]</em></summary>

Flags language that references, promotes, glorifies, or describes physical harm against a person or group. This category captures violent expressions that do not necessarily constitute an imminent or credible threat.

**Severity taxonomy**

* `high severity` — graphic, brutal, or sadistic violence
* `medium severity` — explicit violent harm or endorsement without graphic detail
* `low severity` — non-graphic violent expressions used figuratively or contextually

**Examples by severity**

* `high severity` — `"I love watching people scream when they’re hurt"`, `"Smash his skull until brains are on the floor"`, `"Imagine slicing someone open and seeing everything spill out"`, `"I want to tear him apart piece by piece"`, `"Watching them bleed out is satisfying"`
* `medium severity` — `"someone should beat you up"`, `"you deserve to get punched"`, `"I'll mess you up"`, `"I hope you get hurt"`, `"you're gonna get fucked up one day"`
* `low severity` — `"I'm gonna destroy you this round"`, `"I'll wreck you guys"`, `"we got slaughtered"`, `"that boss killed me again"`

</details>

#### **Passing Configurations**

1. Sample JSON (`config.json`)

   ```json
   {
   	"age_disclosure": "off",
   	"drugs": "off",
   	"extremism": "high",
   	"gameplay_criticism": "high",
   	"identity_harm": "medium",
   	"links": "high",
   	"minor_safety": "low",
   	"offensive_language": "high",
   	"pii": "off",
   	"real_threat": "high",
   	"scam": "off",
   	"self_harm_incitement": "high",
   	"sexual_content": "low",
   	"sexual_harassment": "high",
   	"sexual_violence": "high",
   	"solicitation": "off",
   	"spam": "high",
   	"verbal_abuse": "medium",
   	"violence": "off"
   }
   ```
2. Base64-encode the JSON

   ```bash
   base64 config.json
   ```
3. Sample encoded output

   ```
   <base64-encoded config.json>
   ```
4. Example curl request

   <pre class="language-bash" data-overflow="wrap"><code class="lang-bash">curl --request POST 'https://api.ggwp.com/chat/v3/message' \
     --header 'x-api-key:&#x3C;API_KEY>' \
     --header 'Content-Type: application/json' \
     --header 'x-api-config: &#x3C;base64-encoded config.json>' \
     --data-raw '{
       "session_id": "match_7765", 
       "message": "fucking retards everywhere",
       "user_id": "user989", 
       "username": "nlxdz",
       "timestamp": "2022-01-25 09:44:12"
     }'
   </code></pre>

#### **Default Configurations**

If the `x-api-config` header is NOT provided:

```json
{
	"age_disclosure": "high",
	"drugs": "high",
	"extremism": "high",
	"gameplay_criticism": "high",
	"identity_harm": "high",
	"links": "high",
	"minor_safety": "high",
	"offensive_language": "high",
	"pii": "high",
	"real_threat": "high",
	"scam": "high",
	"self_harm_incitement": "high",
	"sexual_content": "high",
	"sexual_harassment": "high",
	"sexual_violence": "high",
	"solicitation": "high",
	"spam": "high",
	"verbal_abuse": "high",
	"violence": "high"
}
```

## **Parameters**

`body`: Dictionary containing the following fields:\
(*Needs to be in utf-8 encoding)*

* **session\_id:** Unique identifier for the conversation channel. For gameplay messages, this could identify a conversation that unfolds over a single match. On forums or message boards, this could represent a distinct thread or discussion. If your platform contains various channel types (eg: lobby, match, direct message, etc.), we recommend that you include this information in the session\_id to enable further analysis by conversation type. This is the suggested format:

  ```json
    session_id = "channelType_numericID"
  ```
* **message:** Message sent by a user during the conversation. Cannot exceed 1,000 characters.
* **user\_id:** Unique identifier for a player or user who sent the message.
* (OPTIONAL) **username**: String with the friendly display name picked by the user.
* (OPTIONAL) **timestamp**: Time the message took place in YYYY-MM-DD HH:MM:SS.SSS or YYYY-MM-DD HH:MM:SS format, in UTC. If not added, then server side UTC timestamp is added in its place.
* (OPTIONAL) **language**: Language of the message to be processed. If omitted, the API will attempt to detect the language from the message content and prior user history. Accepts standard English language names (eg: `"english"` or `"spanish"`), and ISO 639-1 two-letter language codes (eg:  `"en"` or `"es"`). Full locale tags such as `"en-US"`, `"en-GB"`, `"pt-BR"`, and `"es-MX"` are not currently supported; send `"en"`, `"pt"`, or `"es"` instead.
* (OPTIONAL) **message\_index**: String field to track the message sent. Will be included in the output under `message_details` if passed.
* (OPTIONAL) **message\_url**: String field to track the url tagged to the message. Only http or https schemes are valid. Will be visible in the dashboard if valid and passed.
* (OPTIONAL) **metadata**: Dict field to track any metadata associated with the message. Must be under 5KB. Only permitted keys and corresponding types are valid. Supported keys:

  * channel (string) - communication space that the message is passed to. E.g. dm, party, guild, local
  * participants (array\<string>) - the user\_ids participating in the channel
  * map (string) - identifier or name of the world, level, or environment where the message originates
  * map\_version (string) - version identifier of the map, used to track changes in layout, etc.
  * zone (string) - subsection or named region within a map used for finer-grained location context
  * coordinates (object) - spatial position within the map or zone
    * x (float) - position along the X-axis
    * y (float) - position along the Y-axis
    * z (float) - position along the Z-axis

  Example:

  ```json
  {
    "metadata": {
      "channel": "dm",
      "participants": ["user989", "user990"],
      "map":"golden_wasteland",
      "map_version":"2026.03.1",
      "zone":"cacti_forest",
      "coordinates":{
         "x":123.45,
         "y":67.89,
         "z":-10.25
      }
    }
  }
  ```

  Note: Additional metadata keys can be supported. Please work with your customer representative to define the specific keys that will be applicable to your platform.

Example:

```json
{
  "session_id": "match_7765",
  "message": "fucking retards everywhere",
  "user_id": "user989",
  "username": "nlxdz",
  "timestamp": "2022-06-02 16:49:02"
}
```

Sample call:

```bash
curl --request POST 'https://api.ggwp.com/chat/v3/message' \
--header 'x-api-key: api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "session_id": "match_7765",
  "message": "fucking retards everywhere",
  "user_id": "user989",
  "username": "nlxdz",
  "timestamp": "2022-06-02 16:49:02"
}'
```

## **Output**

#### 200 response

Returns a JSON object with the following top-level fields:

<details>

<summary><code>message_details</code></summary>

Message-level moderation results for the input payload.

* `message_id` — unique identifier assigned to the message
* `original_message` — raw message sent by the user
* `flag` — `true` if the message was flagged by any configured category
* `severity` — overall severity assigned to the message. Possible values: `none`, `very_low`, `low`, `medium`, `high`, `very_high`, and `custom`
  * `custom` is used when GGWP does not flag the message, but a term from the client custom blocklist does
* `confidence` — confidence level for the overall message-level detection. Possible values: `none`, `low`, `medium`, or `high`
* `filtered_message` — version of the message with flagged terms filtered
  * For space-delimited languages such as English, full words are filtered. Example: `You are a shithead` → `You are a *****`
  * For languages without explicit word boundaries, only the detected term is filtered. Example: `좆까고 있네` → `*****고 있네`
* `recommended_message` — message variant recommended for display to the client. For active users, this defaults to `filtered_message`. For muted users, this is an empty string
* `language` — detected language of the message
* `flagged_categories` — list of category detections found in the message. Each item includes:
  * `category` — category assigned to the detected content
  * `category_severity` — category-specific severity for that detection. Possible values: `none`, `low`, `medium`, or `high`
    * Some categories can be flagged without carrying a severity. In those cases, `category_severity` is `none`
* `custom_flag` — `true` if the message contains custom blocklist terms

</details>

<details>

<summary><code>player_details</code></summary>

Aggregated moderation and behavior data for the `user_id` within the current `session_id`.

* `user_id` — unique identifier for the user
* `username` — display name of the user
* `num_messages` — total number of messages sent by the user in the session
* `num_incidents` — total number of incidents associated with the user
* `cumulative_mood` — overall sentiment score across the user’s messages
* `min_mood` — lowest sentiment observed for the user’s messages
* `max_mood` — highest sentiment observed for the user’s messages
* `reputation_score` — overall reputation score derived from prior behavior
* `languages` — languages detected from the user’s messages
* `user_status` — current moderation state for the user
  * `status` — moderation state currently applied, such as `active` or `muted`
  * `expiry_at` — time when the current moderation state expires

</details>

<details>

<summary><code>conversation_summary</code></summary>

Aggregated moderation and activity data for the `session_id`.

* `start_time` — timestamp when the conversation session began
* `session_duration` — total conversation duration in seconds
* `num_messages` — total number of messages in the conversation
* `num_participants` — total number of users in the conversation
* `num_incidents` — total number of incidents detected in the conversation
* `conversation_mood` — overall sentiment score for the conversation

</details>

<details>

<summary><code>recommendations</code></summary>

Recommended moderation actions keyed by `user_id`. Each `user_id` maps to an array of recommendation objects.

* `<user_id>[].action` — suggested moderation action, such as `mute`
* `<user_id>[].trigger_message` — offending message that triggered the recommendation
* `<user_id>[].trigger_time` — timestamp of the triggering message
* `<user_id>[].duration` — how long the action should remain in effect, in seconds

</details>

Sample output:

```json
{
  "message_details": {
    "message_id": "20220602164902.482311-946bb8a9-0766-4c31-995a-d910da8531e5",
    "original_message": "fucking retards everywhere",
    "flag": true,
    "severity": "medium",
    "confidence": "high",
    "filtered_message": "*****",
    "recommended_message": "",
    "language": "english",
    "flagged_categories": [
      {
        "category": "identity_harm",
        "category_severity": "medium"
      },
      {
        "category": "offensive_language",
        "category_severity": "high"
      }
    ],
    "custom_flag": false
  },
  "player_details": {
    "user_id": "user989",
    "username": "nlxdz",
    "num_messages": 11,
    "num_incidents": 6,
    "cumulative_mood": 0.748,
    "min_mood": 0.0,
    "max_mood": 0.8615,
    "reputation_score": 245,
    "languages": [
      "english"
    ],
    "user_status": {
      "status": "muted",
      "expiry_at": "2022-06-03 16:49:00"
    }
  },
  "conversation_summary": {
    "start_time": "2022-05-27 16:53:03",
    "session_duration": 59,
    "num_messages": 46,
    "num_participants": 3,
    "num_incidents": 16,
    "conversation_mood": 0.9816
  },
  "recommendations": {
    "user989": [
      {
        "action": "mute",
        "trigger_message": "dumb ass faggot",
        "trigger_time": "2022-06-02 16:49:00",
        "duration": 86400
      }
    ]
  }
}
```

#### Error responses

<details>

<summary><code>400</code> — invalid or malformed request</summary>

Possible causes:

* invalid JSON input
* invalid headers
* `metadata` exceeds 5 KB
* `metadata` contains disallowed keys
* invalid `x-api-config`
* `x-api-config` contains disallowed keys
* missing required fields: `user_id`, `session_id`, `message`
* invalid input format, such as an invalid timestamp or a message that exceeds the character limit

</details>

<details>

<summary><code>403</code> — invalid or missing API key</summary>

The request could not be authenticated.

</details>

<details>

<summary><code>500</code> — internal server error</summary>

The request failed due to an unexpected server-side error.

</details>
