Skip to content

Remove a widget from its A/B test

DELETE
https://api.getsitecontrol.com/v1/sites/{site_id}/widgets/{widget_id}/ab-test
curl --request DELETE \
--url https://api.getsitecontrol.com/v1/sites/1/widgets/1/ab-test \
--header 'Authorization: Bearer <token>'

Takes the widget out of its test; the test goes on for the others and ends when none is left. A widget in no test is returned with changed: false.

FieldDescription
site_id
required
Site Id
integer
widget_id
required
Widget Id

Widget id from List widgets

integer

Widget id from List widgets

Successful Response

Media typeapplication/json
WidgetSwitch
object
FieldDescription
widget
required
Widget
object
FieldDescription
id
required
Id
integer
name
Name
string
nullable
headline
Headline

The widget’s first headline, plain text; null when it has none

string
nullable
layout
required
WidgetLayout

Where the widget sits on the page, named as in the admin. modal: a window centred over the page. bar: a strip across the top or bottom of the page. panel: a box attached to the bottom of the screen, opened from its header. slide_in: a box that slides in from a corner. sidebar: a panel attached to the left or right edge of the screen. fullscreen: covers the whole screen. inline: placed inside the page content. other: a layout the admin no longer offers. “Pop-up” is not a layout: users call any widget a pop-up.

string
Allowed values: modal bar panel slide_in sidebar fullscreen inline other
is_active
required
Is Active
boolean
ab_test_group
object
FieldDescription
id
required
Id
integer
name
Name
string
nullable
folder
required
Folder
object
FieldDescription
id
required
Id

0 is General, where items outside any folder are

integer
name
required
Name
string
actions
required
Actions

Event types the widget can produce besides show and close

Array<string>
features
required
WidgetFeatures
object
FieldDescription
collects_email
required
Collects Email

Has an e-mail field

boolean
collects_phone
required
Collects Phone

Has a phone field

boolean
has_coupon
required
Has Coupon

A button copies or applies a discount code

boolean
has_game
required
Has Game

Has a game: a wheel, a scratch card or a reveal

boolean
has_countdown
required
Has Countdown

Has a countdown timer

boolean
has_teaser
required
Has Teaser

Has a teaser, the small tab shown before or after it

boolean
captcha
required
Captcha

ReCAPTCHA checks its form submits

boolean
double_opt_in
required
Double Opt In

A new subscriber confirms the address by e-mail first

boolean
email_quality_filter
required
Email Quality Filter

Submits with disposable or untrusted e-mail addresses are rejected

boolean
notifications
required
Notifications

Responses are e-mailed: switched on, with a recipient

boolean
in_ab_test
required
In Ab Test

In an A/B test, named in ab_test_group

boolean
has_integration
required
Has Integration

An integration, webhook or Zapier switched on sends its responses

boolean
has_draft
required
Has Draft

You have a draft of it with unsaved changes, see draft

boolean
targeting
required
WidgetTargeting
object
FieldDescription
is_complete
required
Is Complete

False when some rules could not be read into the blocks below

boolean
warnings
required
Warnings

Informational notes; wording is not stable, do not parse

Array<string>
pages
Pages

Null when the block could not be read

object
FieldDescription
include
required
Include
Array<string>
exclude
required
Exclude
Array<string>
audience
object
FieldDescription
match
required
TargetingMatch

All: every item must hold; any: one is enough.

string
Allowed values: all any
segments
required
Segments
Array<object>
TargetingAudienceSegment
object
FieldDescription
match
required
TargetingMatch

All: every item must hold; any: one is enough.

string
Allowed values: all any
conditions
required
Conditions
Array<object>
TargetingAudienceCondition
object
FieldDescription
key
required
Key
string
operator
required
TargetingOperator

How a condition tests its value; any_of and none_of take a list, during and not_during a range, has_any_value and is_undefined no value.

string
Allowed values: is is_not less_than greater_than starts_with does_not_start_with ends_with does_not_end_with contains does_not_contain matches does_not_match has_any_value is_undefined matches_url does_not_match_url matches_ip does_not_match_ip any_of none_of during not_during
value
Value
nullable
subject
Subject
string
nullable
start
object
FieldDescription
mode
required
TargetingStartMode

Immediate: on page load; programmatically: only when the site’s code shows it; triggers: when one of triggers fires.

string
Allowed values: immediate programmatically triggers
triggers
required
Triggers
Array<object>
TargetingTrigger
object
FieldDescription
type
required
TargetingTriggerType

What fires a show or a hide; a *_seconds or *_percent trigger carries its threshold in value.

string
Allowed values: exit_intent scroll_percent time_on_page_seconds time_on_site_seconds inactivity_seconds add_to_cart remove_from_cart automatic display_time_seconds
value
Allowed types:
integernumber
hide
object
FieldDescription
triggers
required
Triggers
Array<object>
TargetingTrigger
object
FieldDescription
type
required
TargetingTriggerType

What fires a show or a hide; a *_seconds or *_percent trigger carries its threshold in value.

string
Allowed values: exit_intent scroll_percent time_on_page_seconds time_on_site_seconds inactivity_seconds add_to_cart remove_from_cart automatic display_time_seconds
value
Allowed types:
integernumber
stop
object
FieldDescription
rules
required
Rules
Array<object>
TargetingStopRule
object
FieldDescription
event
required
TargetingStopEvent

The visitor’s event after which the widget stops showing; close and show are named for their event. action: after the visitor submits it or clicks its button. hide: after a hide trigger hides it. show_count: after count shows.

string
Allowed values: action close hide show show_count
mode
string
Allowed values: forever duration
duration_seconds
Duration Seconds
number
nullable
count
Count
integer
nullable
schedule
object
FieldDescription
match
required
TargetingMatch

All: every item must hold; any: one is enough.

string
Allowed values: all any
segments
required
Segments
Array<object>
TargetingScheduleSegment
object
FieldDescription
match
required
TargetingMatch

All: every item must hold; any: one is enough.

string
Allowed values: all any
conditions
required
Conditions
Array<object>
TargetingScheduleCondition
object
FieldDescription
key
required
TargetingScheduleKey

Date: a range of days; time: a range of hours in a time zone; weekday: days of the week, 0 is Sunday.

string
Allowed values: date time weekday
operator
required
TargetingOperator

How a condition tests its value; any_of and none_of take a list, during and not_during a range, has_any_value and is_undefined no value.

string
Allowed values: is is_not less_than greater_than starts_with does_not_start_with ends_with does_not_end_with contains does_not_contain matches does_not_match has_any_value is_undefined matches_url does_not_match_url matches_ip does_not_match_ip any_of none_of during not_during
value
required
Any of:
TargetingTimeRange
object
FieldDescription
from
required
From
string
to
required
To
string
timezone
required
Timezone
string
draft
Draft

Your draft of this widget while it has unsaved changes; null when it has none

object
FieldDescription
state
required
DraftStateName

New: started with create_widget_draft and not saved yet; the widget exists only in this draft. draft: your unsaved changes over the saved widget. synced: the draft matches the saved widget.

string
Allowed values: new draft synced
revision
Revision

The draft’s revision: 1 when it started, one more per change; null when you have no draft of this widget

integer
nullable
saved_changed
required
Saved Changed

True: the widget was saved after your draft started, and saving would replace that save

boolean
saved_by
Saved By

Who made that save, when saved_changed; e-mail or name

string
nullable
saved_at
Saved At

When they saved, when saved_changed

string format: date-time
nullable
started_at
Started At

When this draft started; a draft that started before this conversation is unfinished work, maybe yours

string format: date-time
nullable
updated_at
Updated At

Last change to the draft

string format: date-time
nullable
preview_url
Preview Url

One permanent page per widget: your draft while it has unsaved changes, the saved widget otherwise, refreshed as you edit; null where live previews are not set up

string
nullable
warnings
required
Warnings

Informational notes about the widget itself; wording is not stable, do not parse

Array<string>
created_at
Created At
string format: date-time
nullable
updated_at
Updated At

Last change of the widget itself; a move to another folder does not change it

string format: date-time
nullable
edited_at
Edited At

Last change made in the editor

string format: date-time
nullable
truncated
Truncated

Parts shortened in the list, as paths; the card has them whole. Empty when nothing was cut

Array<string>
default:
changed
required
Changed

False when the widget already was in the requested state

boolean

Example

{
"widget": {
"layout": "modal",
"targeting": {
"audience": {
"match": "all",
"segments": [
{
"match": "all",
"conditions": [
{
"operator": "is"
}
]
}
]
},
"start": {
"mode": "immediate",
"triggers": [
{
"type": "exit_intent"
}
]
},
"hide": {
"triggers": [
{
"type": "exit_intent"
}
]
},
"stop": {
"rules": [
{
"event": "action",
"mode": "forever"
}
]
},
"schedule": {
"match": "all",
"segments": [
{
"match": "all",
"conditions": [
{
"key": "date",
"operator": "is"
}
]
}
]
}
},
"draft": {
"state": "new"
},
"truncated": []
}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Unsupported GSC-Version

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Missing or invalid API key or access token

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

WWW-Authenticate
string

Authentication scheme: Bearer

feature_unavailable: the site’s plan does not include A/B tests

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

widget_not_found: the site has no such widget, or it was deleted

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Validation failed

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Rate limited

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Retry-After
integer

Seconds until the bucket refills

Temporarily unavailable; retry later

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds