Introducing Confident Voice: Watch the Launch Video Now

Update Prompt Commit

(v2)

PUT

Replaces the message of the prompt commit with the given hash and returns the commit. Only the message changes; the commit's content and hash stay the same.

PUT/v2/prompts/{promptId}/commits/{hash}
curl -X PUT "https://api.confident-ai.com/v2/prompts/{promptId}/commits/{hash}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "message": "Tighten the refund policy wording"
}'
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.

  • hashstringRequired

    The hash of the commit to pull.

Request body

  • messagestringRequired

    The new message of the commit. It replaces the stored message; the commit's content and hash are unchanged.

Response

Update Prompt Commit 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