Saasco logoSaasco logo
Saasco logoSaasco logo

Introduction

OverviewGetting startedWhat is Saasco?

SDK

Quick startTrackingIdentifyConfigurationWidgetsProperties

MCP

Quick startHow it worksAuthorizationTool reference

REST API

Quick start
Set up CRMLoad an audience
getList TypespostCreate TypeputUpdate TypedelDelete TypegetList PreferencesgetSubscribe Status
CRMNotifications

List Preferences

Lists one contact's per-type subscription preferences, for rendering a preference centre. Only types the contact has an explicit preference for are returned. Pair this with List Types to show categories they have never chosen. Public and unauthenticated; use encrypted when the contact ID comes from an emailed link. Returns 404 if the contact does not exist.

GET
/projects/{projectId}/crm/contact-notification-preferences

Authorization

Authorization
AuthorizationBearer <token>

In: header

Path Parameters

projectIdrequiredstring

ID of the project that owns the contact.

Query Parameters

contactDistinctIdrequiredstring

Distinct ID of the contact whose preferences to list. Pass the encrypted form and set encrypted when calling from a public unsubscribe page.

notificationTypeIdstring

Only return the preference for this notification type.

skipnumber

Number of preferences to skip before collecting results.

Default: 0
takenumber

Maximum number of preferences to return.

Default: 24
encryptedboolean

Set when contactDistinctId is the encrypted value from a preference-centre link, so the server decrypts it before the lookup.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://www.saasco.com/api/v2/projects/string/crm/contact-notification-preferences?contactDistinctId=string"
[
  {
    "id": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "projectId": "string",
    "contactDistinctId": "string",
    "notificationTypeId": "string",
    "subscribed": true
  }
]
{
  "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": []
}

Delete Type

Deletes a notification type along with every contact preference recorded against it. Contacts who had opted out of this category lose that record, so recreating the type later starts everyone from the default. Returns `false` instead of an error status if the delete fails. Cannot be undone.

Subscribe Status

Reports whether a contact is subscribed at the project level: the master switch that overrides every per-type preference. Public and unauthenticated so an unsubscribe page can show current state before the contact acts.