Types API
REST
Admin only
Basics
Section titled “Basics”Data Types act as the blueprints for your data. They define the JSON Schema that every object must satisfy before it can be saved.
- Base path:
/api/memory/types - Auth:
Authorization: Bearer <token>
List types
Section titled “List types”GET /api/memory/types
Retrieves all available type definitions.
Response
{ "items": [ { "id": "b1820464-9e11...", "type": "Ticket", "version": 1, "jsonSchema": { "type": "object" } } ]}Create a type
Section titled “Create a type”POST /api/memory/types
Define a new blueprint. You provide a unique name and the validation schema.
Body
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Unique identifier (for example Ticket). |
jsonSchema | object | Yes | Valid JSON Schema object. |
groupNames | string[] | No | PARAMETER, RETURN, or KNOWLEDGE. |
Example
{ "type": "Ticket", "groupNames": ["KNOWLEDGE"], "jsonSchema": { "type": "object", "required": ["status"], "properties": { "status": { "type": "string" }, "priority": { "type": "string" } } }}Update a type
Section titled “Update a type”PUT /api/memory/types/{id}
Update the schema or metadata for an existing type.
Body
| Field | Type | Required | Description |
|---|---|---|---|
jsonSchema | object | Yes | The new validation schema. |
groupNames | string[] | No | The updated list of groups. |
Response
Returns the active type definition.
Delete a type
Section titled “Delete a type”DELETE /api/memory/types/{id}
Removes the definition.
- Constraint: you cannot delete a type if objects are still using it. Delete dependent objects first to keep data consistent.