Saasco logoSaasco logo
Saasco logoSaasco logo

Introduction

Quick StartWhat is Saasco?

Analytics

CRM

postList ContactsgetGet ContactgetGet By EmailgetList RelatedpostUpsert ContactpatchUpdate ContactdelDelete ContactpostGet PropertiespostCount SubscribedpostMigrate Distinct Id

Email Marketing

Knowledge

Support

Projects

Contacts

Count Subscribed

Counts how many contacts match an audience and are still subscribed: the number that would actually receive a campaign, which is lower than a plain contact count once unsubscribes are excluded. Use it to size an audience before sending. Returns only the count, so it is much cheaper than paging List Contacts.

POST
/projects/{projectId}/crm/count-subscribed-contacts

Authorization

Authorization
AuthorizationBearer <token>

In: header

Path Parameters

projectIdrequiredstring

ID of the project to count contacts in.

Request Body

application/json

contactListIdstring | null
contactsFilterGroupobject | null

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://www.saasco.com/api/v2/projects/string/crm/count-subscribed-contacts" \  -H "Content-Type: application/json" \  -d '{}'
{
  "count": 0
}
{
  "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": []
}

Get Properties

Returns just a contact's property bag, without the surrounding contact record. Naming specific `attributes` keeps the response small when you only need a few values from a contact with many properties.

Migrate Distinct Id

Re-keys a contact from one distinct ID to another, carrying their properties and history across. The usual case is promoting a soft identity to a real one: someone first seen by email gets a `soft_`-prefixed ID, and when they later sign in you migrate that to your own user ID so the two do not persist as separate contacts. Rewriting the analytics history is expensive, so this is not a bulk operation.