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

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.

Servers

Path parameters

Name Type Required Description
issue_id String Yes

The issue id

repo_slug String Yes

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

workspace String Yes

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
name String No
changes Object No
changes.assignee Object No
changes.assignee.new String No
changes.assignee.old String No
changes.milestone Object No
changes.milestone.new String No
changes.milestone.old String No
changes.priority Object No
changes.priority.new String No
changes.priority.old String No
changes.version Object No
changes.version.new String No
changes.version.old String No
changes.title Object No
changes.title.new String No
changes.title.old String No
changes.content Object No
changes.content.new String No
changes.content.old String No
changes.kind Object No
changes.kind.new String No
changes.kind.old String No
changes.state Object No
changes.state.new String No
changes.state.old String No
changes.component Object No
changes.component.new String No
changes.component.old String No
message Object No
message.markup String No

The type of markup language the raw content is to be interpreted in.

Possible values:

  • "creole"
  • "markdown"
  • "plaintext"
message.html String No

The user's content rendered as HTML.

message.raw String No

The text as it was typed by a user.

created_on String No
type String Yes
links Object No
links.issue Object No

A link to a resource related to this object.

links.issue.href String No
links.issue.name String No
links.self Object No

A link to a resource related to this object.

links.self.href String No
links.self.name String No

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.