> 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-appeals.md).

# API Docs: Appeals

## **Introduction**

GGWP provides an API that allows a player to file an appeal if they believe a sanction was applied unfairly and wish to have it reviewed or lifted.

## Authentication

GGWP uses API keys to grant authorized users secure access to all of the API endpoints listed below. All requests must supply the following HTTP header along with the API key provisioned:

`x-api-key: <API_KEY>`

Each API key:

* Uniquely identifies your platform/game
* Gives API access to all APIs listed in this document
* Has a specific rate limit on the number of requests that can be made per second as well as a possible set quota of the number of requests that can be made on a month to month basis
* Should be kept a secret and should not be shared with any unauthorized games / users
* Once lost, a new key will have to be regenerated

Please contact your GGWP Account Manager for provisioning an API key as well as setting the correct rate limits required for your game.

## How to use your API key

The following is an example invocation of the production API endpoint using a valid API key (key is redacted in this example):

```bash
curl --request POST 'https://api.ggwp.com/users/v1/appeals' \
--header 'x-api-key: api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
        "user_id": "test-user", 
        "channel": "chat", 
        "comment": "wronng sanction"
}'
```

An invalid API key will return a `403` return code. Below is an example response with an invalid API key:

```bash
< HTTP/2 403
< date: Thu, 18 Nov 2021 21:28:27 GMT
< content-type: application/json
< content-length: 23
< x-amzn-requestid: f4361ec6-71bc-478f-98cd-da0fe9df829b
< x-amzn-errortype: ForbiddenException
< x-amz-apigw-id: JBPLRHGjPHcFdbg=
<
* Connection #0 to host api.ggwp.com left intact
{"message":"Forbidden"}* Closing connection 0
```

## Appeals API

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

`POST` /users/v1/appeals

### **Description**

This API endpoint processes a player's appeal against a sanction. The player may believe the sanction is unjustified and seek to have it reduced or removed.

### **Parameters**

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

* **user\_id:** Unique identifier for the user submitting the appeal.

  ```json
  user_id = "anonymous_sessionID"
  ```
* **channel (optional):** Indicates where the sanction was applied. Supported channels are `chat`, `voice`, `game` and `discord`.
* **comment**: Text message by the player for the reviewer against the sanction aplied.&#x20;

Example

```json
{
  "user_id": "test-user", 
  "channel": "chat", 
  "comment": "wronng sanction"
}
```

Sample call:

```bash
curl --request POST 'https://api.ggwp.com/users/v1/appeals' \
--header 'x-api-key: api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
        "user_id": "test-user", 
        "channel": "chat", 
        "comment": "wronng sanction"
}'
```

### **Output**

* 200 response - successful operation

```json
{
    "message": "Success"
}
```

* 400
  * Invalid input json input, missing required fields,.
* 403
  * Invalid or missing API key
