# Schedules

Schedules are themed collections of events for special occasions like festivals. They can have custom themes, backgrounds, and time-based activation.

## List schedules

> Returns all schedules, including their activation periods and themes.<br>

```json
{"openapi":"3.0.3","info":{"title":"Decentraland Events API","version":"1.0.0"},"tags":[{"name":"Schedules","description":"Schedules are themed collections of events for special occasions like festivals.\nThey can have custom themes, backgrounds, and time-based activation.\n"}],"servers":[{"url":"https://events.decentraland.org/api","description":"Production server"},{"url":"https://events.decentraland.zone/api","description":"Development server"},{"url":"http://localhost:4000/api","description":"Local development server"}],"security":[],"paths":{"/schedules":{"get":{"tags":["Schedules"],"summary":"List schedules","description":"Returns all schedules, including their activation periods and themes.\n","operationId":"getSchedules","responses":{"200":{"description":"List of schedules","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","description":"A themed schedule grouping multiple events, typically used for festivals or special occasions\n","properties":{"id":{"type":"string","format":"uuid","description":"Schedule UUID"},"name":{"type":"string","maxLength":50,"description":"Schedule name"},"description":{"type":"string","nullable":true,"maxLength":255,"description":"Schedule description"},"image":{"type":"string","format":"uri","nullable":true,"description":"Schedule banner image URL"},"theme":{"type":"string","nullable":true,"enum":["mvmf_2022","mvfw_2023","pride_2023"],"description":"Pre-built theme identifier"},"background":{"type":"array","description":"Background colors (CSS color values)","items":{"type":"string"}},"active":{"type":"boolean","description":"Whether the schedule is active"},"active_since":{"type":"string","format":"date-time","description":"When the schedule becomes active"},"active_until":{"type":"string","format":"date-time","description":"When the schedule expires"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","active_since","active_until"]}}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string","description":"Error message"}},"required":["ok","error"]}}}}}}}}}
```

## Create a schedule

> Creates a new schedule. Requires authentication and special permissions.<br>

```json
{"openapi":"3.0.3","info":{"title":"Decentraland Events API","version":"1.0.0"},"tags":[{"name":"Schedules","description":"Schedules are themed collections of events for special occasions like festivals.\nThey can have custom themes, backgrounds, and time-based activation.\n"}],"servers":[{"url":"https://events.decentraland.org/api","description":"Production server"},{"url":"https://events.decentraland.zone/api","description":"Development server"},{"url":"http://localhost:4000/api","description":"Local development server"}],"security":[],"paths":{"/schedules":{"post":{"tags":["Schedules"],"summary":"Create a schedule","description":"Creates a new schedule. Requires authentication and special permissions.\n","operationId":"createSchedule","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Schema for creating a new schedule","required":["name","active_since","active_until"],"properties":{"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"image":{"type":"string","format":"uri","nullable":true},"theme":{"type":"string","nullable":true,"enum":["mvmf_2022","mvfw_2023","pride_2023"]},"background":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean","default":true},"active_since":{"type":"string","format":"date-time"},"active_until":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"Schedule created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"data":{"type":"object","description":"A themed schedule grouping multiple events, typically used for festivals or special occasions\n","properties":{"id":{"type":"string","format":"uuid","description":"Schedule UUID"},"name":{"type":"string","maxLength":50,"description":"Schedule name"},"description":{"type":"string","nullable":true,"maxLength":255,"description":"Schedule description"},"image":{"type":"string","format":"uri","nullable":true,"description":"Schedule banner image URL"},"theme":{"type":"string","nullable":true,"enum":["mvmf_2022","mvfw_2023","pride_2023"],"description":"Pre-built theme identifier"},"background":{"type":"array","description":"Background colors (CSS color values)","items":{"type":"string"}},"active":{"type":"boolean","description":"Whether the schedule is active"},"active_since":{"type":"string","format":"date-time","description":"When the schedule becomes active"},"active_until":{"type":"string","format":"date-time","description":"When the schedule expires"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","active_since","active_until"]}}}}}},"400":{"description":"Bad request - invalid parameters or body","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string","description":"Error message"}},"required":["ok","error"]}}}},"401":{"description":"Unauthorized - authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string","description":"Error message"}},"required":["ok","error"]}}}},"403":{"description":"Forbidden - insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string","description":"Error message"}},"required":["ok","error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string","description":"Error message"}},"required":["ok","error"]}}}}}}}}}
```

## Get schedule by ID

> Retrieves detailed information about a specific schedule.<br>

```json
{"openapi":"3.0.3","info":{"title":"Decentraland Events API","version":"1.0.0"},"tags":[{"name":"Schedules","description":"Schedules are themed collections of events for special occasions like festivals.\nThey can have custom themes, backgrounds, and time-based activation.\n"}],"servers":[{"url":"https://events.decentraland.org/api","description":"Production server"},{"url":"https://events.decentraland.zone/api","description":"Development server"},{"url":"http://localhost:4000/api","description":"Local development server"}],"security":[],"paths":{"/schedules/{schedule_id}":{"get":{"tags":["Schedules"],"summary":"Get schedule by ID","description":"Retrieves detailed information about a specific schedule.\n","operationId":"getScheduleById","parameters":[{"name":"schedule_id","in":"path","required":true,"description":"Schedule UUID","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Schedule details","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"data":{"type":"object","description":"A themed schedule grouping multiple events, typically used for festivals or special occasions\n","properties":{"id":{"type":"string","format":"uuid","description":"Schedule UUID"},"name":{"type":"string","maxLength":50,"description":"Schedule name"},"description":{"type":"string","nullable":true,"maxLength":255,"description":"Schedule description"},"image":{"type":"string","format":"uri","nullable":true,"description":"Schedule banner image URL"},"theme":{"type":"string","nullable":true,"enum":["mvmf_2022","mvfw_2023","pride_2023"],"description":"Pre-built theme identifier"},"background":{"type":"array","description":"Background colors (CSS color values)","items":{"type":"string"}},"active":{"type":"boolean","description":"Whether the schedule is active"},"active_since":{"type":"string","format":"date-time","description":"When the schedule becomes active"},"active_until":{"type":"string","format":"date-time","description":"When the schedule expires"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","active_since","active_until"]}}}}}},"404":{"description":"Not found - resource doesn't exist","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string","description":"Error message"}},"required":["ok","error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string","description":"Error message"}},"required":["ok","error"]}}}}}}}}}
```

## Update a schedule

> Updates an existing schedule. Requires authentication and special permissions.<br>

```json
{"openapi":"3.0.3","info":{"title":"Decentraland Events API","version":"1.0.0"},"tags":[{"name":"Schedules","description":"Schedules are themed collections of events for special occasions like festivals.\nThey can have custom themes, backgrounds, and time-based activation.\n"}],"servers":[{"url":"https://events.decentraland.org/api","description":"Production server"},{"url":"https://events.decentraland.zone/api","description":"Development server"},{"url":"http://localhost:4000/api","description":"Local development server"}],"security":[],"paths":{"/schedules/{schedule_id}":{"patch":{"tags":["Schedules"],"summary":"Update a schedule","description":"Updates an existing schedule. Requires authentication and special permissions.\n","operationId":"updateSchedule","parameters":[{"name":"schedule_id","in":"path","required":true,"description":"Schedule UUID","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Schema for updating a schedule (all fields optional)","properties":{"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"image":{"type":"string","format":"uri","nullable":true},"theme":{"type":"string","nullable":true,"enum":["mvmf_2022","mvfw_2023","pride_2023"]},"background":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"active_since":{"type":"string","format":"date-time"},"active_until":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"Schedule updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"data":{"type":"object","description":"A themed schedule grouping multiple events, typically used for festivals or special occasions\n","properties":{"id":{"type":"string","format":"uuid","description":"Schedule UUID"},"name":{"type":"string","maxLength":50,"description":"Schedule name"},"description":{"type":"string","nullable":true,"maxLength":255,"description":"Schedule description"},"image":{"type":"string","format":"uri","nullable":true,"description":"Schedule banner image URL"},"theme":{"type":"string","nullable":true,"enum":["mvmf_2022","mvfw_2023","pride_2023"],"description":"Pre-built theme identifier"},"background":{"type":"array","description":"Background colors (CSS color values)","items":{"type":"string"}},"active":{"type":"boolean","description":"Whether the schedule is active"},"active_since":{"type":"string","format":"date-time","description":"When the schedule becomes active"},"active_until":{"type":"string","format":"date-time","description":"When the schedule expires"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","active_since","active_until"]}}}}}},"400":{"description":"Bad request - invalid parameters or body","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string","description":"Error message"}},"required":["ok","error"]}}}},"401":{"description":"Unauthorized - authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string","description":"Error message"}},"required":["ok","error"]}}}},"403":{"description":"Forbidden - insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string","description":"Error message"}},"required":["ok","error"]}}}},"404":{"description":"Not found - resource doesn't exist","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string","description":"Error message"}},"required":["ok","error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string","description":"Error message"}},"required":["ok","error"]}}}}}}}}}
```
