Website Builder API
POST /services/websites/v1/components/paste Auth

Paste Component

Request Body Required

FieldTypeRequiredDescriptionExample
id string Yes The post_name (slug) of the target page/block, or the template/partial ID for partial types. /
copied_component_id string Yes The connection component ID of the source component to paste from. 6125
type string Yes The target type: page, secured, or partial_* variant. page
menu_order string Yes The sort position where the pasted component should be inserted. 790

Responses

200
422
401
403
429
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
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/components/paste" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "/",
    "copied_component_id": "6125",
    "type": "page",
    "menu_order": "790"
}'
fetch('https://api.wemasy.nl/api/services/websites/v1/components/paste', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "id": "/",
    "copied_component_id": "6125",
    "type": "page",
    "menu_order": "790"
})})
.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/components/paste', {
    "id": "/",
    "copied_component_id": "6125",
    "type": "page",
    "menu_order": "790"
});
$data = $response->json();
import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = {
    "id": "/",
    "copied_component_id": "6125",
    "type": "page",
    "menu_order": "790"
}
r = requests.post("https://api.wemasy.nl/api/services/websites/v1/components/paste", headers=headers, json=data)
print(r.json())
Response Example
{
    "error": false
}

Try It
Request Body Required

Export