## Update a sprint

`PATCH /v1/scrum/sprints/:id`

Changes the name, dates, order or status of a sprint. The request body is flat, with no `fields` wrapper; pass only the fields you change.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `id` (path) | number | yes | Sprint ID. Obtain it from the [list of sprints](/docs/scrum/sprints/list) or the [active sprint](/docs/scrum/sprints/active) |

## Request fields (body)

At least one field is required.

| Field | Type | Description |
|------|-----|---------|
| `name` | string | Sprint name |
| `dateStart` | string \| number | Sprint start: a date `2026-11-02` or a Unix timestamp |
| `dateEnd` | string \| number | Sprint end: a date `2026-11-16` or a Unix timestamp |
| `status` | string | `planned`, `active` or `completed` |
| `sort` | number | Sprint order within the project |
| `groupId` | number | Scrum project ID. List of groups: [`GET /v1/workgroups`](/docs/entities/workgroups/list) |
| `createdBy` | number | ID of the sprint author. List: [`GET /v1/users`](/docs/entities/users/list) |
| `modifiedBy` | number | ID of the user who changed the sprint. List: [`GET /v1/users`](/docs/entities/users/list) |

## Examples

### curl — personal key

```bash
curl -X PATCH https://vibecode.bitrix24.com/v1/scrum/sprints/45 \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Sprint 11", "dateEnd": "2026-11-16" }'
```

### curl — OAuth application

```bash
curl -X PATCH https://vibecode.bitrix24.com/v1/scrum/sprints/45 \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Sprint 11", "dateEnd": "2026-11-16" }'
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/scrum/sprints/45', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ name: 'Sprint 11', dateEnd: '2026-11-16' }),
})

const { data: sprint } = await res.json()
console.log(sprint.name, sprint.dateEnd)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/scrum/sprints/45', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ name: 'Sprint 11', dateEnd: '2026-11-16' }),
})

const { data: sprint } = await res.json()
console.log(sprint.name, sprint.dateEnd)
```

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | `true` on successful update |
| `data` | object | The sprint after the update |
| `data.id` | number | Sprint ID |
| `data.groupId` | number | Scrum project ID |
| `data.entityType` | string | Record type, `sprint` |
| `data.name` | string | Sprint name |
| `data.goal` | string | Sprint goal |
| `data.sort` | number | Sprint order within the project |
| `data.createdBy` | number | ID of the sprint author |
| `data.modifiedBy` | number | ID of the user who last changed the sprint |
| `data.dateStart` | string | Sprint start in ISO 8601 format |
| `data.dateEnd` | string | Sprint end in ISO 8601 format |
| `data.status` | string | `planned`, `active` or `completed` |

## Response example

```json
{
  "success": true,
  "data": {
    "id": 45,
    "groupId": 211,
    "entityType": "sprint",
    "name": "Sprint 11",
    "goal": "",
    "sort": 1,
    "createdBy": 1317,
    "modifiedBy": 1317,
    "dateStart": "2026-11-02T00:00:00+00:00",
    "dateEnd": "2026-11-16T00:00:00+00:00",
    "status": "planned"
  }
}
```

## Error response example

404 — no sprint with this ID exists:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Sprint not found"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 400 | `INVALID_PARAMS` | Empty body, a field outside the table, `status` outside the allowed values, or an ID that is not a positive integer |
| 404 | `ENTITY_NOT_FOUND` | No sprint with this `id` exists |
| 403 | `SCOPE_DENIED` | The key lacks the `task` scope |
| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only |
| 401 | `TOKEN_MISSING` | The key has no tokens configured |

The full list of common API errors — [Errors](/docs/errors).

## Known specifics

- **Changing the status skips the start checks.** `status: "active"` makes a planned sprint active even when it has no tasks. The [regular start](/docs/scrum/sprints#starting-a-sprint) refuses such a sprint.

## See also

- [Create a sprint](/docs/scrum/sprints/create)
- [Get a sprint](/docs/scrum/sprints/get)
- [Delete a sprint](/docs/scrum/sprints/delete)
- [Sprints](/docs/scrum/sprints)
