Skip to main content
POST
Open a draft pull request for a post

Authorizations

Authorization
string
header
required

Send your API key in the Authorization header as Bearer API_KEY. Account API keys work in every workspace you belong to: send X-Notra-Organization-Id with the workspace id or slug to choose one. Workspace endpoints require it when you belong to more than one workspace; GET /v1/me/workspaces works without it. Organization keys only accept their own workspace there.

Path Parameters

postId
string
required
Minimum string length: 1
Pattern: ^[A-Za-z0-9_-]{1,100}$
Example:

"post_123"

Body

application/json

Where to open the pull request. Omit both fields when the organization has exactly one connected GitHub repository.

integrationId
string

GitHub integration ID from GET /v1/integrations to open the pull request in.

Minimum string length: 1
Example:

"integration_1"

github
object

Connected repository by owner and name, instead of integrationId.

Example:

Response

Draft pull request opened or updated

organization
object
required
pullRequest
object
required