# Update a timeline group

Section: Your data › Timeline groups

```
PATCH https://ba.joexyz.online/api/v1/me/timeline-groups/:id
```

Updates a timeline group and returns it. Send `timelines` as a list of your timeline ids, in order. Fields you leave out keep their current values.

**Raid details**

Optional `raid` tags the group, with the same fields as a timeline's except `floor`; `difficulty` is only allowed for `Raid`. Send `null` to clear it. Setting `name` without `autoName` turns off the editor's generated name.

**Parameters**

- `id` (path): The timeline group id.

## Authentication

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

## Path parameters

| Name | Value |
| --- | --- |
| `id` |  |

## Headers

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

## Body

Content type: `application/json`

```json
{
  "timelines": [
    "j971vw5a0tk9h7q3qxq0qvrnjx7rt2we",
    "j978tg4hw7tn8ykxd6bq080aws7rvetc",
    "j971c3e3tvhd00zbt154n903ed7rv5gc"
  ]
}
```

## Example responses

### 200 OK

```json
{
  "data": {
    "id": "jx7fxbrjbwdc9zv20ae97q8sp97rxy45",
    "createdAt": "2025-10-05T15:57:03.790Z",
    "name": "Gregorius Lunatic :: Comfy 3-pan",
    "description": "Comfy setups that don't need high invest.",
    "showCreator": true,
    "timelines": [
      {
        "id": "j971vw5a0tk9h7q3qxq0qvrnjx7rt2we",
        "createdAt": "2025-10-04T20:26:03.625Z",
        "name": "Gregorius Lunatic P1 :: Hibiki and Nagisa team",
        "description": "Fairly consistent for the most part. Should be doable with:\n- UE40 Koharu\n- 3* U.Asuna\n- 3* Mina\n- 3* S.Miyako\n- UE40 Hibiki\n- UE40 Nagisa",
        "horizontalSeparatorSize": 30,
        "itemSpacing": -6,
        "items": [
          {
            "type": "student",
            "studentId": "mina",
            "trigger": "5"
          },
          {
            "type": "separator",
            "orientation": "horizontal"
          },
          {
            "type": "student",
            "studentId": "koharu",
            "trigger": "4.5"
          }
        ],
        "showCreator": true,
        "verticalSeparatorSize": 50,
        "visibility": "public"
      },
      {
        "id": "j978tg4hw7tn8ykxd6bq080aws7rvetc",
        "createdAt": "2025-10-04T20:37:26.617Z",
        "name": "Gregorius Lunatic P2 :: Dress Hina team",
        "description": "Should be doable with:\n- UE40 S.Hoshino\n- UE40 A.Hoshino\n- UE50 D.Hina\n- UE30 Mine\n- 3* NY.Fuuka (though higher is recommended)\n- UE40 Himari",
        "horizontalSeparatorSize": 30,
        "itemSpacing": -6,
        "items": [
          {
            "type": "student",
            "studentId": "hoshino_battle_tank"
          },
          {
            "type": "student",
            "studentId": "mine",
            "notes": "Right side"
          },
          {
            "type": "student",
            "studentId": "fuuka_newyear",
            "targetId": "hina_dress"
          }
        ],
        "showCreator": true,
        "verticalSeparatorSize": 70,
        "visibility": "public"
      },
      {
        "id": "j971c3e3tvhd00zbt154n903ed7rv5gc",
        "createdAt": "2025-10-04T20:45:12.541Z",
        "name": "Gregorius Lunatic P3 :: Final Minori team",
        "description": "Should be pretty consistent. Doable with:\n- 3* Reisa\n- 3* I.Sakurako\n- 3* S.Saki\n- UE40 I.Mari (may be doable with 3* too, but I didn't test it)\n- 3* NY.Haruka\n- UE50 Minori",
        "horizontalSeparatorSize": 30,
        "itemSpacing": -6,
        "items": [
          {
            "type": "student",
            "studentId": "saki_swimsuit"
          },
          {
            "type": "separator",
            "orientation": "horizontal"
          },
          {
            "type": "student",
            "studentId": "mari_idol",
            "targetId": "reisa",
            "trigger": "6.7"
          }
        ],
        "showCreator": true,
        "verticalSeparatorSize": 50,
        "visibility": "public"
      }
    ],
    "visibility": "public"
  }
}
```

## Examples

### cURL

```bash
curl -X PATCH https://ba.joexyz.online/api/v1/me/timeline-groups/:id \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{api_key}}' \
  --data-raw '{
  "timelines": [
    "j971vw5a0tk9h7q3qxq0qvrnjx7rt2we",
    "j978tg4hw7tn8ykxd6bq080aws7rvetc",
    "j971c3e3tvhd00zbt154n903ed7rv5gc"
  ]
}'
```

### JavaScript

```javascript
const response = await fetch("https://ba.joexyz.online/api/v1/me/timeline-groups/:id", {
  method: "PATCH",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer {{api_key}}",
  },
  body: JSON.stringify({
    "timelines": [
      "j971vw5a0tk9h7q3qxq0qvrnjx7rt2we",
      "j978tg4hw7tn8ykxd6bq080aws7rvetc",
      "j971c3e3tvhd00zbt154n903ed7rv5gc"
    ]
  }),
});

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

### Python

```python
import requests

url = "https://ba.joexyz.online/api/v1/me/timeline-groups/:id"
headers = {
    "Authorization": "Bearer {{api_key}}",
}
payload = {
    "timelines": [
        "j971vw5a0tk9h7q3qxq0qvrnjx7rt2we",
        "j978tg4hw7tn8ykxd6bq080aws7rvetc",
        "j971c3e3tvhd00zbt154n903ed7rv5gc",
    ],
}

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(`{
  "timelines": [
    "j971vw5a0tk9h7q3qxq0qvrnjx7rt2we",
    "j978tg4hw7tn8ykxd6bq080aws7rvetc",
    "j971c3e3tvhd00zbt154n903ed7rv5gc"
  ]
}`)

	req, err := http.NewRequest("PATCH", "https://ba.joexyz.online/api/v1/me/timeline-groups/:id", 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))
}
```
