Preferences API

PUT - /api/v1/preferences

PUT /api/v1/preferences

Parameters

Name Description
email_student_joins_school email on new sign ups
email_student_purchases_course email on purchases
email_student_enrolls_in_free_course email on free enrollments
email_subscription_billing_errors email on billing errors
comment_thread_notifications_enabled email on new comment
email_subscription_canceled_manually email on cancellations

Request

Headers

Accept: application/json
X-Api-Token: F762y-tjc-BNK8PDhH9JewxfhfmxYdzGaA
X-Api-Email: user-389@example.com

Route

PUT /api/v1/preferences

Body

{"email_student_joins_school":true,"email_student_purchases_course":true,"email_student_enrolls_in_free_course":true,"email_subscription_billing_errors":true,"comment_thread_notifications_enabled":true,"email_subscription_canceled_manually":true}

cURL

curl "http://localhost:3000/api/v1/preferences" -d '{"email_student_joins_school":true,"email_student_purchases_course":true,"email_student_enrolls_in_free_course":true,"email_subscription_billing_errors":true,"comment_thread_notifications_enabled":true,"email_subscription_canceled_manually":true}' -X PUT \
	-H "Accept: application/json" \
	-H "X-Api-Token: F762y-tjc-BNK8PDhH9JewxfhfmxYdzGaA" \
	-H "X-Api-Email: user-389@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Status

204 No Content