# Create a timeline

Section: Your data › Timelines

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

Creates a timeline and returns it. `visibility`, `showCreator`, `itemSpacing`, the separator sizes and the export background settings use your preferences when left out. So do the `formation` display settings, and students in `formation` get your default level if you have that preference on.

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.

## Authentication

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

## Headers

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

## Body

Content type: `application/json`

```json
{
  "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"
}
```

## Example responses

### 201 Created

```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"
  }
}
```

### 400 Bad Request

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Object is missing the required field `items`."
  }
}
```

## Examples

### cURL

```bash
curl -X POST https://ba.joexyz.online/api/v1/me/timelines \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{api_key}}' \
  --data-raw '{
  "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"
}'
```

### JavaScript

```javascript
const response = await fetch("https://ba.joexyz.online/api/v1/me/timelines", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer {{api_key}}",
  },
  body: JSON.stringify({
    "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"
  }),
});

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

### Python

```python
import requests

url = "https://ba.joexyz.online/api/v1/me/timelines"
headers = {
    "Authorization": "Bearer {{api_key}}",
}
payload = {
    "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",
}

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

### Go

```go
package main

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

func main() {
	body := strings.NewReader(`{
  "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"
}`)

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