User Preferencesv1
Create a preference for this user
Authorization
BearerAuth AuthorizationBearer <token>
JWT Bearer token authentication
In: header
Path Parameters
user_id*string
Owner of the preferences. This is the record the preferences belong to, NOT the caller — an actor with the right record permission reads and writes another user's preferences through the same route.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/user-preferences/497f6eca-6276-4993-bfeb-53cbbbba6f08/preferences" \ -H "Content-Type: application/json" \ -d '{ "title": "Account Notifications", "type": "multi_select" }'{
"id": "9c8e1234-5f89-47d7-bb10-8b1d1a8adfd7",
"group_id": "1d4c2f4e-9b8b-4c36-b22c-dfe93c51dca5",
"parent_option_id": null,
"title": "Account Notifications",
"type": "multi_select",
"description": "Select which account notifications to receive",
"active": true,
"enabled": true,
"options": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"preference_id": "9c8e1234-5f89-47d7-bb10-8b1d1a8adfd7",
"title": "Account Created",
"value": "account_created",
"active": true,
"enabled": true,
"child_preferences": [
{
"id": "9c8e1234-5f89-47d7-bb10-8b1d1a8adfd7",
"group_id": "1d4c2f4e-9b8b-4c36-b22c-dfe93c51dca5",
"parent_option_id": null,
"title": "Account Notifications",
"type": "multi_select",
"description": "Select which account notifications to receive",
"active": true,
"enabled": true,
"options": [],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}Empty
Empty
Empty