API reference · Identity & onboarding

Preferences

GET Fetch an account holder's preferences

GET /accountholder/{type}/{value}/preference

Headers

NameNotes
AuthorizationBearer token
X-TenantYour tenant
X-Environmenttest 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"

Responses

StatusWhen
200Preferences fetched successfully
404No 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

NameNotes
AuthorizationBearer token
X-TenantYour tenant
X-Environmenttest or live
Content-Typeapplication/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"
    }
  ]
}'

Responses

StatusWhen
200Preferences saved successfully

PUT Update an account holder's preferences

PUT /accountholder/{type}/{value}/preference

Headers

NameNotes
AuthorizationBearer token
X-TenantYour tenant
X-Environmenttest or live
Content-Typeapplication/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"
    }
  ]
}'

Responses

StatusWhen
200Preferences updated successfully

Generated from the OpenAPI document. Branch on the HTTP status: there is no machine-readable error code on the wire. Errors