Website Builder API
POST /services/websites/v1/themes/templates/library Auth

Get Template Library - Theme templates for Plus button

GET /api/v1/templates/library Returns theme templates for the Plus button modal in page builder. Shows templates from installed themes (grouped by theme). Infrastructure templates are now loaded from /templates/all endpoint. Decision 14: Template Library Integration

Request Body

FieldTypeRequiredDescriptionExample
filter_theme_id integer|null No Filter templates to only show those from a specific installed theme
search string|null
max: 255
No Search templates by title (case-insensitive partial match)
template_type string|null
all, custom_template, reusable_template, header_template, footer_template
No Filter by template type (default: all)

Responses

500
200
422
401
403
429
Internal server error
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
data mixed[]
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
message string
data object
data.templates object
data.stats object
data.filters object
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/themes/templates/library" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "filter_theme_id": "string",
    "search": "string",
    "template_type": "string"
}'
fetch('https://api.wemasy.nl/api/services/websites/v1/themes/templates/library', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "filter_theme_id": "string",
    "search": "string",
    "template_type": "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/themes/templates/library', {
    "filter_theme_id": "string",
    "search": "string",
    "template_type": "string"
});
$data = $response->json();
import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = {
    "filter_theme_id": "string",
    "search": "string",
    "template_type": "string"
}
r = requests.post("https://api.wemasy.nl/api/services/websites/v1/themes/templates/library", headers=headers, json=data)
print(r.json())
Response Example
{
    "error": false,
    "message": "string",
    "data": {
        "templates": {
            "theme_templates": [],
            "installed_themes": []
        },
        "stats": {
            "total_theme": 0,
            "total_sections": 0,
            "total": 0,
            "installed_themes_count": 0
        },
        "filters": {
            "active_theme_filter": "string",
            "active_search": "string",
            "active_type_filter": "string"
        }
    }
}

Try It
Request Body Optional

Export