Saasco logoSaasco logo
Saasco logoSaasco logo

Introduction

OverviewGetting startedWhat is Saasco?

SDK

Quick startTrackingIdentifyConfigurationWidgetsProperties

MCP

Quick startHow it worksAuthorizationTool reference

REST API

Quick start
getGet Social Proof ConfigputUpdate Social Proof ConfiggetGet Social Proof Widget EnabledpatchUpdate Social Proof Widget EnabledpostUpsert Social Proof TemplatedelDelete Social Proof TemplategetGet Social Proof StatsgetGet Social Proof Stats Timeseries
Social Proof

Update Social Proof Config

Replaces the widget's enabled flag, feed window, theme, and display rules. Templates are saved separately.

PUT
/projects/{projectId}/social-proof

Authorization

Authorization
AuthorizationBearer <token>

In: header

Path Parameters

projectIdrequiredstring

ID of the project whose widget to update.

Request Body

application/json

configrequiredobject

Enabled flag, feed window, theme, and display rules.

enabledboolean

Whether the visitor-facing widget loads.

Default: false
themerequiredobject
desktopobject

Desktop look. Independent of mobile.

Default: {}
accentColorstring

Accent color for links and highlights. Any CSS color. Omit for the loader default.

backgroundColorstring

Notification background color. Any CSS color. Omit for the loader default.

cornerRadiusinteger

Corner radius of the notification, in pixels.

Default: 16
imagePaddinginteger

Padding around the notification image, in pixels.

Default: 0
linkColorstring

Link text color. Any CSS color. Omit to use the text color.

outlineColorstring

Outline color. Any CSS color. Omit for no border.

shadowboolean

Whether the notification casts a drop shadow.

Default: true
textColorstring

Notification text color. Any CSS color. Omit for the loader default.

hoverAnimationstring

Pointer-hover animation. Desktop only.

Default: "none"Value in: "none" | "shift-right" | "shift-up"
mobileobject

Mobile look. Independent of desktop, and it starts from the same defaults.

Default: {}
accentColorstring

Accent color for links and highlights. Any CSS color. Omit for the loader default.

backgroundColorstring

Notification background color. Any CSS color. Omit for the loader default.

cornerRadiusinteger

Corner radius of the notification, in pixels.

Default: 16
imagePaddinginteger

Padding around the notification image, in pixels.

Default: 0
linkColorstring

Link text color. Any CSS color. Omit to use the text color.

outlineColorstring

Outline color. Any CSS color. Omit for no border.

shadowboolean

Whether the notification casts a drop shadow.

Default: true
textColorstring

Notification text color. Any CSS color. Omit for the loader default.

positionstring

Corner the notification stack anchors to on desktop.

Default: "bottom-left"Value in: "bottom-left" | "bottom-center" | "bottom-right" | "top-left" | "top-center" | "top-right"
mobilePositionstring

Edge the notification stack anchors to on mobile. Centered, top or bottom.

Default: "bottom"Value in: "top" | "bottom"
showTimestampboolean

Whether the time-ago line renders.

Default: true
timestampMaxAgeHoursinteger

Hide the time-ago line on events older than this many hours.

Default: 4
displayrequiredobject
displayDurationSecondsinteger

Seconds each notification stays visible.

Default: 4
hideOnDesktopboolean

Skip the widget on desktop browsers.

Default: false
hideOnMobileboolean

Skip the widget on mobile browsers.

Default: false
initialDelaySecondsinteger

Seconds after page load before the first notification.

Default: 5
intervalSecondsinteger

Seconds between one notification hiding and the next showing.

Default: 15
maxPerPageinteger

Maximum notifications per page load.

Default: 5
maxPerSessioninteger

Maximum notifications per visitor session.

Default: 100
pageRulesarray<object>

Ordered page rules. Earlier rules win. Each rule decides whether notifications render on a matching page and how they behave.

Default: []
actionrequiredobject | object | object | object | object
conditionsrequiredarray<object | object | object | object | object | object>
idrequiredstring
namerequiredstring
maxEventAgeHoursinteger

How many hours of events the feed includes, from 1 hour to 30 days.

Default: 24

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://www.saasco.com/api/v2/projects/string/social-proof" \  -H "Content-Type: application/json" \  -d '{    "config": {      "theme": {},      "display": {}    }  }'
{
  "enabled": false,
  "theme": {
    "desktop": {
      "accentColor": "string",
      "backgroundColor": "string",
      "cornerRadius": 16,
      "imagePadding": 0,
      "linkColor": "string",
      "outlineColor": "string",
      "shadow": true,
      "textColor": "string"
    },
    "hoverAnimation": "none",
    "mobile": {
      "accentColor": "string",
      "backgroundColor": "string",
      "cornerRadius": 16,
      "imagePadding": 0,
      "linkColor": "string",
      "outlineColor": "string",
      "shadow": true,
      "textColor": "string"
    },
    "position": "bottom-left",
    "mobilePosition": "top",
    "showTimestamp": true,
    "timestampMaxAgeHours": 4
  },
  "display": {
    "displayDurationSeconds": 4,
    "hideOnDesktop": false,
    "hideOnMobile": false,
    "initialDelaySeconds": 5,
    "intervalSeconds": 15,
    "maxPerPage": 5,
    "maxPerSession": 100,
    "pageRules": []
  },
  "maxEventAgeHours": 24,
  "templates": [
    {
      "name": "string",
      "action": "string",
      "template": "string",
      "imageUrl": "http://example.com",
      "fallbackImageUrl": "http://example.com",
      "linkUrl": "http://example.com",
      "linkToEvent": false,
      "enabled": true,
      "position": 0,
      "eventRules": [],
      "id": "string"
    }
  ]
}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Get Social Proof Config

Reads the social proof widget: enabled flag, feed window, theme, display rules, and templates. Creates the config row on first read.

Get Social Proof Widget Enabled

Returns whether the visitor-facing Social Proof widget is enabled. The analytics SDK probes this on every install and only injects the loader when enabled.