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

Import Component

Request Body Required

FieldTypeRequiredDescriptionExample
id string Yes The connection component ID to import into (replaces its content). 6122
value string Yes JSON string containing the exported component data (type + meta), or raw blocks JSON when type is provided separately. {"type":"blockGalleryThree","meta":{"logo_image":"https://example.com/image1.jpeg|https://example.com/image2.jpeg","padding_top":null,"padding_bottom":null,"section_bg_image":""}}
type string|null No Optional component type override; when set, value is treated as raw section content instead of a type/meta wrapper. blockGalleryThree

Responses

200
422
403
401
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
component object
component.id string
Validation error
FieldTypeDescription
message string Errors overview.
errors object A detailed description of each field that failed validation.
Forbidden — insufficient permissions
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
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
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/import" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "6122",
    "value": "{\"type\":\"blockGalleryThree\",\"meta\":{\"logo_image\":\"https://example.com/image1.jpeg|https://example.com/image2.jpeg\",\"padding_top\":null,\"padding_bottom\":null,\"section_bg_image\":\"\"}}",
    "type": "blockGalleryThree"
}'
fetch('https://api.wemasy.nl/api/services/websites/v1/components/import', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "id": "6122",
    "value": "{\"type\":\"blockGalleryThree\",\"meta\":{\"logo_image\":\"https://example.com/image1.jpeg|https://example.com/image2.jpeg\",\"padding_top\":null,\"padding_bottom\":null,\"section_bg_image\":\"\"}}",
    "type": "blockGalleryThree"
})})
.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/import', {
    "id": "6122",
    "value": "{\"type\":\"blockGalleryThree\",\"meta\":{\"logo_image\":\"https://example.com/image1.jpeg|https://example.com/image2.jpeg\",\"padding_top\":null,\"padding_bottom\":null,\"section_bg_image\":\"\"}}",
    "type": "blockGalleryThree"
});
$data = $response->json();
import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = {
    "id": "6122",
    "value": "{\"type\":\"blockGalleryThree\",\"meta\":{\"logo_image\":\"https://example.com/image1.jpeg|https://example.com/image2.jpeg\",\"padding_top\":null,\"padding_bottom\":null,\"section_bg_image\":\"\"}}",
    "type": "blockGalleryThree"
}
r = requests.post("https://api.wemasy.nl/api/services/websites/v1/components/import", headers=headers, json=data)
print(r.json())
Response Example
{
    "error": false,
    "component": {
        "id": "string"
    }
}

Try It
Request Body Required

Export