For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
GithubSign up
DocsCouriersShippersForwardersTrackersAppAPI ReferenceSDKsFAQ
DocsCouriersShippersForwardersTrackersAppAPI ReferenceSDKsFAQ
  • API Reference
        • GETGet
        • POSTCreate
        • PATCHUpdate preferences
LogoLogo
GithubSign up
API ReferenceNotificationsUser Preferences

Create

POST
/notifications/user_preferences/create/v1
POST
/notifications/user_preferences/create/v1
1import { ChrtClient } from "@chrt-inc/typescript-sdk";
2
3async function main() {
4 const client = new ChrtClient({
5 token: "YOUR_TOKEN_HERE",
6 });
7 await client.notifications.userPreferences.createV1();
8}
9main();
200Successful
1{
2 "schema_version": 1,
3 "user_id": "user_7890abcd",
4 "created_at_timestamp": "2024-01-15T09:30:00Z",
5 "last_edited_at_timestamp": "2024-01-15T09:30:00Z",
6 "_id": "507f1f77bcf86cd799439011",
7 "email_events": [
8 "shipping.order.staged"
9 ],
10 "push_events": [
11 "shipping.order.staged"
12 ],
13 "sms_events": [
14 "shipping.order.staged"
15 ]
16}

Creates a new notification preferences record for the caller. Returns existing preferences if already created. | () -> (NotificationUserPreferences1)

Was this page helpful?
Previous

Update preferences

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Response

Successful Response
schema_versioninteger
user_idstring

Must be a string starting with user_

created_at_timestampdatetime
last_edited_at_timestampdatetime
_idstring
email_eventslist of enums
push_eventslist of enums
sms_eventslist of enums