Users
SmsPreferences

Update SMS preferences

Changed on

Turns SMS to the current user's account on or off — the in-app equivalent of replying STOP to a message.

Applies to every number on the account (the canonical mobile and any contact_info.mobile), and is stored against the number rather than the account, so it also silences messages sent to that number in another context.

Opting out silences notifications and any marketing message. It does not silence one-time verification codes: those are requested by the user in the moment, and blocking them would lock the account out of phone sign-in.

Acts on the authenticated user only — there is no id in the path. Call this only when the person explicitly asks to turn SMS on or off.

patch/users/sms-preferences

Request

  • Base URL
    https://api.purplegrain.com/api/v1
  • URL
    https://api.purplegrain.com/api/v1/users/sms-preferences
  • Auth
    HTTP bearer

Request body

sms_opted_outboolean required

true silences SMS to this account, false re-enables it. Required — an absent or non-boolean value is rejected rather than treated as "no change".

Response

The updated user, with the new sms_opted_out value.

Example response

{
  "data": {
    "type": "user"
  }
}

Changes

    • warning

      removed the optional property from the response with the status (media type: application/json)

    • warning

      removed the optional property from the response with the status (media type: application/vnd.api+json)

    • warning

      removed the optional property from the response with the status (media type: application/json)

    • warning

      removed the optional property from the response with the status (media type: application/vnd.api+json)

    • warning

      removed the optional property // from the response with the status (media type: application/json)

    • warning

      removed the optional property // from the response with the status (media type: application/vnd.api+json)

    • warning

      removed the optional property // from the response with the status (media type: application/json)

    • warning

      removed the optional property // from the response with the status (media type: application/vnd.api+json)

    • warning

      removed the optional property from the response with the status (media type: application/json)

    • warning

      removed the optional property from the response with the status (media type: application/vnd.api+json)

    • warning

      removed the optional property from the response with the status (media type: application/json)

    • warning

      removed the optional property from the response with the status (media type: application/vnd.api+json)

    • info

      added the optional property // to the response with the status (media type: application/json)

    • info

      added the optional property // to the response with the status (media type: application/vnd.api+json)

    • info

      added the optional property // to the response with the status (media type: application/json)

    • info

      added the optional property // to the response with the status (media type: application/vnd.api+json)

    • info

      added the optional property /// to the response with the status (media type: application/json)

    • info

      added the optional property /// to the response with the status (media type: application/vnd.api+json)

    • info

      added the optional property /// to the response with the status (media type: application/json)

    • info

      added the optional property /// to the response with the status (media type: application/vnd.api+json)

    • info

      added the optional property /// to the response with the status (media type: application/json)

    • info

      added the optional property /// to the response with the status (media type: application/vnd.api+json)

    • info

      added the optional property /// to the response with the status (media type: application/json)

    • info

      added the optional property /// to the response with the status (media type: application/vnd.api+json)

    • info

      endpoint added