Zatomic API

Update Version

This endpoint allows you to update any combination of the prompt version's name, content, or primary flag.

Endpoint
PATCH https://api.zatomic.ai/v1/prompts/{promptId}/versions/{versionId}

// Example
PATCH https://api.zatomic.ai/v1/prompts/prm_2qRzu8geIvfudcJTwP0pur4TbMJ/versions/ver_2qRzu8qzlNOMhTrini2EKCDh5r6

Endpoint Request

Request Properties
name
string, optional
Name of the version.
content
string, optional
Content for the version.
is_primary
boolean, optional
Flag that determines if the version is the primary version for the prompt.
Request Body
{
   "name": "Version name",
   "content": "You are a knowledgeable and friendly assistant...",
   "is_primary": true
}

Endpoint Response

A successful call returns a response that contains the updated version object.

HTTP Status Codes
200 OK The version was updated.
404 Not Found The version didn't exist.
423 Locked The version was locked.
500 Internal Server Error Something went wrong on Zatomic's end.