API Reference

Update Context Pack

This endpoint allows you to update either the name of the context pack, its description, or both. If you need to update the context items and/or prompts for a context pack, that can be done by updating a context pack version.

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

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

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

Endpoint Request

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

Endpoint Response

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

HTTP Status Codes
200 OK The context pack was updated.
400 Bad Request The context pack name 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.