/services/websites/v1/structures/{type}/create
Auth
| Name | Type | In | Required | Description |
|---|---|---|---|---|
type |
string | path | Required |
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
title |
string
max: 255 |
Yes | Display name of the post | |
url |
string
max: 500 |
Yes | URL slug for the post page, must be unique across project | |
status |
string|null
0, 1 |
No | Published status of the post (1 = active, 0 = draft) | |
content |
string|null | No | Main body content of the post | |
intro |
string|null | No | Short introduction text for the post | |
image |
string|null | No | Featured image URL for the post | |
sort_number |
integer|null
min: 0 |
No | Manual sort order position for the post | |
main_category_id |
integer|null | No | ID of the primary category this post belongs to | |
layout_id |
integer|null | No | Template layout ID used to render this post page | |
meta_keyword |
string|null
max: 255 |
No | SEO meta keywords for the post page | |
meta_title |
string|null
max: 255 |
No | SEO meta title for the post page | |
meta_image |
string|null | No | SEO meta share image URL for the post page | |
disable_single_page |
boolean|null | No | Whether to disable the individual post page (allows duplicate/external URLs) | |
disable_listing |
boolean|null | No | Whether to hide this post from listing pages | |
meta_description |
string|null | No | SEO meta description for the post page | |
canonical_url |
string|null
max: 500 |
No | Canonical URL to prevent duplicate content in search engines | |
no_index |
boolean|null | No | Whether search engines should skip indexing this post page | |
scheduled_at |
string|null (date-time) | No | Date and time when the post should be published | |
categories |
string|null | No | Comma-separated IDs of categories to link to this post |
| Header | Type | Description | Example |
|---|---|---|---|
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 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string | |
data |
mixed[] |
| Header | Type | Description | Example |
|---|---|---|---|
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 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string | |
data |
object | |
data.id |
integer | |
data.url |
string|null |
| Field | Type | Description |
|---|---|---|
message |
string | Errors overview. |
errors |
object | A detailed description of each field that failed validation. |
| Header | Type | Description | Example |
|---|---|---|---|
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 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
| Header | Type | Description | Example |
|---|---|---|---|
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 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
| Header | Type | Description | Example |
|---|---|---|---|
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 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
curl -X POST "https://api.wemasy.nl/api/services/websites/v1/structures/{type}/create" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"title": "string",
"url": "string",
"status": "string",
"content": "string",
"intro": "string",
"image": "string",
"sort_number": "string",
"main_category_id": "string",
"layout_id": "string",
"meta_keyword": "string",
"meta_title": "string",
"meta_image": "string",
"disable_single_page": "string",
"disable_listing": "string",
"meta_description": "string",
"canonical_url": "string",
"no_index": "string",
"scheduled_at": "string",
"categories": "string"
}'
fetch('https://api.wemasy.nl/api/services/websites/v1/structures/{type}/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",
"content": "string",
"intro": "string",
"image": "string",
"sort_number": "string",
"main_category_id": "string",
"layout_id": "string",
"meta_keyword": "string",
"meta_title": "string",
"meta_image": "string",
"disable_single_page": "string",
"disable_listing": "string",
"meta_description": "string",
"canonical_url": "string",
"no_index": "string",
"scheduled_at": "string",
"categories": "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}/create', {
"title": "string",
"url": "string",
"status": "string",
"content": "string",
"intro": "string",
"image": "string",
"sort_number": "string",
"main_category_id": "string",
"layout_id": "string",
"meta_keyword": "string",
"meta_title": "string",
"meta_image": "string",
"disable_single_page": "string",
"disable_listing": "string",
"meta_description": "string",
"canonical_url": "string",
"no_index": "string",
"scheduled_at": "string",
"categories": "string"
});
$data = $response->json();
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
data = {
"title": "string",
"url": "string",
"status": "string",
"content": "string",
"intro": "string",
"image": "string",
"sort_number": "string",
"main_category_id": "string",
"layout_id": "string",
"meta_keyword": "string",
"meta_title": "string",
"meta_image": "string",
"disable_single_page": "string",
"disable_listing": "string",
"meta_description": "string",
"canonical_url": "string",
"no_index": "string",
"scheduled_at": "string",
"categories": "string"
}
r = requests.post("https://api.wemasy.nl/api/services/websites/v1/structures/{type}/create", headers=headers, json=data)
print(r.json())
{
"error": false,
"message": "string",
"data": {
"id": 0,
"url": "string"
}
}