Update pull status
Set pull status to open, draft, or closed.
Endpoints
PUT /api/v1/teams/{team_slug}/repos/{repo_slug}/pulls/{number}/status
PUT /api/v1/users/{username}/repos/{repo_slug}/pulls/{number}/status
Authenticated
Request
JSON body:
status(required):open,draft, orclosed
Use the merge endpoint to set status to merged.
Usage
curl --request PUT \
--header "Authorization: Bearer $GHIT_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{"status":"closed"}' \
"$GHIT_API_URL/v1/teams/platform/repos/website/pulls/42/status"
Success
200 OK with the updated pull record.
{
"uuid": "...",
"number": 42,
"status": "closed",
"closed_at": "2026-03-09T13:00:00Z",
"updated_at": "2026-03-09T13:00:00Z"
}
Errors
400 Bad Requestfor merged pull edits or attemptingstatus=mergedthrough this endpoint.403 Forbiddenwhen caller lacks write access.404 Not Foundwhen repo or pull number is not found.
Common auth errors are documented on the API overview page.