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

Upsert Social Proof Template

Creates a notification template, or updates one when template.id is set. Omitting position appends the template after the current last one.

POST
/projects/{projectId}/social-proof/templates

Authorization

Authorization
AuthorizationBearer <token>

In: header

Path Parameters

projectIdrequiredstring

ID of the project that owns the template.

Request Body

application/json

templaterequiredobject

Template to create, or to replace when id is set.

namerequiredstring

Dashboard name. Not shown to visitors.

actionstring | null

Analytics event action this template matches, for example Signed Up. Null makes it a routing-only box that incoming events never match directly.

templaterequiredstring

Message with {variable} placeholders, for example Someone from {location} just signed up {timeAgo}.

imageUrlstring | string

Image beside the message: an https URL, or a {property} token resolved per event.

fallbackImageUrlstring

Static https image used when the primary image fails or a {property} image never resolves.

Format: uri
linkUrlstring

Fixed click URL. When linkToEvent is on and this is set, it wins over the event href.

Format: uri
linkToEventboolean

When true, a click opens linkUrl or the event href, with Saasco UTM parameters.

Default: false
enabledboolean

When false, this template is not served to visitors. Defaults to true.

Default: true
eventRulesarray<object>

If/then rules applied when the feed is built. They can block an event or rewrite a field.

Default: []
fieldrequiredstring
operatorrequiredstring
Value in: "IS_SET" | "IS_NOT_SET" | "EQUALS" | "NOT_EQUALS" | "CONTAINS" | "NOT_CONTAINS" | "GREATER_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN" | "LESS_THAN_OR_EQUAL"
outcomerequiredstring
Value in: "block" | "set_value" | "route"
replacementstring
targetTemplateIdstring
valuestring
idstring

ID of an existing template to update. Omit to create one.

positioninteger

Order among this project's templates. Omit to append after the current last template.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://www.saasco.com/api/v2/projects/string/social-proof/templates" \  -H "Content-Type: application/json" \  -d '{    "template": {      "name": "string",      "template": "string"    }  }'
{
  "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": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Update Social Proof Widget Enabled

Turns the visitor-facing Social Proof widget on or off. The analytics SDK probes this on every install and only injects the loader when enabled.

Delete Social Proof Template

Deletes a notification template. Events that matched it stop rendering until another template covers that action.