Widgets

List widgets

Widgets of the site in ascending order of id; order=newest gives the latest first. Each one comes with its name, its first headline, layout, whether it is on (is_active), its folder, what it can do (actions) and has (features), your draft of it (draft) and where and when it shows (targeting). Every feature is also a filter of the same name; filters combine: every one given must match.

Nested lists keep their first 5 entries and texts their first 200 characters (links and targeting stay whole); truncated names what was cut, Get a widget has it whole.

total counts every widget matching the filters, so limit=1 answers how many there are. fields keeps only the named fields of each widget: fields=id,name,is_active lists many widgets cheaply.

A page holds up to limit widgets; while next_cursor is set, pass it as cursor for the next page. The content of one widget and the emails its responses go to are in Get a widget.

Deleted widgets are listed only with is_deleted=true, for Restore widgets.

get/v1/sites/{site_id}/widgets

Request

  • Base URL
    https://api.getsitecontrol.com
  • Auth
    HTTP bearer

Path parameters

site_idinteger required

Query parameters

is_activeboolean

true: only widgets that are on; false: only off

layout'modal' | 'bar' | 'panel' | 'slide_in' | 'sidebar' | 'fullscreen' | 'inline'

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. "Pop-up" is not a layout: users call any widget a pop-up.

Only widgets of this layout; use it only when the user names one

searchstring

Words of the name in order (case, spacing and punctuation are ignored), the id, or words of the widget's own text

updated_sincestring date-time

Changed at or after this moment; without an offset, taken as UTC; a plain date means its start. A move to another folder is not a change; a deleted widget is listed only with is_deleted=true

folder_idinteger

Only the items of this folder, an id from list_folders; 0 is General

is_deletedboolean

true: only deleted widgets, the trash, for Restore widgets; false: live widgets

cursorstring

next_cursor of the previous page, sent with the same order; omit for the first

limitinteger

Items per page

fieldsstring

Comma-separated fields to keep in each item, for example id,name; each item then carries only those fields and id. Omit for every field

order'oldest' | 'newest'

Order of a list. oldest: the oldest item first; newest: the newest item first, for the latest items without paging through the history.

Order of the items: oldest first (default) or newest first; asc and desc mean the same

collects_emailboolean

Has an e-mail field. true: only such widgets; false: only the others

collects_phoneboolean

Has a phone field. true: only such widgets; false: only the others

has_couponboolean

A button copies or applies a discount code. true: only such widgets; false: only the others

has_gameboolean

Has a game: a wheel, a scratch card or a reveal. true: only such widgets; false: only the others

has_countdownboolean

Has a countdown timer. true: only such widgets; false: only the others

has_teaserboolean

Has a teaser, the small tab shown before or after it. true: only such widgets; false: only the others

captchaboolean

reCAPTCHA checks its form submits. true: only such widgets; false: only the others

double_opt_inboolean

A new subscriber confirms the address by e-mail first. true: only such widgets; false: only the others

email_quality_filterboolean

Submits with disposable or untrusted e-mail addresses are rejected. true: only such widgets; false: only the others

notificationsboolean

Responses are e-mailed: switched on, with a recipient. true: only such widgets; false: only the others

in_ab_testboolean

In an A/B test, named in ab_test_group. true: only such widgets; false: only the others

has_integrationboolean

An integration, webhook or Zapier switched on sends its responses. true: only such widgets; false: only the others

has_draftboolean

You have a draft of it with unsaved changes, see draft. true: only such widgets; false: only the others

Response

Successful Response

next_cursorstring nullable
totalinteger required

Widgets matching the filters, the same on every page

Changes

No recorded changes to this operation across all 1 revision of this API.