API Reference

Create Context Pack Version

Creating a new context pack version requires at least one context source; 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.
sources
list of context source objects

Properties for the context source object:

context_source_id
string
The ID of the context source to include in the context pack.
version_id
string
The ID of the version of the context source 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",
   "sources": [
      {
         "context_source_id": "Context source ID",
         "version_id": "Context source 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.
404 Not Found The context pack didn't exist.
500 Internal Server Error Something went wrong on Zatomic's end.