# Update a season

Section: Your data › PVP tracker

```
PATCH https://ba.joexyz.online/api/v1/me/pvp/seasons/:seasonId
```

Updates `name`, `gameServer`, `seasonNumber` and/or `archived`. Fields you leave out keep their current values.

**Parameters**

- `seasonId` (path): The season id.

## Authentication

Bearer Token — `Authorization: Bearer <token>` (inherited from folder "Your data")

## Path parameters

| Name | Value |
| --- | --- |
| `seasonId` |  |

## Headers

| Name | Value |
| --- | --- |
| `Content-Type` | `application/json` |

## Body

Content type: `application/json`

```json
{
  "archived": true
}
```

## Example responses

### 200 OK

```json
{
  "data": {
    "id": "kh724q90ftg12dyr6cw3f01cn57tsedq",
    "createdAt": "2025-11-04T13:45:21.338Z",
    "name": "S9 Indoor",
    "archived": true,
    "gameServer": "EU",
    "seasonNumber": 9
  }
}
```

## Examples

### cURL

```bash
curl -X PATCH https://ba.joexyz.online/api/v1/me/pvp/seasons/:seasonId \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{api_key}}' \
  --data-raw '{
  "archived": true
}'
```

### JavaScript

```javascript
const response = await fetch("https://ba.joexyz.online/api/v1/me/pvp/seasons/:seasonId", {
  method: "PATCH",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer {{api_key}}",
  },
  body: JSON.stringify({
    "archived": true
  }),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://ba.joexyz.online/api/v1/me/pvp/seasons/:seasonId"
headers = {
    "Authorization": "Bearer {{api_key}}",
}
payload = {
    "archived": True,
}

response = requests.patch(url, headers=headers, json=payload)
print(response.json())
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{
  "archived": true
}`)

	req, err := http.NewRequest("PATCH", "https://ba.joexyz.online/api/v1/me/pvp/seasons/:seasonId", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Authorization", "Bearer {{api_key}}")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	data, _ := io.ReadAll(res.Body)
	fmt.Println(string(data))
}
```
