/services/popups/v1/popups/create
Auth
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
name |
string
max: 255 |
Yes | ||
event_type |
string
reload, time_on_page, scroll, exit_intent, click, inactivity, manual |
No | ||
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 | ||
form_id |
integer|null | 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 |
| 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 |
object | |
data.id |
string | |
data.content_page_slug |
string |
| 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 |
| 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/popups/v1/popups/create" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"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",
"form_id": "string",
"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/create', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"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",
"form_id": "string",
"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/create', {
"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",
"form_id": "string",
"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 = {
"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",
"form_id": "string",
"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/create", headers=headers, json=data)
print(r.json())
{
"error": true,
"message": "string",
"data": {
"id": "string",
"content_page_slug": "string"
}
}