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.
Authorization
Authorization In: header
Path Parameters
ID of the project that owns the contact.
Query Parameters
Distinct ID of the contact whose preferences to list. Pass the encrypted form and set encrypted when calling from a public unsubscribe page.
Only return the preference for this notification type.
Number of preferences to skip before collecting results.
Maximum number of preferences to return.
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.
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.