> 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-contextual-information/player-id-linking.md).

# Player ID Linking

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

`POST` /data/v1/ingest

## **Description**

Reports a link between the unique identifier of a player across different relevant platforms (eg: in-game, Discord, etc.). This information is used to aggregate all relevant information (incidents, reports, activity,...) at the player level and to provide a holistic view of that player’s reputation across platforms.

## **Parameters**

`body`: Dictionary containing the following fields:

* **type**: `player-id-link`
* **user\_id**: unique identifier of the user within the game.
* **username**: friendly display name picked by the user within the game.
* **platform\_name**: `discord` / `twitch` / `twitter`
* **platform\_id**: unique identifier of the user in the corresponding social platform.
* **platform\_username**: friendly display name picked by the user in the corresponding social platform.
* Sample Call

  ```bash
  curl --request POST 'https://api.ggwp.com/data/v1/ingest' \
  --header 'x-api-key: api_key' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "type": "player-id-link",
    "user_id": "<id1>",
    "username": "nlxdz",
    "platform_name": "discord",
    "platform_id": "<id2>",
    "platform_username": "Avocadorable"
  }'
  ```

## **Output**

* 200 - successful operation

  ```json
  {
    "status": "success"
  }
  ```
* 400
  * Error response. The event has not been inserted into the system. This error is thrown in the following cases:
    * `Invalid Body. Expected JSON input`
      * Data payload is not JSON format
    * `Data payload too large`
      * Data payload exceeds 1MB in size
* 403
  * Invalid or missing API key.
* 500
  * Error response. The event has not been inserted into the system. There was some error on the server while processing the request.
