Skip to main content
POST
Create a website menu item

Authorizations

Api-Token
string
header
required

Server-to-server authentication. Generate a token in the admin UI at Settings → Developers → API Access. Send the raw token in the Api-Token header — there is no Bearer prefix.

Tokens can be marked read-only at creation time, in which case the API rejects any non-GET request with 403 Forbidden.

Body

application/json

The new WebsiteMenuItem resource

One entry of a tenant's website header menu, header buttons or footer menu.

Self-referencing for submenus, but only one level deep: a child cannot itself be a parent. The depth rule is enforced in WebsiteMenuService, not here, so the violation surfaces as a 422 on the request that caused it rather than as an exception during flush.

The header action buttons (HEADER_ACTIONS) are the same thing as a menu entry - a label pointing somewhere - drawn as a pill instead of a text link, so they reuse this table rather than living in a parallel structure.

location
string
default:HEADER
parent
unknown
label
string
default:""
description
string | null

The line under the label in a submenu ("Build on the Linear API" under "Developers"). Only the header submenu draws it; every other location renders the label alone.

page
string<iri-reference> | null
Example:

"/api/v1/website_pages/1"

url
string | null

Holds the target for every linkType except PAGE: an absolute url, a whitelisted route name, or an anchor id.

style
string
default:PRIMARY

How a HEADER_ACTIONS entry is drawn. Ignored for the header and footer menus, which render as text links.

position
integer
default:0
isActive
boolean
default:true

Alias so the isActive field is readable through API Platform.

Response

WebsiteMenuItem resource created

One entry of a tenant's website header menu, header buttons or footer menu.

Self-referencing for submenus, but only one level deep: a child cannot itself be a parent. The depth rule is enforced in WebsiteMenuService, not here, so the violation surfaces as a 422 on the request that caused it rather than as an exception during flush.

The header action buttons (HEADER_ACTIONS) are the same thing as a menu entry - a label pointing somewhere - drawn as a pill instead of a text link, so they reuse this table rather than living in a parallel structure.

id
integer
read-only
uuid
string | null
tenant
string<iri-reference>
Example:

"/api/v1/tenants/1"

location
string
default:HEADER
label
string
default:""
description
string | null

The line under the label in a submenu ("Build on the Linear API" under "Developers"). Only the header submenu draws it; every other location renders the label alone.

page
object | null
url
string | null

Holds the target for every linkType except PAGE: an absolute url, a whitelisted route name, or an anchor id.

style
string
default:PRIMARY

How a HEADER_ACTIONS entry is drawn. Ignored for the header and footer menus, which render as text links.

position
integer
default:0
isActive
boolean
default:true

Alias so the isActive field is readable through API Platform.

dateCreated
string<date-time>
read-only
dateUpdated
string<date-time> | null
read-only
parentUuid
string | null
read-only

Flat parent reference for the builder, so a child row does not carry an embedded copy of its parent.