# Updates multiple time entries using the operation.

POST https://api.awork.com/api/v1/timeentries/batch/{operation}

Updates multiple time entries using the operation. Each requested change is reported separately.
            <Check title="Required Permissions" icon="key">The user must have permission to access the requested time entries.</Check>

## Request example

```sh
curl -X POST --globoff 'https://api.awork.com/api/v1/timeentries/batch/{operation}' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  --data '{
  "timeEntryIds": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "newTypeOfWorkId": "123e4567-e89b-12d3-a456-426614174000",
  "isBillable": true,
  "isBilled": true,
  "requireAllTimeEntries": true,
  "newUserId": "123e4567-e89b-12d3-a456-426614174000",
  "newProjectId": "123e4567-e89b-12d3-a456-426614174000",
  "newTaskId": "123e4567-e89b-12d3-a456-426614174000"
}'
```

- path parameter `operation`: string (required). The batch operation type.

## Request body (application/json)

- `timeEntryIds`: array of string (required)

- `newTypeOfWorkId`: string or null

- `isBillable`: boolean or null

- `isBilled`: boolean or null

- `requireAllTimeEntries`: boolean

- `newUserId`: string or null

- `newProjectId`: string or null

- `newTaskId`: string or null

## Response 207

Multi-Status

application/json

```json
{
  "ok": {
    "ids": [
      "123e4567-e89b-12d3-a456-426614174000"
    ]
  },
  "notFound": {
    "ids": [
      "123e4567-e89b-12d3-a456-426614174000"
    ]
  },
  "unauthorized": {
    "ids": [
      "123e4567-e89b-12d3-a456-426614174000"
    ]
  },
  "badRequest": {
    "ids": [
      "123e4567-e89b-12d3-a456-426614174000"
    ]
  }
}
```

## Response 400

Bad Request

application/json

```json
{
  "code": "not-found",
  "description": "There is no matching path for this URL.",
  "link": "https://developers.awork.com",
  "details": [
    "No project with the id '123' exists."
  ],
  "validationErrors": [
    {
      "property": "FirstName",
      "message": "FirstName is required."
    }
  ],
  "traceId": "a65ce5745df02af216715ff06661fb3a"
}
```

## Response 404

Not Found

application/json

```json
{
  "code": "not-found",
  "description": "There is no matching path for this URL.",
  "link": "https://developers.awork.com",
  "details": [
    "No project with the id '123' exists."
  ],
  "validationErrors": [
    {
      "property": "FirstName",
      "message": "FirstName is required."
    }
  ],
  "traceId": "a65ce5745df02af216715ff06661fb3a"
}
```
