API Reference

Update Context Item

This endpoint allows you to update either the name of the context item, its description, or both. If you need to update file or text contents, that can be done by updating a file context item version or by updating a text context item version.

You can also use this endpoint to add a context item to a project or remove a context item from a project.

Endpoint
PATCH https://api.zatomic.ai/v1/context/items/{contextItemId}

// Example
PATCH https://api.zatomic.ai/v1/context/items/ctx_2qRzu8geIvfudcJTwP0pur4TbMJ

Endpoint Request

Request Properties
name
string, optional
Name of the context item.
description
string, optional
Description of the context item.
project_id
string, optional
The ID of the project that contains the context item. Set to empty string ("") to remove the context item from its current project.
Request Body
{
   "name": "Context item name",
   "description": "Context item description.",
   "project_id": "prj_32hbc9w4iVeyUZ1iRvjZYUrvS73"
}

Endpoint Response

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

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