PATCH
/v1/me/notifications/settingsOnly 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}}'
| Field | Type | Description |
|---|---|---|
kinds | object | A 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
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_kind | A kind this account does not receive |
| 403 | insufficient_scope | This device does not hold notifications:write |
| 422 | validation_failed | kinds is missing, or a value is not a boolean |