On this page

    1. Home
    2. API
    3. API Reference
    4. Set Preferences

    Set Preferences

    This document describes the set-preferences endpoint, which is used to set account preferences for the authenticated user.


    POST /preferences/set-preferences

    Set account preferences.

    Authorizations

    This endpoint requires a BringYour JWT.

    Headers:

    {
      "Host": "api.bringyour.com",
      "Authorization": "Bearer YOUR_JWT_TOKEN",
      "Content-Type": "application/json",
      "Accept": "*/*"
    }

    Body:

    The request body should be a JSON object containing the preferences to be set.

    {
      "product_updates": "boolean"
    }
    FieldTypeDescription
    product_updatesbooleanSet to true if the user wishes to receive product updates; false otherwise.

    Response

    200 Success

    Status: 200 OK

    Content-Type: application/json

    A successful response indicates that the preferences have been successfully updated.

    {}
    FieldTypeDescription

    Example

    HTTP Request

    POST /preferences/set-preferences HTTP/1.1
    Host: api.bringyour.com
    Authorization: Bearer YOUR_JWT_TOKEN
    Content-Type: application/json
    Accept: */*
    Content-Length: 24
     
    {
      "product_updates": true
    }

    Successful HTTP Response

    {}


    Powered by Sudoc v2.5.0
    Hide table of contents