Skip to content

Types API

REST Admin only

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>

GET /api/memory/types

Retrieves all available type definitions.

Response

{
"items": [
{
"id": "b1820464-9e11...",
"type": "Ticket",
"version": 1,
"jsonSchema": { "type": "object" }
}
]
}

POST /api/memory/types

Define a new blueprint. You provide a unique name and the validation schema.

Body

FieldTypeRequiredDescription
typestringYesUnique identifier (for example Ticket).
jsonSchemaobjectYesValid JSON Schema object.
groupNamesstring[]NoPARAMETER, RETURN, or KNOWLEDGE.

Example

{
"type": "Ticket",
"groupNames": ["KNOWLEDGE"],
"jsonSchema": {
"type": "object",
"required": ["status"],
"properties": {
"status": { "type": "string" },
"priority": { "type": "string" }
}
}
}

PUT /api/memory/types/{id}

Update the schema or metadata for an existing type.

Body

FieldTypeRequiredDescription
jsonSchemaobjectYesThe new validation schema.
groupNamesstring[]NoThe updated list of groups.

Response

Returns the active type definition.

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.