Update Prompt Pull Request
(v2)PUT
Changes the title and description of an open pull request and returns the updated pull request. Its branches cannot be changed, and a merged or closed pull request cannot be updated.
curl -X PUT "https://api.confident-ai.com/v2/prompts/{promptId}/pull-requests/{pullRequestId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"title": "Tighten the support tone",
"description": "Shortens the greeting and drops the apology.",
"sourceBranchId": "<SOURCE-BRANCH-ID>",
"targetBranchId": "<TARGET-BRANCH-ID>"
}'{
"success": true,
"data": {
"id": "<PULL-REQUEST-ID>",
"title": "Tighten the support tone",
"status": "OPEN",
"sourceBranchId": "<SOURCE-BRANCH-ID>",
"targetBranchId": "<TARGET-BRANCH-ID>",
"createdBy": {
"id": "<USER-ID>",
"email": "jane@acme.com",
"name": "Jane Doe",
"image": null
},
"createdAt": "2026-05-28T13:05:24.777Z",
"mergedAt": null,
"description": "Shortens the greeting and drops the apology.",
"mergedBy": {
"id": "<USER-ID>",
"email": "jane@acme.com",
"name": "Jane Doe",
"image": null
},
"mergeCommit": {
"id": "<COMMIT-ID>",
"hash": "bab04ce",
"message": "Committed from API"
},
"updatedAt": "2026-05-28T13:35:16.268Z"
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
promptIdstringRequiredThe unique id of the prompt.
pullRequestIdstringRequiredThe unique id of the pull request.
Request body
titlestringRequiredThe title of the pull request.
descriptionstring | nullWhat the pull request changes and why. Omit to leave it empty when opening, or to keep the stored value when updating; send
nullwhen updating to clear it.sourceBranchIdstringThe id of the branch whose changes are proposed. Required when opening a pull request, and it must have at least one commit. Ignored when updating, since a pull request keeps its branches.
targetBranchIdstringThe id of the branch the changes would be merged into, different from the source branch. Required when opening a pull request. Ignored when updating.
Response
Update Prompt Pull Request succeeded.
successbooleanIndicates if the request was successful.
dataobjectA proposal to merge one branch of a prompt into another, with where it stands and, once merged, the commit it produced.
Show 12 propertiesHide 12 properties
idstringThe unique id of the pull request.
titlestringThe title of the pull request.
statusenumWhere a pull request stands:
OPENwhile it awaits a decision,MERGEDonce its changes landed on the target branch, orCLOSEDwhen it was dropped without merging.Show 3 enum valuesHide 3 enum values
OPENMERGEDCLOSED
sourceBranchIdstringThe id of the branch whose changes are proposed.
targetBranchIdstringThe id of the branch the changes would be merged into.
createdByobjectThe user who opened the pull request.
Show 4 propertiesHide 4 properties
idstringThis is the id of the user.
emailstringThis is the email address of the user.
namestring | nullThis is the display name of the user, or
nullwhen they have not set one.imagestring | nullThis is the URL of the user's avatar, or
nullwhen they have none.
createdAtstringWhen the pull request was opened, as an ISO 8601 timestamp.
mergedAtstring | nullWhen the pull request was merged, as an ISO 8601 timestamp, or
nullwhile it has not been merged.descriptionstring | nullWhat the pull request changes and why, or
nullwhen none was given.mergedByobject | nullA Confident AI user, as referenced by the records they created.
Show 4 propertiesHide 4 properties
idstringThis is the id of the user.
emailstringThis is the email address of the user.
namestring | nullThis is the display name of the user, or
nullwhen they have not set one.imagestring | nullThis is the URL of the user's avatar, or
nullwhen they have none.
mergeCommitobject | nullShow 3 propertiesHide 3 properties
idstringThe id of a commit generated by Confident AI, not to be confused with the prompt id or the commit hash.
hashstringThe hash of a commit generated by Confident AI.
messagestringThe message associated with a commit, not to be confused with a prompt's messages.
updatedAtstringWhen the pull request was last updated, as an ISO 8601 timestamp.
deprecatedbooleanIndicates if this endpoint is deprecated.