> 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/social.md).

# Social

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

`POST` /users/v1/social

## **Description**

Reports any changes to the social relationships between a pair of players, or any individual actions that a player is taking on another player (eg: blocking). This information is used by GGWP to assess if player reports are coming from independent sources, to identify potential cases of brigading or bullying, and to adjust the reputation impact of certain incidents, among others.

## **Parameters**

`body`: Dictionary containing the following fields:

* **action**: social relationship action from `user_action_id` to `user_recipient_id`. Status between the two users will be updated accordingly. Supported values: `friend`, `unfriend`, `follow`, `unfollow`, `block`, or `unblock:`
  * `friend` → adds a friendship bidirectional link between user\_action\_id and user\_recipient\_id. The order of the two users does not matter
  * `unfriend` → removes the friendship bidirectional link between user\_action\_id and user\_recipient\_id. The order of the two users does not matter
  * `follow` →  adds a follow unidirectional link from user\_action\_id to user\_recipient\_id
  * `unfollow` → removes the follow unidirectional link from user\_action\_id to user\_recipient\_id
  * `block` → adds a block unidirectional link from user\_action\_id to user\_recipient\_id
  * `unblock` → removes the block unidirectional link from user\_action\_id to user\_recipient\_id
* **user\_action\_id**: unique identifier for the user triggering the action.
* **user\_recipient\_id:** unique identifier for the user receiving the action.
* **timestamp:** time when the status was updated in *Y*YYY-MM-DD HH:MM:SS.SSS or YYYY-MM-DD HH:MM:SS format, in UTC. If empty, then server side UTC timestamp is used in its place.
* Sample Call

  ```bash
  curl --request POST 'https://api.ggwp.com/users/v1/social' \
  --header 'x-api-key: api_key' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "action": "friend",
    "user_action_id": "<id1>",
    "user_recipient_id": "<id2>",
    "timestamp": "2022-01-25 09:44:00"
  }'
  ```

## **Output**

* 200 - successful operation

  ```json
  {
      "success": true
  }
  ```
* 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.

###

###

###
