Last updated Jul 16, 2025

Pull request

The Pull request object type represents a pull request object within a repository. atlassian:pull-request should be used to ingest pull request-specific fields.

Payload structure

1
2
  objects {}
  ├─ schemaVersion (string) [Required]
  ├─ id (string) [Required]
  ├─ updateSequenceNumber (long) [Required]
  ├─ displayName (string) [Required]
  ├─ description (string) [Optional]
  ├─ url (string) [Required]
  ├─ createdAt (Instant (ISO8601 / RFC3339)) [Required]
  └─ createdBy [] [Optional]
      ├─ accountId (string)
      └─ ari (string)
  └─ lastUpdatedAt (Instant (ISO8601 / RFC3339)) [Required]
  └─ lastUpdatedBy [] [Required]
      ├─accountId (string)
      └─ ari
  └─ containerKey ()[Required]
      ├─ type
      └─ value
  └─ permissions 
      └─ accessControls
         └─ principals
            └─type
  └─ associations [] [Optional]
      ├─ associationType (string)
      └─ values []

  atlassian:pull-request
  ├─ title (string)
  ├─ displayId (string) [Required]
  ├─ status (string) [Required]
  ├─ author (UserReference)
      ├─ accountId (string) [Optional]
      ├─ email (string) [Optional]
      ├─ externalId (string) [Optional]
      ├─ ari (string) [Optional]
      ├─ name (string) [Optional]
      ├─ userName (string) [Optional]
      ├─ avatar (string) [Optional]
      └─ url (string) [Optional]
  ├─ commentCount (integer)
  ├─ sourceBranch (string) [Required]
  ├─ sourceBranchUrl (string)
  ├─ destinationBranch (string)
  ├─ destinationBranchUrl (string)
  ├─ reviewers (List<Reviewer>) [Required]
      ├─ accountId (string) [Optional]
      ├─ id (string) [Optional]
      ├─ email (string) [Optional]
      ├─ approvalStatus (string) [Optional]
      ├─ name (string) [Optional]
      ├─ avatar (string) [Optional]
      ├─ url (string) [Optional]
      └─ ari (string) [Optional]
  └─ taskCount (integer)

You may send the container repository as a separate entity in the same payload or in a separate request.

Common properties

PropertyTypeRequiredDescription
schemaVersion

string

YesThe schema version of the object.
id

string

YesThe ID of the object in the source system.
updateSequenceNumberlongYesA sequence number to compare when writing to the database. Objects are written following a last write wins strategy, therefore an object with a greater UpdateSequenceNumber is considered a more recently updated object.
displayNamestringYesThe display name of the object.
descriptionstringNoThe description of the object.
urlstringYesThe URL from the provider which the object is accessible from.
createdAtstringYes

The date the object was created.

Format: Instant (ISO8601 / RFC3339)

createdByuserNo

The user that created the object.

See User to learn more.

lastUpdatedAtstringYes

The date the object was last updated.

Format: Instant (ISO8601 / RFC3339)

lastUpdatedByuserNo

The user that last updated the object.

See User to learn more.

ownerslist<User>NoList of users that own the object.
thumbnailthumbnailNo

The thumbnail of the object.

See Thumbnail to learn more.

parentKeyentityKeyNo

The ID of the parent object. If null, it is a standalone object.

See Entity key to learn more.

containerKeyentityKeyYes

The container identifier that this object belongs to.

See Entity key to learn more.

permissionslist<Permissions>Yes

The permissions configuration of the object.

See Permissions to learn more.

associationsassociationNo

List of objects associated with the object. Generally used to link an external object to a Atlassian object.

See Association to learn more.

Pull request properties

PropertyTypeRequiredDescription
titlestringNo

The title of the pull request.

displayIdstringYes

The display identifier for the pull request (e.g., #123).

statusstringYes

The current status of the pull request.

authorUserReferenceNo

The author of the pull request.

author.accountIdstringNo

The account ID of the pull request author.

author.emailstringNo

The email address of the pull request author.

author.externalIdstringNo

The external ID of the pull request author.

author.aristringNo

The Atlassian Resource Identifier (ARI) of the pull request author.

author.namestringNo

The name of the pull request author.

author.userNamestringNo

The username of the pull request author.

author.avatarstringNo

The avatar URL of the pull request author.

author.urlstringNo

The URL of the pull request author.

commentCountintegerNo

The number of comments on the pull request.

sourceBranchstringYes

The source branch being merged from.

sourceBranchUrlstringNo

The URL of the source branch.

destinationBranchstringNo

The destination branch being merged into.

destinationBranchUrlstringNo

The URL of the destination branch.

reviewersList<Reviewer>Yes

List of reviewers assigned to the pull request.

reviewers.accountIdstringNo

The account ID of the reviewer.

reviewers.idstringNo

The ID of the reviewer.

reviewers.emailstringNo

The email address of the reviewer.

reviewers.approvalStatusstringNo

The approval status of the reviewer.

reviewers.namestringNo

The name of the reviewer.

reviewers.avatarstringNo

The avatar URL of the reviewer.

reviewers.urlstringNo

The URL of the reviewer.

reviewers.aristringNo

The Atlassian Resource Identifier (ARI) of the reviewer.

taskCountintegerNo

The number of tasks associated with the pull request.

Example payload

1
2
{
  "objects" : [ {
    "id" : "repo-1",
    "updateSequenceNumber" : 1,
    "displayName" : "My repository",
    "description" : "A test repository",
    "url" : "https://bitbucket.org/my-project/my-repo/src/master/",
    "lastUpdatedAt" : "2023-07-19T15:27:37.000Z",
    "atlassian:repository" : {
      "forkOf" : "repo-2",
      "avatar" : "avatar.png",
      "avatarDescription" : "An avatar"
    }
  }, {
    "id" : "pr-1",
    "updateSequenceNumber" : 1,
    "displayName" : "SAI-123 A PR to do things",
    "description" : "This Pull request does X, Y, and Z.",
    "url" : "https://bitbucket.org/my-project/my-repo/src/master/",
    "lastUpdatedAt" : "2023-07-19T15:27:37.000Z",
    "containerKey" : {
      "type" : "atlassian:repository",
      "value" : {
        "repositoryId" : "repo-1"
      }
    },
    "owners" : [ {
      "externalId" : "external-id-1",
      "email" : "user4@example.com"
    } ],
    "atlassian:pull-request" : {
      "displayId" : "#2",
      "status" : "OPEN",
      "commentCount" : 324,
      "sourceBranch" : "SAI-123-sdf",
      "destinationBranch" : "main",
      "reviewers" : [ {
        "externalId" : "external-id-1",
        "email" : "user5@example.com"
      } ],
      "taskCount" : 21
    }
  } ],
  "operationType" : "NORMAL"
}

Rate this page: