Change notification settings

.md

Switch kinds of notice on or off.

Scopesnotifications:write
PATCH/v1/me/notifications/settings

Only the kinds you name change, so two devices switching different kinds at the same moment do not undo each other. The answer is the whole list, as reading the settings gives it.

A notice already on its way when its kind is switched off does not arrive: the switch is asked again just before each notice goes out.

Request

curl -X PATCH https://api.proppertrading.com/v1/me/notifications/settings \
  -H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
  -H "Content-Type: application/json" \
  -d '{"kinds": {"risk_flag_raised": false, "payout_requested": true}}'
FieldTypeDescription
kindsobjectA kind as key, true for on, false for off

Response

{
    "data": [
        { "object": "notification_setting", "kind": "payout_requested", "enabled": true },
        { "object": "notification_setting", "kind": "risk_flag_raised", "enabled": false }
    ],
    "meta": {
        "request_id": "req_01kz4bkr1aj1gv63d8fv3133ey",
        "has_more": false,
        "next_cursor": null
    }
}

Errors

StatusCodeMeaning
400invalid_kindA kind this account does not receive
403insufficient_scopeThis device does not hold notifications:write
422validation_failedkinds is missing, or a value is not a boolean