Skip to main content
POST
/
orgs
/
{org_id}
/
nodes
/
{node_id}
/
pull-requests
Create Pull Request
curl --request POST \
  --url https://api.example.com/orgs/{org_id}/nodes/{node_id}/pull-requests \
  --header 'Content-Type: application/json' \
  --data '
{
  "source_branch": "<string>",
  "title": "<string>",
  "target_branch": "main",
  "description": "<string>",
  "is_draft": false
}
'
{
  "pr": {
    "id": "<string>",
    "node_id": "<string>",
    "number": 123,
    "title": "<string>",
    "source_branch": "<string>",
    "target_branch": "<string>",
    "source_commit": "<string>",
    "target_commit": "<string>",
    "status": "<string>",
    "is_draft": true,
    "author": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "description": "<string>",
    "author_email": "<string>",
    "merged_by": "<string>",
    "merged_by_email": "<string>",
    "closed_by": "<string>",
    "closed_by_email": "<string>",
    "merged_at": "2023-11-07T05:31:56Z",
    "closed_at": "2023-11-07T05:31:56Z",
    "can_merge": true,
    "merge_reason": "<string>",
    "commits_ahead": 123
  }
}

Headers

authorization
string | null

Path Parameters

org_id
string
required
node_id
string
required

Body

application/json

Request model for creating a pull request.

source_branch
string
required

Source branch name

title
string
required

PR title

Required string length: 1 - 255
target_branch
string
default:main

Target branch name

description
string | null

PR description

is_draft
boolean
default:false

Whether PR is draft

Response

Successful Response

Response for creating a pull request.

pr
PullRequestResponse · object
required

Created pull request