Introducing Confident Voice: Watch the Launch Video Now

Merge Prompt Pull Request

(v2)

POST

Merges an open pull request: the source branch's latest commit becomes a new merge commit on the target branch, and the pull request is marked merged. Returns the merge commit, whose hash pulls the merged prompt. It fails when the source branch changed after the merge started, in which case retry.

POST/v2/prompts/{promptId}/pull-requests/{pullRequestId}/merge
curl -X POST "https://api.confident-ai.com/v2/prompts/{promptId}/pull-requests/{pullRequestId}/merge" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
200
{
  "success": true,
  "data": {
    "id": "<COMMIT-ID>",
    "hash": "bab04ce",
    "message": "Committed from API"
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • promptIdstringRequired

    The unique id of the prompt.

  • pullRequestIdstringRequired

    The unique id of the pull request.

Response

Merge Prompt Pull Request succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    Show 3 propertiesHide 3 properties
    • idstring

      The id of a commit generated by Confident AI, not to be confused with the prompt id or the commit hash.

    • hashstring

      The hash of a commit generated by Confident AI.

    • messagestring

      The message associated with a commit, not to be confused with a prompt's messages.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI