/services/websites/v1/layouts/create
Auth
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
title |
string
max: 255 |
Yes | Display name of the layout, stored as post_title | |
type |
string | Yes | Layout type classification, stored as custom (e.g. custom_template) | |
header_template |
string | No | ID of a header partial to attach to this layout | |
footer_template |
string | No | ID of a footer partial to attach to this layout | |
content_template |
string | No | ID of a content partial (auto-created for non-custom_template types) | |
type_layout |
string|null | No | Layout subtype identifier, stored as post_name | |
connection_id |
integer|null | No | External connection reference ID for linking to other systems |
| 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 | |
template |
object | |
template.id |
integer | |
template.title |
string | |
template.type |
string | |
template.header_template |
string | |
template.content_template |
string | |
template.footer_template |
string | |
template.connection_id |
string |
| 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/layouts/create" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"title": "string",
"type": "string",
"header_template": "string",
"footer_template": "string",
"content_template": "string",
"type_layout": "string",
"connection_id": "string"
}'
fetch('https://api.wemasy.nl/api/services/websites/v1/layouts/create', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"title": "string",
"type": "string",
"header_template": "string",
"footer_template": "string",
"content_template": "string",
"type_layout": "string",
"connection_id": "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/layouts/create', {
"title": "string",
"type": "string",
"header_template": "string",
"footer_template": "string",
"content_template": "string",
"type_layout": "string",
"connection_id": "string"
});
$data = $response->json();
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
data = {
"title": "string",
"type": "string",
"header_template": "string",
"footer_template": "string",
"content_template": "string",
"type_layout": "string",
"connection_id": "string"
}
r = requests.post("https://api.wemasy.nl/api/services/websites/v1/layouts/create", headers=headers, json=data)
print(r.json())
{
"error": false,
"template": {
"id": 0,
"title": "string",
"type": "string",
"header_template": "string",
"content_template": "string",
"footer_template": "string",
"connection_id": "string"
}
}