API Reference

Update Context Pack Version

This endpoint allows you to update any combination of the context pack version's items, prompts, or primary flag.

Endpoint
PATCH https://api.zatomic.ai/v1/context/packs/{contextPackId}/versions/{versionId}

// Example
PATCH https://api.zatomic.ai/v1/context/packs/cpk_2qRzu8geIvfudcJTwP0pur4TbMJ/versions/cpv_2qRzu8qzlNOMhTrini2EKCDh5r6

Endpoint Request

Request Properties
name
string, optional
Name of the version.
items
list of context item objects

Properties for the context item object:

context_item_id
string
The ID of the context item to include in the context pack.
version_id
string
The ID of the version of the context item to include in the context pack.
prompts
list of prompt objects, optional

Properties for the prompt object:

prompt_id
string
The ID of the prompt to include in the context pack.
version_id
string
The ID of the version of the prompt to include in the context pack.
is_primary
boolean, optional
Flag that determines if the version is the primary version for the context pack.
Request Body
{
   "name": "Context pack version name",
   "items": [
      {
         "context_item_id": "Context item ID",
         "version_id": "Context item version ID"
      }
   ],
   "prompts": [
      {
         "prompt_id": "Prompt ID",
         "version_id": "Prompt version ID"
      }
   ],
   "is_primary": true
}

Endpoint Response

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

HTTP Status Codes
200 OK The context pack version was updated.
400 Bad Request At least one context item was not provided in the request.
404 Not Found The context pack version didn't exist.
423 Locked The context pack version was locked.
500 Internal Server Error Something went wrong on Zatomic's end.