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.
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"
}'{
"success": true,
"data": {
"id": "<COMMIT-ID>",
"hash": "bab04ce",
"message": "Committed from API"
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
promptIdstringRequiredThe unique id of the prompt.
hashstringRequiredThe hash of the commit to pull.
Request body
messagestringRequiredThe new message of the commit. It replaces the stored message; the commit's content and hash are unchanged.
Response
Update Prompt Commit succeeded.
successbooleanIndicates if the request was successful.
dataobjectShow 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.
deprecatedbooleanIndicates if this endpoint is deprecated.