Bulk set preferences
Changed onBulk sets the preferences for up to 1,000 users at a time. The preference set :id can be either default or a tenant.id. Learn more about per-tenant preferences. Note that this is a destructive operation and will replace any existing users' preferences with the preferences sent.
Request
- Base URL: https://api.knock.app
- URL: https://api.knock.app/v1/users/bulk/preferences
- Auth: HTTP bearer
Request body
Example request
{
"preferences": {
"categories": {
"marketing": false,
"transactional": {
"channel_types": {
"email": false
}
}
},
"channel_types": {
"email": true
},
"channels": {
"2f641633-95d3-4555-9222-9f1eb7888a80": {
"conditions": [
{
"argument": "US",
"operator": "equal_to",
"variable": "recipient.country_code"
}
]
},
"aef6e715-df82-4ab6-b61e-b743e249f7b6": true
},
"commercial_subscribed": true,
"id": "default",
"workflows": {
"dinosaurs-loose": {
"channel_types": {
"email": false
}
}
}
},
"user_ids": [
"user_1",
"user_2"
]
}Response
OK
Example response
{
"__typename": "BulkOperation",
"completed_at": null,
"error_count": 0,
"error_items": [],
"estimated_total_rows": 1000,
"failed_at": null,
"id": "123e4567-e89b-12d3-a456-426614174000",
"inserted_at": "2024-05-22T12:00:00Z",
"name": "Bulk operation name",
"processed_rows": 0,
"progress_path": "https://api.switchboard.com/v1/bulk_operations/123e4567-e89b-12d3-a456-426614174000",
"started_at": null,
"status": "processing",
"success_count": 0,
"updated_at": "2024-05-22T12:00:00Z"
}Changes
- breaking
the request property
/became not nullable - breaking
the
/request property type changed frombooleanto no type - info
added
subschema #1subschema #3to the/request propertyanyOflist
- breaking
- warning
removed the request property
/ - info
added the new optional request property
/ - info
added the new
not_contains_allenum value to the request property/////////// - info
added the new
not_contains_allenum value to the request property/////////// - info
added the new
not_contains_allenum value to the request property/////////// - info
added the new
not_contains_allenum value to the request property/////////// - info
added the new
not_contains_allenum value to the request property/////////// - info
added the new
not_contains_allenum value to the request property/////////// - info
added the new
not_contains_allenum value to the request property/////////// - info
added the new
not_contains_allenum value to the request property/////// - info
added the new
not_contains_allenum value to the request property/////// - info
added the new
not_contains_allenum value to the request property/////// - info
added the new
not_contains_allenum value to the request property/////// - info
added the new
not_contains_allenum value to the request property/////// - info
added the new
not_contains_allenum value to the request property/////// - info
added the new
not_contains_allenum value to the request property/////// - info
added the new
not_contains_allenum value to the request property/////// - info
added the new
not_contains_allenum value to the request property/////////// - info
added the new
not_contains_allenum value to the request property/////////// - info
added the new
not_contains_allenum value to the request property/////////// - info
added the new
not_contains_allenum value to the request property/////////// - info
added the new
not_contains_allenum value to the request property/////////// - info
added the new
not_contains_allenum value to the request property/////////// - info
added the new
not_contains_allenum value to the request property/////////// - info
added the new
not_contains_allenum value to the request property///////
- warning