/services/websites/v1/pages/create-from-source
Auth
POST /api/services/websites/v1/pages/create-from-source
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
theme_page_id |
integer | Yes | ID of the source page in the theme or infrastructure to clone from | |
theme_id |
integer|null | No | Theme project ID (required when not using infrastructure path) | |
version_id |
integer|null | No | Theme version project ID (required when not using infrastructure path) | |
infrastructure_website_id |
integer|null | No | Infrastructure website ID to clone from (required when not using theme path) | |
post_title |
string
max: 255 |
Yes | Display title for the new page | |
url |
string
max: 500 |
Yes | URL slug for the new page, must be unique within the project | |
status |
string
0, 1 |
Yes | Publication status of the new page (0=draft, 1=published) | |
layout_id |
integer|null | No | ID of a layout to assign (existing project layout or source layout to clone) | |
use_theme_layout |
boolean|null | No | Whether to clone the layout from the source instead of using an existing project layout |
| 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.page |
object |
| 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/pages/create-from-source" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"theme_page_id": 0,
"theme_id": "string",
"version_id": "string",
"infrastructure_website_id": "string",
"post_title": "string",
"url": "string",
"status": "string",
"layout_id": "string",
"use_theme_layout": "string"
}'
fetch('https://api.wemasy.nl/api/services/websites/v1/pages/create-from-source', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"theme_page_id": 0,
"theme_id": "string",
"version_id": "string",
"infrastructure_website_id": "string",
"post_title": "string",
"url": "string",
"status": "string",
"layout_id": "string",
"use_theme_layout": "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/pages/create-from-source', {
"theme_page_id": 0,
"theme_id": "string",
"version_id": "string",
"infrastructure_website_id": "string",
"post_title": "string",
"url": "string",
"status": "string",
"layout_id": "string",
"use_theme_layout": "string"
});
$data = $response->json();
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
data = {
"theme_page_id": 0,
"theme_id": "string",
"version_id": "string",
"infrastructure_website_id": "string",
"post_title": "string",
"url": "string",
"status": "string",
"layout_id": "string",
"use_theme_layout": "string"
}
r = requests.post("https://api.wemasy.nl/api/services/websites/v1/pages/create-from-source", headers=headers, json=data)
print(r.json())
{
"error": false,
"message": "string",
"data": {
"page": {
"id": "string",
"post_title": "string",
"post_name": "string"
}
}
}