---
title: "create new class"
method: POST
path: "/api/workspaces/{workspaceName}/schemas/{schemaName}/classes"
tags: ["graph"]
---

# create new class

`POST /api/workspaces/{workspaceName}/schemas/{schemaName}/classes`

## Request

- The document declares no server URL.
- Auth: none declared

Create a new class with default name and no attributes, stereotypes or associations. Because no concrete stereotype is added the class is abstract by default.

## Path parameters

- `workspaceName` string, required
- `schemaName` string, required

## Headers

- `Origin` string

## Request body

- AddNewClassRequest
  - `classLayoutPosition` ClassLayoutPositionDTO
    - `xPosition` number, double
    - `yPosition` number, double
  - `className` string
  - `classURIPrefix` string
  - `packageDTO` PackageDTO
    - `comment` string
    - `label` string
    - `package` BelongsToCategoryDTO
      - `label` string
      - `prefix` string
      - `uuid` string, uuid
    - `prefix` string
    - `uuid` string, uuid

## Response `200`

OK

## Changes

- **2026-12-03** `2d877ee4961e`: 2 warning, 2 info
  - removed the request property `classLayoutPosition/xposition`
  - removed the request property `classLayoutPosition/yposition`
  - added the new optional request property `classLayoutPosition/xPosition`
  - added the new optional request property `classLayoutPosition/yPosition`
- **2026-11-23** `91d142ef001a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/soptim/apis/rdfarchitect-backend/changes/api/workspaces/:workspaceName/schemas/:schemaName/classes/post.md)

---

[API](https://skmtc.dev/soptim/apis/rdfarchitect-backend.md) - [All operations](https://skmtc.dev/soptim/apis/rdfarchitect-backend/llms.txt) - [OpenAPI document](https://skmtc.dev/soptim/apis/rdfarchitect-backend/revisions/21e6477d8dd8?raw)
