post
https://{yourinstance}.makaira.io/component
Create a new Component
Creates a new page editor component definition. Components define the data structure and UI configuration for reusable content blocks in the Makaira Page Editor.
Requires authentication.
Request
POST /component
Headers
| Header | Value |
|---|---|
Authorization | Bearer <token> |
Content-Type | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
identifier | string | Yes | Machine-readable identifier used by the frontend to map this component to a React component. |
name | string | Yes | Display name shown in the Page Editor. |
icon | string | No | Icon identifier for the Page Editor. Must be one of the values supported by the Makaira UI. |
sections | array | No | Array of section definitions. Each section groups related fields. |
Section Object
| Field | Type | Description |
|---|---|---|
type | string | Section type. |
uuid | string | Unique identifier for this section. |
fields | array | Array of field definitions. Each field has id, type, uuid, and label properties. |
Example Request
{
"identifier": "hero-banner",
"name": "Hero Banner",
"icon": "image",
"sections": [
{
"type": "general",
"uuid": "section-001",
"fields": [
{
"id": "headline",
"type": "text",
"uuid": "field-001",
"label": "Headline"
},
{
"id": "image",
"type": "image",
"uuid": "field-002",
"label": "Background Image"
}
]
}
]
}Response
Returns the created component definition.
200OK

