API Reference

Create Text Context Version

Creating a new text context version requires only the content; the name is optional.

Endpoint
POST https://api.zatomic.ai/v1/contexts/{contextId}/versions/text

// Example
POST https://api.zatomic.ai/v1/contexts/ctx_2qRzu8geIvfudcJTwP0pur4TbMJ/versions/text

Endpoint Request

Request Properties
content
string
Text content for the context version.
name
string, optional
Name of the version.
Request Body
{
   "name": "Context version name",
   "content": "This is a reusable piece of text."
}

Endpoint Response

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

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