---
title: "Create an entity"
method: POST
path: "/mapi/project/{projectId}/entities"
tags: ["Entities"]
---

# Create an entity

`POST /mapi/project/{projectId}/entities`

## Request

- Base URL: `https://api.websitepublisher.ai`
- URL: `https://api.websitepublisher.ai/mapi/project/{projectId}/entities`
- Auth: OAuth 2 (authorization code, authorization URL `https://api.websitepublisher.ai/dapi/oauth/authorize`, token URL `https://api.websitepublisher.ai/dapi/oauth/token`, scopes: `read`, `write`)

## Path parameters

- `projectId` integer, required

## Request body

- Entity
  - `name` string, required
  - `plural` string
  - `description` string
  - `public_read` boolean: Enable public read-only access without authentication (default: false)
  - `properties` Property[]
    - `name` string, required
    - `type` 'varchar' | 'int' | 'text' | 'datetime' | 'tinyint', required
    - `length` integer
    - `required` boolean

## Response `201`

Created

---

[API](https://skmtc.dev/websitepublisher/apis/websitepublisher-ai-api.md) · [All operations](https://skmtc.dev/websitepublisher/apis/websitepublisher-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/websitepublisher/apis/websitepublisher-ai-api/revisions/e9df1ef10551?raw)
