Popup Builder API
POST /services/popups/v1/popups/edit Auth

Edit popup trigger

Request Body Required

FieldTypeRequiredDescriptionExample
id integer Yes
name string
max: 255
Yes
event_type string
reload, time_on_page, scroll, exit_intent, click, inactivity, manual
Yes
event_value string|null
max: 255
No
width string|null
max: 50
No
pages_list string|null No
pages_list_rule string|null
included, excluded,
No
respect_popup_close string No
disable_scroll string No
active string No
content_page_slug string|null
max: 255
No
positions object No
form_id integer|null No
must_answer boolean No
targeting object No
style object No
series string|null
max: 60
No
series_order integer|null
min: 0 max: 1000000
No
released_at string|null No
version string|null
max: 30
No
category string|null
max: 60
No
languages array|null No
fallback_language string|null No
consent object Yes

Responses

500
200
422
404
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.id string
Validation error
FieldTypeDescription
message string Errors overview.
errors object A detailed description of each field that failed validation.
Resource not found
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[]
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/popups/v1/popups/edit" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "id": 0,
    "name": "string",
    "event_type": "string",
    "event_value": "string",
    "width": "string",
    "pages_list": "string",
    "pages_list_rule": "string",
    "respect_popup_close": "string",
    "disable_scroll": "string",
    "active": "string",
    "content_page_slug": "string",
    "positions": "string",
    "form_id": "string",
    "must_answer": false,
    "targeting": "string",
    "style": "string",
    "series": "string",
    "series_order": "string",
    "released_at": "string",
    "version": "string",
    "category": "string",
    "languages": "string",
    "fallback_language": "string",
    "consent": "string"
}'
fetch('https://api.wemasy.nl/api/services/popups/v1/popups/edit', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "id": 0,
    "name": "string",
    "event_type": "string",
    "event_value": "string",
    "width": "string",
    "pages_list": "string",
    "pages_list_rule": "string",
    "respect_popup_close": "string",
    "disable_scroll": "string",
    "active": "string",
    "content_page_slug": "string",
    "positions": "string",
    "form_id": "string",
    "must_answer": false,
    "targeting": "string",
    "style": "string",
    "series": "string",
    "series_order": "string",
    "released_at": "string",
    "version": "string",
    "category": "string",
    "languages": "string",
    "fallback_language": "string",
    "consent": "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/popups/v1/popups/edit', {
    "id": 0,
    "name": "string",
    "event_type": "string",
    "event_value": "string",
    "width": "string",
    "pages_list": "string",
    "pages_list_rule": "string",
    "respect_popup_close": "string",
    "disable_scroll": "string",
    "active": "string",
    "content_page_slug": "string",
    "positions": "string",
    "form_id": "string",
    "must_answer": false,
    "targeting": "string",
    "style": "string",
    "series": "string",
    "series_order": "string",
    "released_at": "string",
    "version": "string",
    "category": "string",
    "languages": "string",
    "fallback_language": "string",
    "consent": "string"
});
$data = $response->json();
import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = {
    "id": 0,
    "name": "string",
    "event_type": "string",
    "event_value": "string",
    "width": "string",
    "pages_list": "string",
    "pages_list_rule": "string",
    "respect_popup_close": "string",
    "disable_scroll": "string",
    "active": "string",
    "content_page_slug": "string",
    "positions": "string",
    "form_id": "string",
    "must_answer": false,
    "targeting": "string",
    "style": "string",
    "series": "string",
    "series_order": "string",
    "released_at": "string",
    "version": "string",
    "category": "string",
    "languages": "string",
    "fallback_language": "string",
    "consent": "string"
}
r = requests.post("https://api.wemasy.nl/api/services/popups/v1/popups/edit", headers=headers, json=data)
print(r.json())
Response Example
{
    "error": true,
    "message": "string",
    "data": {
        "id": "string"
    }
}

Try It
Request Body Required

Export