Update Preference
Sets whether a contact is subscribed to one notification type, creating the preference if it does not exist yet and updating it otherwise. Public and unauthenticated so it can back an emailed preference-centre link: pass the encrypted contact ID from that link together with encrypted: true rather than exposing raw distinct IDs in a URL. Returns 404 if the contact does not exist.
Authorization
Authorization In: header
Path Parameters
ID of the project that owns the contact.
ID of the notification type this preference applies to.
Request Body
application/json
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
curl -X POST "https://www.saasco.com/api/v2/projects/string/crm/contact-notification-preferences/string" \ -H "Content-Type: application/json" \ -d '{ "contactDistinctId": "string", "subscribed": true }'{
"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": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}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.
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.