API Reference

Create Context Pack Version

Creating a new context pack version requires at least one context item; the name and prompts are optional.

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

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

Endpoint Request

Request Properties
name
string, optional
Name of the context pack 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.
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"
      }
   ]
}

Endpoint Response

A successful call returns a 201 status code with a response that contains the context pack version object.

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