API reference · Identity & onboarding
Preferences
- GET
/accountholder/{type}/{value}/preferenceFetch an account holder's preferences - POST
/accountholder/{type}/{value}/preferenceSet an account holder's preferences - PUT
/accountholder/{type}/{value}/preferenceUpdate an account holder's preferences
GET Fetch an account holder's preferences
GET /accountholder/{type}/{value}/preference
Headers
| Name | Notes |
|---|---|
Authorization | Bearer token |
X-Tenant | Your tenant |
X-Environment | test or live |
Path parameters
| Name |
|---|
type |
value |
Example
Response: GenericResponsePreferenceResponse
curl -X GET "https://api.bridgemoni.com/accountholder/value/value/preference" \
-H "Authorization: Bearer $BRIDGEMONI_TOKEN" \
-H "X-Tenant: $BRIDGEMONI_TENANT" \
-H "X-Environment: $BRIDGEMONI_ENV" {
"data": {
"reference": "b3f1c2d4-5e6a-4b7c-8d9e-0f1a2b3c4d5e",
"languageCode": "yo",
"fallbackLanguageCode": "en",
"largeText": "true",
"screenReader": "true",
"simplifiedFlow": "true",
"lowBandwidthMode": "true",
"shareOptOut": "true",
"defaultOptionalFields": "ASK",
"timezone": "Africa/Lagos",
"channels": [
{
"reference": "b3f1c2d4-5e6a-4b7c-8d9e-0f1a2b3c4d5e",
"channelCode": "SMS",
"channelPriority": 1,
"purpose": "MARKETING",
"optedIn": "true"
}
]
},
"description": "Preferences fetched successfully"
} Responses
| Status | When |
|---|---|
200 | Preferences fetched successfully |
404 | No preferences have been set |
POST Set an account holder's preferences
POST /accountholder/{type}/{value}/preference
Language, accessibility, bandwidth and channel preferences. A NOTICE or SECURITY channel cannot be opted out of - a notice is not a communication the person chose to receive.
Headers
| Name | Notes |
|---|---|
Authorization | Bearer token |
X-Tenant | Your tenant |
X-Environment | test or live |
Content-Type | application/json |
Path parameters
| Name |
|---|
type |
value |
Example
Request body: PreferenceRequest · Response: GenericResponsePreferenceResponse
curl -X POST "https://api.bridgemoni.com/accountholder/value/value/preference" \
-H "Authorization: Bearer $BRIDGEMONI_TOKEN" \
-H "X-Tenant: $BRIDGEMONI_TENANT" \
-H "X-Environment: $BRIDGEMONI_ENV" \
-H "Content-Type: application/json" \
-d '{
"languageCode": "yo",
"fallbackLanguageCode": "en",
"largeText": "true",
"screenReader": "true",
"simplifiedFlow": "true",
"lowBandwidthMode": "true",
"shareOptOut": "true",
"defaultOptionalFields": "ASK",
"timezone": "Africa/Lagos",
"channels": [
{
"channelCode": "SMS",
"channelPriority": 1,
"purpose": "MARKETING",
"optedIn": "true"
}
]
}' {
"languageCode": "yo",
"fallbackLanguageCode": "en",
"largeText": "true",
"screenReader": "true",
"simplifiedFlow": "true",
"lowBandwidthMode": "true",
"shareOptOut": "true",
"defaultOptionalFields": "ASK",
"timezone": "Africa/Lagos",
"channels": [
{
"channelCode": "SMS",
"channelPriority": 1,
"purpose": "MARKETING",
"optedIn": "true"
}
]
} {
"data": {
"reference": "b3f1c2d4-5e6a-4b7c-8d9e-0f1a2b3c4d5e",
"languageCode": "yo",
"fallbackLanguageCode": "en",
"largeText": "true",
"screenReader": "true",
"simplifiedFlow": "true",
"lowBandwidthMode": "true",
"shareOptOut": "true",
"defaultOptionalFields": "ASK",
"timezone": "Africa/Lagos",
"channels": [
{
"reference": "b3f1c2d4-5e6a-4b7c-8d9e-0f1a2b3c4d5e",
"channelCode": "SMS",
"channelPriority": 1,
"purpose": "MARKETING",
"optedIn": "true"
}
]
},
"description": "Preferences saved successfully"
} Responses
| Status | When |
|---|---|
200 | Preferences saved successfully |
PUT Update an account holder's preferences
PUT /accountholder/{type}/{value}/preference
Headers
| Name | Notes |
|---|---|
Authorization | Bearer token |
X-Tenant | Your tenant |
X-Environment | test or live |
Content-Type | application/json |
Path parameters
| Name |
|---|
type |
value |
Example
Request body: PreferenceRequest · Response: GenericResponsePreferenceResponse
curl -X PUT "https://api.bridgemoni.com/accountholder/value/value/preference" \
-H "Authorization: Bearer $BRIDGEMONI_TOKEN" \
-H "X-Tenant: $BRIDGEMONI_TENANT" \
-H "X-Environment: $BRIDGEMONI_ENV" \
-H "Content-Type: application/json" \
-d '{
"languageCode": "yo",
"fallbackLanguageCode": "en",
"largeText": "true",
"screenReader": "true",
"simplifiedFlow": "true",
"lowBandwidthMode": "true",
"shareOptOut": "true",
"defaultOptionalFields": "ASK",
"timezone": "Africa/Lagos",
"channels": [
{
"channelCode": "SMS",
"channelPriority": 1,
"purpose": "MARKETING",
"optedIn": "true"
}
]
}' {
"languageCode": "yo",
"fallbackLanguageCode": "en",
"largeText": "true",
"screenReader": "true",
"simplifiedFlow": "true",
"lowBandwidthMode": "true",
"shareOptOut": "true",
"defaultOptionalFields": "ASK",
"timezone": "Africa/Lagos",
"channels": [
{
"channelCode": "SMS",
"channelPriority": 1,
"purpose": "MARKETING",
"optedIn": "true"
}
]
} {
"data": {
"reference": "b3f1c2d4-5e6a-4b7c-8d9e-0f1a2b3c4d5e",
"languageCode": "yo",
"fallbackLanguageCode": "en",
"largeText": "true",
"screenReader": "true",
"simplifiedFlow": "true",
"lowBandwidthMode": "true",
"shareOptOut": "true",
"defaultOptionalFields": "ASK",
"timezone": "Africa/Lagos",
"channels": [
{
"reference": "b3f1c2d4-5e6a-4b7c-8d9e-0f1a2b3c4d5e",
"channelCode": "SMS",
"channelPriority": 1,
"purpose": "MARKETING",
"optedIn": "true"
}
]
},
"description": "Preferences updated successfully"
} Responses
| Status | When |
|---|---|
200 | Preferences updated successfully |
Generated from the OpenAPI document. Branch on the HTTP status: there is no machine-readable error code on the wire. Errors