v2

Swagger 2.02026-08-01331211921.0 KB
Issue tracker

Modify the state of an issue

Makes a change to the specified issue.

For example, to change an issue's state and assignee, create a new change object that modifies these fields:

curl https://api.bitbucket.org/2.0/site/master/issues/1234/changes \
  -s -u evzijst -X POST -H "Content-Type: application/json" \
  -d '{
    "changes": {
      "assignee_account_id": {
        "new": "557058:c0b72ad0-1cb5-4018-9cdc-0cde8492c443"
      },
      "state": {
        "new": 'resolved"
      }
    }
    "message": {
      "raw": "This is now resolved."
    }
  }'

The above example also includes a custom comment to go alongside the change. This comment will also be visible on the issue page in the UI.

The fields of the changes object are strings, not objects. This allows for immutable change log records, even after user accounts, milestones, or other objects recorded in a change entry, get renamed or deleted.

The assignee_account_id field stores the account id. When POSTing a new change and changing the assignee, the client should therefore use the user's account_id in the changes.assignee_account_id.new field.

This call requires authentication. Private repositories or private issue trackers require the caller to authenticate with an account that has appropriate authorization.

post/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes

Request body

typestring required
namestring
created_onstring date-time

Response

The newly created issue change.

typestring required
namestring
created_onstring date-time