---
ai:
  exclude: true
search:
  tags:
    - issue
    - PUT
seo:
  description: >-
    Updates an existing worklog… Reference for the PUT
    /api/2/issue/{issueIdOrKey}/worklog/{id} endpoint in the Jira Software Data
    Center REST API Reference.
sidebar:
  label: Update a worklog entry
  badge: PUT
title: Update a worklog entry
type: openapi-operation
---
Updates an existing worklog entry. Note that:
- Fields possible for editing are: comment, visibility, started, timeSpent and timeSpentSeconds.
- Either timeSpent or timeSpentSeconds can be set.
- Fields which are not set will not be updated.
- For a request to be valid, it has to have at least one field change.

`PUT /api/2/issue/{issueIdOrKey}/worklog/{id}`

**Request body** (`application/json`)

Worklog update request

- `author` (UserJsonBean)
- `comment` (string)
- `created` (string)
- `id` (string)
- `issueId` (string)
- `self` (string<uri>)
- `started` (string)
- `timeSpent` (string)
- `timeSpentSeconds` (integer<int64>)
- `updateAuthor` (UserJsonBean)
- `updated` (string)
- `visibility` (VisibilityJsonBean)

Request body example:

```json
{
  "author": {
    "active": true,
    "avatarUrls": "http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000",
    "displayName": "Fred F. User",
    "emailAddress": "fred@example.com",
    "key": "fred",
    "name": "Fred",
    "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
    "timeZone": "Australia/Sydney"
  },
  "comment": "I did some work here.",
  "created": "2010-07-14T18:23:23.733+0000",
  "id": "100028",
  "issueId": "10002",
  "self": "http://www.example.com/jira/rest/api/2/issue/10010/worklog/10000",
  "started": "2010-07-14T18:23:23.733+0000",
  "timeSpent": "3h 20m",
  "timeSpentSeconds": 12000,
  "updateAuthor": {
    "active": true,
    "avatarUrls": "http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000",
    "displayName": "Fred F. User",
    "emailAddress": "fred@example.com",
    "key": "fred",
    "name": "Fred",
    "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
    "timeZone": "Australia/Sydney"
  },
  "updated": "2010-07-14T18:23:23.733+0000",
  "visibility": {
    "type": "group",
    "value": "jira-software-users"
  }
}
```

**Responses**

- `200` — Returned if update was successful.
- `400` — Returned if the input is invalid (e.g. missing required fields, invalid values, and so forth).
- `403` — Returned if the calling user does not have permission to update the worklog.

Response example, 200:

```json
{
  "author": {
    "active": true,
    "avatarUrls": "http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000",
    "displayName": "Fred F. User",
    "emailAddress": "fred@example.com",
    "key": "fred",
    "name": "Fred",
    "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
    "timeZone": "Australia/Sydney"
  },
  "comment": "I did some work here.",
  "created": "2010-07-14T18:23:23.733+0000",
  "id": "100028",
  "issueId": "10002",
  "self": "http://www.example.com/jira/rest/api/2/issue/10010/worklog/10000",
  "started": "2010-07-14T18:23:23.733+0000",
  "timeSpent": "3h 20m",
  "timeSpentSeconds": 12000,
  "updateAuthor": {
    "active": true,
    "avatarUrls": "http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000",
    "displayName": "Fred F. User",
    "emailAddress": "fred@example.com",
    "key": "fred",
    "name": "Fred",
    "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
    "timeZone": "Australia/Sydney"
  },
  "updated": "2010-07-14T18:23:23.733+0000",
  "visibility": {
    "type": "group",
    "value": "jira-software-users"
  }
}
```
