# Sprint Endpoints {#sprint-endpoints}


Manage agile sprints — create sprints, assign tasks, track sprint employees, and manage sprint lifecycle.


## Base Path {#base-path}


```
/api/organization-sprint
```


## Endpoints {#endpoints}



### List All Sprints {#list-all-sprints}


```
GET /api/organization-sprint
Authorization: Bearer {token}
```

**Query Parameters (JSON-encoded `data`):**

| Parameter   | Type   | Description          |
| ----------- | ------ | -------------------- |
| `findInput` | object | Filter conditions    |
| `relations` | array  | Relations to include |


### Get Sprint by ID {#get-sprint-by-id}


```
GET /api/organization-sprint/:id
Authorization: Bearer {token}
```


### Create Sprint {#create-sprint}


```
POST /api/organization-sprint
Authorization: Bearer {token}
Content-Type: application/json

{
  "name": "Sprint 1",
  "projectId": "uuid",
  "organizationId": "uuid",
  "startDate": "2024-03-01",
  "endDate": "2024-03-15",
  "goal": "Complete user authentication module",
  "length": 14,
  "dayStart": 1,
  "status": "TODO"
}
```

**Response** `201 Created`.


### Update Sprint {#update-sprint}


```
PUT /api/organization-sprint/:id
Authorization: Bearer {token}
Content-Type: application/json

{
  "status": "IN_PROGRESS",
  "goal": "Updated sprint goal"
}
```

**Response** `202 Accepted`.


### Delete Sprint {#delete-sprint}


```
DELETE /api/organization-sprint/:id
Authorization: Bearer {token}
```


## Sprint Statuses {#sprint-statuses}


| Status        | Description          |
| ------------- | -------------------- |
| `TODO`        | Planned, not started |
| `IN_PROGRESS` | Currently active     |
| `DONE`        | Completed            |


## Data Model {#data-model}


```typescript
interface IOrganizationSprint {
  id: string;
  name: string;
  goal?: string;
  length: number;
  startDate?: Date;
  endDate?: Date;
  dayStart?: number;
  status?: SprintStatusEnum;

  // Relations
  projectId: string;
  project?: IOrganizationProject;
  tasks?: ITask[];
  members?: IOrganizationSprintEmployee[];
  organizationId: string;
  tenantId: string;
}

interface IOrganizationSprintEmployee {
  sprintId: string;
  employeeId: string;
  roleInSprint?: string;
}

interface IOrganizationSprintTask {
  sprintId: string;
  taskId: string;
  totalWorkedHours?: number;
}
```


## Permissions {#permissions}


| Action         | Required Permission                   |
| -------------- | ------------------------------------- |
| View sprints   | `ALL_ORG_VIEW` or `ORG_SPRINT_VIEW`   |
| Create sprints | `ALL_ORG_EDIT` or `ORG_SPRINT_ADD`    |
| Update sprints | `ALL_ORG_EDIT` or `ORG_SPRINT_EDIT`   |
| Delete sprints | `ALL_ORG_EDIT` or `ORG_SPRINT_DELETE` |


## Related Pages {#related-pages}


- [Project Endpoints](https://sourcey-gauzy.pages.dev/api/project-endpoints/index.md) — project management
- [Task Endpoints](https://sourcey-gauzy.pages.dev/api/task-endpoints/index.md) — task management
- [Sprints Feature](https://sourcey-gauzy.pages.dev/features/sprints/index.md) — feature overview
