Website Builder API
POST /services/websites/v1/structures/{type}/categories/create Auth

Create Structure Category

Parameters

NameTypeInRequiredDescription
type string path Required

Request Body Required

FieldTypeRequiredDescriptionExample
title string
max: 255
Yes Display name of the category
url string
max: 500
Yes URL slug for the category page, must be unique across project
status string|null No Published status of the category (e.g. "1" for active, "0" for draft)
intro string|null No Short introduction text for the category
image string|null No Featured image URL for the category
content string|null No Main body content of the category page
parent_id integer|null No ID of the parent category for hierarchical nesting
sort_number integer|null
min: 0
No Manual sort order position for the category
layout_id integer|null No Template layout ID used to render this category page
meta_title string|null No SEO meta title for the category page
meta_image string|null No SEO meta share image URL for the category page
meta_description string|null No SEO meta description for the category page
meta_keyword string|null No SEO meta keywords for the category page
canonical_url string|null
max: 500
No Canonical URL to prevent duplicate content in search engines
no_index string|null No Whether search engines should skip indexing this category page
disable_single_page string|null No Whether to disable the individual category page (allows duplicate/external URLs)
disable_listing string|null No Whether to hide this category from listing pages
posts string|null No Comma-separated IDs of structure posts to link to this category

Responses

500
200
422
401
403
429
Internal server error
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
data mixed[]
Successful response
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
data object
data.id integer
data.url string|null
Validation error
FieldTypeDescription
message string Errors overview.
errors object A detailed description of each field that failed validation.
Unauthenticated — missing or invalid Bearer token
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
Forbidden — insufficient permissions for this resource
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
Too Many Requests — rate limit exceeded
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
Retry-After integer Seconds until the rate limit resets 60
FieldTypeDescription
error boolean
message string
Base URL
https://api.wemasy.nl/api
Authentication

Request Sample
cURL
JS
PHP
Python
curl -X POST "https://api.wemasy.nl/api/services/websites/v1/structures/{type}/categories/create" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "string",
    "url": "string",
    "status": "string",
    "intro": "string",
    "image": "string",
    "content": "string",
    "parent_id": "string",
    "sort_number": "string",
    "layout_id": "string",
    "meta_title": "string",
    "meta_image": "string",
    "meta_description": "string",
    "meta_keyword": "string",
    "canonical_url": "string",
    "no_index": "string",
    "disable_single_page": "string",
    "disable_listing": "string",
    "posts": "string"
}'
fetch('https://api.wemasy.nl/api/services/websites/v1/structures/{type}/categories/create', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "title": "string",
    "url": "string",
    "status": "string",
    "intro": "string",
    "image": "string",
    "content": "string",
    "parent_id": "string",
    "sort_number": "string",
    "layout_id": "string",
    "meta_title": "string",
    "meta_image": "string",
    "meta_description": "string",
    "meta_keyword": "string",
    "canonical_url": "string",
    "no_index": "string",
    "disable_single_page": "string",
    "disable_listing": "string",
    "posts": "string"
})})
.then(r => r.json())
.then(data => console.log(data));
$response = Http::withToken('YOUR_API_TOKEN')
    ->accept('application/json')
    ->post('https://api.wemasy.nl/api/services/websites/v1/structures/{type}/categories/create', {
    "title": "string",
    "url": "string",
    "status": "string",
    "intro": "string",
    "image": "string",
    "content": "string",
    "parent_id": "string",
    "sort_number": "string",
    "layout_id": "string",
    "meta_title": "string",
    "meta_image": "string",
    "meta_description": "string",
    "meta_keyword": "string",
    "canonical_url": "string",
    "no_index": "string",
    "disable_single_page": "string",
    "disable_listing": "string",
    "posts": "string"
});
$data = $response->json();
import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = {
    "title": "string",
    "url": "string",
    "status": "string",
    "intro": "string",
    "image": "string",
    "content": "string",
    "parent_id": "string",
    "sort_number": "string",
    "layout_id": "string",
    "meta_title": "string",
    "meta_image": "string",
    "meta_description": "string",
    "meta_keyword": "string",
    "canonical_url": "string",
    "no_index": "string",
    "disable_single_page": "string",
    "disable_listing": "string",
    "posts": "string"
}
r = requests.post("https://api.wemasy.nl/api/services/websites/v1/structures/{type}/categories/create", headers=headers, json=data)
print(r.json())
Response Example
{
    "error": false,
    "message": "string",
    "data": {
        "id": 0,
        "url": "string"
    }
}

Try It
type Required
Request Body Required

Export