/services/websites/v1/structures/clone
Auth
Deep-copies the full content tree of a structure type. Idempotent by (website_id, identifier). Posts match on `unique_identifier`/`url`; categories match on `url`/`title`.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
source_project_id |
integer | Yes | 102907 |
|
target_project_id |
integer | Yes | 104449 |
|
source_structure_id |
integer | Yes | 204 |
|
prune |
boolean|null | No | When true, posts/categories that exist in target but not source get deleted. Default false — additive merge. |
| 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.structure |
object | |
data.categories_cloned |
integer | |
data.posts_cloned |
integer | |
data.pruned |
boolean |
| 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[] |
| 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 | |
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 |
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 |
| 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/clone" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"source_project_id": 102907,
"target_project_id": 104449,
"source_structure_id": 204,
"prune": "string"
}'
fetch('https://api.wemasy.nl/api/services/websites/v1/structures/clone', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"source_project_id": 102907,
"target_project_id": 104449,
"source_structure_id": 204,
"prune": "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/clone', {
"source_project_id": 102907,
"target_project_id": 104449,
"source_structure_id": 204,
"prune": "string"
});
$data = $response->json();
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
data = {
"source_project_id": 102907,
"target_project_id": 104449,
"source_structure_id": 204,
"prune": "string"
}
r = requests.post("https://api.wemasy.nl/api/services/websites/v1/structures/clone", headers=headers, json=data)
print(r.json())
{
"error": false,
"message": "string",
"data": {
"structure": {
"id": 0,
"identifier": "string",
"website_id": 0,
"action": "string"
},
"categories_cloned": 0,
"posts_cloned": 0,
"pruned": true
}
}