Skip to content

Create communication preferences

POST
/users/{uid}/communication-preferences
curl --request POST \
--url https://apisandbox.puurk.com/users/example/communication-preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "activity": [ { "oid": "example", "email": [ "offer_accepted" ], "sms": [ "offer_accepted" ], "push": [ "offer_accepted" ] } ] }'

Create communication preferences for a user

uid
required
string

User ID

Communication preferences

Media typeapplication/json
object
activity

Activity notification preferences

Array<object>
object
oid

Organization ID

string
email

Activity types for email notifications

Array<string>
Allowed values: offer_accepted offer_declined offer_paid_in_full offer_shared offer_viewed contract_signed contract_fulfilled contract_cancelled payment_succeeded payment_declined payment_refunded payment_returned payment_reminder payout_initiated
sms

Activity types for SMS notifications

Array<string>
Allowed values: offer_accepted offer_declined offer_paid_in_full offer_shared offer_viewed contract_signed contract_fulfilled contract_cancelled payment_succeeded payment_declined payment_refunded payment_returned payment_reminder payout_initiated
push

Activity types for push notifications

Array<string>
Allowed values: offer_accepted offer_declined offer_paid_in_full offer_shared offer_viewed contract_signed contract_fulfilled contract_cancelled payment_succeeded payment_declined payment_refunded payment_returned payment_reminder payout_initiated

Preferences created

Media typeapplication/json
object
activity

Activity notification preferences

Array<object>
object
oid

Organization ID

string
email

Activity types for email notifications

Array<string>
Allowed values: offer_accepted offer_declined offer_paid_in_full offer_shared offer_viewed contract_signed contract_fulfilled contract_cancelled payment_succeeded payment_declined payment_refunded payment_returned payment_reminder payout_initiated
sms

Activity types for SMS notifications

Array<string>
Allowed values: offer_accepted offer_declined offer_paid_in_full offer_shared offer_viewed contract_signed contract_fulfilled contract_cancelled payment_succeeded payment_declined payment_refunded payment_returned payment_reminder payout_initiated
push

Activity types for push notifications

Array<string>
Allowed values: offer_accepted offer_declined offer_paid_in_full offer_shared offer_viewed contract_signed contract_fulfilled contract_cancelled payment_succeeded payment_declined payment_refunded payment_returned payment_reminder payout_initiated
Example
{
"activity": [
{
"email": [
"offer_accepted"
],
"sms": [
"offer_accepted"
],
"push": [
"offer_accepted"
]
}
]
}

Invalid input

Unauthorized