Skip to main content
Browse Documentation
HTTP - Management

Create a node

Created by Contensis product team, last updated 22 Jun 2020

Creates a new child node under a specified parent node .

POST/api/management/projects/{projectId}/nodes/{parentNodeId}/children

Parameters

NameParameter typeTypeFormatDescriptionExampleRequired
projectIdpathstringThe project identifier found in the project overview screen of the management consolemovieDbtrue
parentNodeIdpathstringuuidThe parent node identifier for the children which have an order.true
nodebodyobjectnodeThe node object to updatetrue

Examples

An example of posting all fields to create a node

POST: /api/management/projects/website/nodes/f3322e4f-72b5-4064-be88-fcfed6c82635/children

{
    "id": "d6bdea41-729c-4a07-85bf-a392aa0afc2b",
    "parentId": "f3322e4f-72b5-4064-be88-fcfed6c82635",
    "displayName": {
        "en-GB": "Fight club",
        "fr-FR": "Club de combat"
    },
    "slug": {
        "en-GB": "fight-club",
    "fr-FR": "club-de-combat"
    },
    "restrictedToLanguages": [
        "en-GB",
        "fr-FR"
    ],
    "entryId": "9272ac06-1b3a-4e68-ac1b-a05828b0f7d6",
    "includeInMenu": true
}

Minimum fields required to create a node

POST: /api/management/projects/website/nodes/f3322e4f-72b5-4064-be88-fcfed6c82635/children

{
    "parentId": "f3322e4f-72b5-4064-be88-fcfed6c82635",
    "displayName": {
        "en-GB": "Fight club"
    }
}

Responses

HTTP status codeReasonModel
201CreatedNode
401UnauthorizedError
404Parent node not foundError
404Project not foundError
409Resource already existsError
422Validation errorError
500Internal server errorError