# Update a timeline

Section: Your data › Timelines

```
PATCH https://ba.joexyz.online/api/v1/me/timelines/:id
```

Updates a timeline and returns it. Fields you leave out keep their current values.

To attach a team, send `formation`, the timeline's own copy of it (`name`, `type`, `rows`, `rowGap`, `displayOverline`, `noDisplayRole`, `groupsVertical`). It's public whenever the timeline is. `formationId` optionally links it to one of your saved formations and is only returned to you. `exportIncludeFormation` sets whether exported images include it by default.

**Raid details**

Optional `raid` tags the timeline: `type` (`Raid`, `EliminateRaid`, `MultiFloorRaid`, `TimeAttackDungeon` or `WorldRaid`), `boss` of that type (the drill type for `TimeAttackDungeon`), `defenseTypes` (which also accept the colors `red`, `yellow`, `blue`, `purple` and `green`), `terrains`, `difficulty` (`Raid` and `EliminateRaid` only), `floor` from 1 to 124 (`MultiFloorRaid` only) and `season` (`id`, `startDate`, `endDate` of a roadmap raid). Send `null` to clear it. `autoName` marks the name as generated by the editor; setting `name` without it turns that off.

**Parameters**

- `id` (path): The timeline 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
{
  "visibility": "public"
}
```

## Example responses

### 200 OK

```json
{
  "data": {
    "id": "j97aztjw1zgcc9b1zq1e5h7rxn7sggfk",
    "createdAt": "2025-10-15T19:52:47.261Z",
    "name": "Shiro & Kuro Heavy INS 28,831,808pt",
    "description": "This timeline may look short and innocent, but there are many things you need to restart for. This clear requires a lv.1 Dress Aru.\n\n- **Team:** Seia, UE50+ Mika, lv.1 D.Aru, Shun, Rio, Kisaki\n- **Starter skills:** Seia, D.Aru, Rio",
    "horizontalSeparatorSize": 50,
    "itemSpacing": -6,
    "items": [
      {
        "type": "student",
        "studentId": "seia",
        "targetId": "mika",
        "trigger": "AUTO"
      },
      {
        "type": "student",
        "studentId": "rio",
        "targetId": "mika",
        "trigger": "9.9"
      },
      {
        "type": "student",
        "studentId": "aru_dress",
        "targetId": "mika",
        "trigger": "3:38.933"
      },
      {
        "type": "student",
        "studentId": "mika",
        "notes": "4.23m",
        "trigger": "7.3"
      },
      {
        "type": "student",
        "studentId": "kisaki",
        "targetId": "mika",
        "trigger": "3:35.100"
      },
      {
        "type": "student",
        "studentId": "mika",
        "copy": true,
        "trigger": "ASAP"
      },
      {
        "type": "student",
        "studentId": "seia",
        "targetId": "mika",
        "trigger": "AUTO"
      },
      {
        "type": "separator",
        "orientation": "vertical"
      },
      {
        "type": "student",
        "studentId": "mika",
        "notes": "2.75m",
        "trigger": "AUTO(4.9)"
      },
      {
        "type": "text",
        "text": "D.Aru dies"
      },
      {
        "type": "student",
        "studentId": "rio",
        "targetId": "mika",
        "trigger": "2.8"
      },
      {
        "type": "student",
        "studentId": "mika",
        "trigger": "ASAP"
      }
    ],
    "showCreator": true,
    "verticalSeparatorSize": 50,
    "visibility": "public"
  }
}
```

## Examples

### cURL

```bash
curl -X PATCH https://ba.joexyz.online/api/v1/me/timelines/:id \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{api_key}}' \
  --data-raw '{
  "visibility": "public"
}'
```

### JavaScript

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

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

### Python

```python
import requests

url = "https://ba.joexyz.online/api/v1/me/timelines/:id"
headers = {
    "Authorization": "Bearer {{api_key}}",
}
payload = {
    "visibility": "public",
}

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(`{
  "visibility": "public"
}`)

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