Audioburst Web API V2

3.8 Set User Preferences

Update the user preferences by changing the "Selected" field to "true" for each category within the JSON file that is received from Get User Preferences. Then post the updated JSON file

Try it

Request URL

Request parameters

string

Unique userId, see Register User API.

Request headers

(optional)
string
Media type of the body sent to the API.
string
Subscription key which provides access to this API. Found in your Profile.

Request body

{
    "id": "1c605d58-0e01-4403-a2b2-c2a8f889cded",
    "userId": "8605639a-1671-4dbd-84da-cbcd88f349a3",
    "location": null,
    "sourceType": "mix",
    "preferences": [
        {
            "name": "Trending and Popular",
            "source": "trending",
            "take": 6,
            "offer": 6,
            "keys": [
                {
                    "key": "Michael Deleo",
                    "segCategory": "NA",
                    "source": "trending",
                    "sourceId": 0,
                    "position": 1,
                    "selected": false
                },
                {
                    "key": "Chris Woodward",
                    "segCategory": "NA",
                    "source": "trending",
                    "sourceId": 0,
                    "position": 1,
                    "selected": false
                },
                {
                    "key": "Jim Boylan",
                    "segCategory": "NA",
                    "source": "trending",
                    "sourceId": 0,
                    "position": 2,
                    "selected": false
                },
                {
                    "key": "Green Party",
                    "segCategory": "NA",
                    "source": "trending",
                    "sourceId": 0,
                    "position": 2,
                    "selected": false
                },
                {
                    "key": "Willie Horton",
                    "segCategory": "NA",
                    "source": "trending",
                    "sourceId": 0,
                    "position": 3,
                    "selected": false
                },
                {
                    "key": "Harvey Weinstein",
                    "segCategory": "NA",
                    "source": "trending",
                    "sourceId": 0,
                    "position": 3,
                    "selected": false
                }
            ]
        },
        {
            "name": "News",
            "source": "combined",
            "take": 2,
            "offer": 6,
            "keys": [
                {
                    "key": "Burst of the Day",
                    "segCategory": "news.bod",
                    "source": "bod",
                    "sourceId": 0,
                    "position": 1,
                    "selected": false
                },
                {
                    "key": "National News",
                    "segCategory": "news.us",
                    "source": "playlist",
                    "sourceId": 4,
                    "position": 999,
                    "selected": false
                },
                {
                    "key": "Politics",
                    "segCategory": "news.us.politics",
                    "source": "playlist",
                    "sourceId": 4,
                    "position": 2,
                    "selected": false
                },
                {
                    "key": "World News",
                    "segCategory": "news.foreign",
                    "source": "playlist",
                    "sourceId": 6,
                    "position": 3,
                    "selected": false
                }
            ]
        },
        {
            "name": "Sports",
            "source": "combined",
            "take": 2,
            "offer": 13,
            "keys": [
                {
                    "key": "Sports News",
                    "segCategory": "news.sports",
                    "source": "playlist",
                    "sourceId": 10,
                    "position": 999,
                    "selected": false
                },
                {
                    "key": "NBA Basketball",
                    "segCategory": "sports.nba",
                    "source": "playlist",
                    "sourceId": 10,
                    "position": 1,
                    "selected": false
                },
                {
                    "key": "NFL Football",
                    "segCategory": "sports.nfl",
                    "source": "playlist",
                    "sourceId": 10,
                    "position": 1,
                    "selected": false
                },
                {
                    "key": "MLB Baseball",
                    "segCategory": "sports.mlb",
                    "source": "playlist",
                    "sourceId": 10,
                    "position": 2,
                    "selected": false
                },
                {
                    "key": "NHL Hockey",
                    "segCategory": "sports.nhl",
                    "source": "playlist",
                    "sourceId": 10,
                    "position": 2,
                    "selected": false
                },
                {
                    "key": "NCAA",
                    "segCategory": "sports.ncaa",
                    "source": "playlist",
                    "sourceId": 10,
                    "position": 2,
                    "selected": false
                },
                {
                    "key": "FIFA",
                    "segCategory": "sports.fifa",
                    "source": "playlist",
                    "sourceId": 10,
                    "position": 2,
                    "selected": false
                },
                {
                    "key": "NASCAR Racing",
                    "segCategory": "sports.nascar",
                    "source": "playlist",
                    "sourceId": 10,
                    "position": 2,
                    "selected": false
                },
                {
                    "key": "Tennis",
                    "segCategory": "sports.tennis",
                    "source": "playlist",
                    "sourceId": 10,
                    "position": 2,
                    "selected": false
                },
                {
                    "key": "Wrestling and MMA",
                    "segCategory": "sports.wrestling",
                    "source": "playlist",
                    "sourceId": 10,
                    "position": 3,
                    "selected": false
                },
                {
                    "key": "Boxing",
                    "segCategory": "sports.boxing",
                    "source": "playlist",
                    "sourceId": 10,
                    "position": 3,
                    "selected": false
                },
                {
                    "key": "PGA Tour Golf",
                    "segCategory": "sports.golf",
                    "source": "playlist",
                    "sourceId": 10,
                    "position": 3,
                    "selected": false
                },
                {
                    "key": "WNBA Basketball",
                    "segCategory": "sports.wnba",
                    "source": "playlist",
                    "sourceId": 10,
                    "position": 3,
                    "selected": false
                }
            ]
        },
        {
            "name": "Entertainment",
            "source": "combined",
            "take": 2,
            "offer": 1,
            "keys": [
                {
                    "key": "Entertainment",
                    "segCategory": "news.entertainment",
                    "source": "playlist",
                    "sourceId": 9,
                    "position": 999,
                    "selected": false
                },
                {
                    "key": "TV and Movies",
                    "segCategory": "news.entertainment",
                    "source": "podcast",
                    "sourceId": 157,
                    "position": 1,
                    "selected": false
                },
                {
                    "key": "Music",
                    "segCategory": "news.entertainment",
                    "source": "podcast",
                    "sourceId": 158,
                    "position": 3,
                    "selected": false
                },
                {
                    "key": "Celebs",
                    "segCategory": "news.entertainment",
                    "source": "podcast",
                    "sourceId": 159,
                    "position": 2,
                    "selected": false
                }
            ]
        },
        {
            "name": "Business",
            "source": "combined",
            "take": 2,
            "offer": 6,
            "keys": [
                {
                    "key": "Business News",
                    "segCategory": "news.finance",
                    "source": "playlist",
                    "sourceId": 3,
                    "position": 1,
                    "selected": false
                },
                {
                    "key": "Real Estate",
                    "segCategory": "business.personalFinance",
                    "source": "podcast",
                    "sourceId": 155,
                    "position": 3,
                    "selected": false
                },
                {
                    "key": "Entrepreneurs",
                    "segCategory": "business.smallMediumBusiness",
                    "source": "podcast",
                    "sourceId": 156,
                    "position": 3,
                    "selected": false
                },
                {
                    "key": "Careers",
                    "segCategory": "business.smallMediumBusiness",
                    "source": "podcast",
                    "sourceId": 197,
                    "position": 1,
                    "selected": false
                },
                {
                    "key": "Consumer Protection",
                    "segCategory": "business.consumerProtection",
                    "source": "podcast",
                    "sourceId": 198,
                    "position": 3,
                    "selected": false
                },
                {
                    "key": "Financial Advice",
                    "segCategory": "business.consumerProtection",
                    "source": "podcast",
                    "sourceId": 154,
                    "position": 2,
                    "selected": false
                }
            ]
        },
        {
            "name": "Tech",
            "source": "combined",
            "take": 2,
            "offer": 4,
            "keys": [
                {
                    "key": "Tech News",
                    "segCategory": "news.tech",
                    "source": "playlist",
                    "sourceId": 5,
                    "position": 1,
                    "selected": false
                },
                {
                    "key": "Tech Advice",
                    "segCategory": "tech.advice",
                    "source": "podcast",
                    "sourceId": 164,
                    "position": 3,
                    "selected": false
                },
                {
                    "key": "Computer Science",
                    "segCategory": "tech.pro",
                    "source": "podcast",
                    "sourceId": 165,
                    "position": 2,
                    "selected": false
                },
                {
                    "key": "Gaming",
                    "segCategory": "tech.gaming",
                    "source": "podcast",
                    "sourceId": 166,
                    "position": 1,
                    "selected": false
                }
            ]
        },
        {
            "name": "Kids",
            "source": "feed",
            "take": 1,
            "offer": 2,
            "keys": [
                {
                    "key": "Kids",
                    "segCategory": "kids",
                    "source": "feed",
                    "sourceId": 55,
                    "position": 2,
                    "selected": false
                }
            ]
        },
        {
            "name": "Lifestyle",
            "source": "combined",
            "take": 2,
            "offer": 7,
            "keys": [
                {
                    "key": "Fashion",
                    "segCategory": "lifestyle.fashionAndBeauty",
                    "source": "podcast",
                    "sourceId": 167,
                    "position": 2,
                    "selected": false
                },
                {
                    "key": "Food and Dining",
                    "segCategory": "lifestyle.food",
                    "source": "podcast",
                    "sourceId": 168,
                    "position": 1,
                    "selected": false
                },
                {
                    "key": "Pets",
                    "segCategory": "lifestyle.pets.general",
                    "source": "podcast",
                    "sourceId": 169,
                    "position": 3,
                    "selected": false
                },
                {
                    "key": "DIY",
                    "segCategory": "lifestyle.diy",
                    "source": "podcast",
                    "sourceId": 170,
                    "position": 2,
                    "selected": false
                },
                {
                    "key": "Travel",
                    "segCategory": "lifestyle.travel",
                    "source": "podcast",
                    "sourceId": 171,
                    "position": 1,
                    "selected": false
                },
                {
                    "key": "Outdoors",
                    "segCategory": "lifestyle.outdoors",
                    "source": "podcast",
                    "sourceId": 172,
                    "position": 2,
                    "selected": false
                },
                {
                    "key": "Cars",
                    "segCategory": "lifestyle.cars",
                    "source": "podcast",
                    "sourceId": 196,
                    "position": 2,
                    "selected": false
                }
            ]
        },
        {
            "name": "Health and Science",
            "source": "combined",
            "take": 2,
            "offer": 3,
            "keys": [
                {
                    "key": "Health",
                    "segCategory": "scienceAndHealth",
                    "source": "playlist",
                    "sourceId": 8,
                    "position": 1,
                    "selected": false
                },
                {
                    "key": "Science",
                    "segCategory": "scienceAndHealth",
                    "source": "podcast",
                    "sourceId": 192,
                    "position": 3,
                    "selected": false
                }
            ]
        },
        {
            "name": "Relationships",
            "source": "combined",
            "take": 1,
            "offer": 2,
            "keys": [
                {
                    "key": "Dating and Marriage",
                    "segCategory": "lifestyle.familyAndRelationship",
                    "source": "podcast",
                    "sourceId": 190,
                    "position": 3,
                    "selected": false
                },
                {
                    "key": "Parenting",
                    "segCategory": "lifestyle.familyAndRelationship",
                    "source": "podcast",
                    "sourceId": 191,
                    "position": 1,
                    "selected": false
                }
            ]
        },
        {
            "name": "Culture",
            "source": "combined",
            "take": 2,
            "offer": 3,
            "keys": [
                {
                    "key": "Arts",
                    "segCategory": "culture.artsAndDesign",
                    "source": "podcast",
                    "sourceId": 160,
                    "position": 3,
                    "selected": false
                },
                {
                    "key": "Books",
                    "segCategory": "culture.books",
                    "source": "podcast",
                    "sourceId": 161,
                    "position": 2,
                    "selected": false
                },
                {
                    "key": "Design",
                    "segCategory": "culture.artsAndDesign",
                    "source": "podcast",
                    "sourceId": 162,
                    "position": 3,
                    "selected": false
                }
            ]
        },
        {
            "name": "Education",
            "source": "combined",
            "take": 2,
            "offer": 2,
            "keys": [
                {
                    "key": "History",
                    "segCategory": "culture.history",
                    "source": "podcast",
                    "sourceId": 183,
                    "position": 2,
                    "selected": false
                },
                {
                    "key": "Law",
                    "segCategory": "law",
                    "source": "podcast",
                    "sourceId": 185,
                    "position": 3,
                    "selected": false
                }
            ]
        },
        {
            "name": "Comedy",
            "source": "combined",
            "take": 2,
            "offer": 1,
            "keys": [
                {
                    "key": "Comedy",
                    "segCategory": "humor",
                    "source": "podcast",
                    "sourceId": 187,
                    "position": 1,
                    "selected": false
                }
            ]
        },
        {
            "name": "Documentary",
            "source": "combined",
            "take": 1,
            "offer": 1,
            "keys": [
                {
                    "key": "Documentary",
                    "segCategory": "culture.documentary",
                    "source": "podcast",
                    "sourceId": 188,
                    "position": 1,
                    "selected": false
                }
            ]
        },
        {
            "name": "Paranormal",
            "source": "combined",
            "take": 1,
            "offer": 1,
            "keys": [
                {
                    "key": "Paranormal",
                    "segCategory": "Paranormal",
                    "source": "podcast",
                    "sourceId": 189,
                    "position": 3,
                    "selected": false
                }
            ]
        },
        {
            "name": "Sustainability",
            "source": "combined",
            "take": 1,
            "offer": 1,
            "keys": [
                {
                    "key": "Sustainability",
                    "segCategory": "lifestyle.sustainability",
                    "source": "podcast",
                    "sourceId": 200,
                    "position": 3,
                    "selected": false
                }
            ]
        },
        {
            "name": "Offbeat",
            "source": "combined",
            "take": 1,
            "offer": 1,
            "keys": [
                {
                    "key": "Offbeat",
                    "segCategory": "offbeat",
                    "source": "playlist",
                    "sourceId": 90,
                    "position": 2,
                    "selected": false
                }
            ]
        }
    ]
}
{
  "example": "{\n    \"id\": \"1c605d58-0e01-4403-a2b2-c2a8f889cded\",\n    \"userId\": \"8605639a-1671-4dbd-84da-cbcd88f349a3\",\n    \"location\": null,\n    \"sourceType\": \"mix\",\n    \"preferences\": [\n        {\n            \"name\": \"Trending and Popular\",\n            \"source\": \"trending\",\n            \"take\": 6,\n            \"offer\": 6,\n            \"keys\": [\n                {\n                    \"key\": \"Michael Deleo\",\n                    \"segCategory\": \"NA\",\n                    \"source\": \"trending\",\n                    \"sourceId\": 0,\n                    \"position\": 1,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Chris Woodward\",\n                    \"segCategory\": \"NA\",\n                    \"source\": \"trending\",\n                    \"sourceId\": 0,\n                    \"position\": 1,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Jim Boylan\",\n                    \"segCategory\": \"NA\",\n                    \"source\": \"trending\",\n                    \"sourceId\": 0,\n                    \"position\": 2,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Green Party\",\n                    \"segCategory\": \"NA\",\n                    \"source\": \"trending\",\n                    \"sourceId\": 0,\n                    \"position\": 2,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Willie Horton\",\n                    \"segCategory\": \"NA\",\n                    \"source\": \"trending\",\n                    \"sourceId\": 0,\n                    \"position\": 3,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Harvey Weinstein\",\n                    \"segCategory\": \"NA\",\n                    \"source\": \"trending\",\n                    \"sourceId\": 0,\n                    \"position\": 3,\n                    \"selected\": false\n                }\n            ]\n        },\n        {\n            \"name\": \"News\",\n            \"source\": \"combined\",\n            \"take\": 2,\n            \"offer\": 6,\n            \"keys\": [\n                {\n                    \"key\": \"Burst of the Day\",\n                    \"segCategory\": \"news.bod\",\n                    \"source\": \"bod\",\n                    \"sourceId\": 0,\n                    \"position\": 1,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"National News\",\n                    \"segCategory\": \"news.us\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 4,\n                    \"position\": 999,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Politics\",\n                    \"segCategory\": \"news.us.politics\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 4,\n                    \"position\": 2,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"World News\",\n                    \"segCategory\": \"news.foreign\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 6,\n                    \"position\": 3,\n                    \"selected\": false\n                }\n            ]\n        },\n        {\n            \"name\": \"Sports\",\n            \"source\": \"combined\",\n            \"take\": 2,\n            \"offer\": 13,\n            \"keys\": [\n                {\n                    \"key\": \"Sports News\",\n                    \"segCategory\": \"news.sports\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 10,\n                    \"position\": 999,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"NBA Basketball\",\n                    \"segCategory\": \"sports.nba\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 10,\n                    \"position\": 1,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"NFL Football\",\n                    \"segCategory\": \"sports.nfl\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 10,\n                    \"position\": 1,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"MLB Baseball\",\n                    \"segCategory\": \"sports.mlb\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 10,\n                    \"position\": 2,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"NHL Hockey\",\n                    \"segCategory\": \"sports.nhl\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 10,\n                    \"position\": 2,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"NCAA\",\n                    \"segCategory\": \"sports.ncaa\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 10,\n                    \"position\": 2,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"FIFA\",\n                    \"segCategory\": \"sports.fifa\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 10,\n                    \"position\": 2,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"NASCAR Racing\",\n                    \"segCategory\": \"sports.nascar\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 10,\n                    \"position\": 2,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Tennis\",\n                    \"segCategory\": \"sports.tennis\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 10,\n                    \"position\": 2,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Wrestling and MMA\",\n                    \"segCategory\": \"sports.wrestling\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 10,\n                    \"position\": 3,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Boxing\",\n                    \"segCategory\": \"sports.boxing\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 10,\n                    \"position\": 3,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"PGA Tour Golf\",\n                    \"segCategory\": \"sports.golf\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 10,\n                    \"position\": 3,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"WNBA Basketball\",\n                    \"segCategory\": \"sports.wnba\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 10,\n                    \"position\": 3,\n                    \"selected\": false\n                }\n            ]\n        },\n        {\n            \"name\": \"Entertainment\",\n            \"source\": \"combined\",\n            \"take\": 2,\n            \"offer\": 1,\n            \"keys\": [\n                {\n                    \"key\": \"Entertainment\",\n                    \"segCategory\": \"news.entertainment\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 9,\n                    \"position\": 999,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"TV and Movies\",\n                    \"segCategory\": \"news.entertainment\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 157,\n                    \"position\": 1,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Music\",\n                    \"segCategory\": \"news.entertainment\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 158,\n                    \"position\": 3,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Celebs\",\n                    \"segCategory\": \"news.entertainment\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 159,\n                    \"position\": 2,\n                    \"selected\": false\n                }\n            ]\n        },\n        {\n            \"name\": \"Business\",\n            \"source\": \"combined\",\n            \"take\": 2,\n            \"offer\": 6,\n            \"keys\": [\n                {\n                    \"key\": \"Business News\",\n                    \"segCategory\": \"news.finance\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 3,\n                    \"position\": 1,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Real Estate\",\n                    \"segCategory\": \"business.personalFinance\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 155,\n                    \"position\": 3,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Entrepreneurs\",\n                    \"segCategory\": \"business.smallMediumBusiness\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 156,\n                    \"position\": 3,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Careers\",\n                    \"segCategory\": \"business.smallMediumBusiness\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 197,\n                    \"position\": 1,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Consumer Protection\",\n                    \"segCategory\": \"business.consumerProtection\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 198,\n                    \"position\": 3,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Financial Advice\",\n                    \"segCategory\": \"business.consumerProtection\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 154,\n                    \"position\": 2,\n                    \"selected\": false\n                }\n            ]\n        },\n        {\n            \"name\": \"Tech\",\n            \"source\": \"combined\",\n            \"take\": 2,\n            \"offer\": 4,\n            \"keys\": [\n                {\n                    \"key\": \"Tech News\",\n                    \"segCategory\": \"news.tech\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 5,\n                    \"position\": 1,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Tech Advice\",\n                    \"segCategory\": \"tech.advice\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 164,\n                    \"position\": 3,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Computer Science\",\n                    \"segCategory\": \"tech.pro\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 165,\n                    \"position\": 2,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Gaming\",\n                    \"segCategory\": \"tech.gaming\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 166,\n                    \"position\": 1,\n                    \"selected\": false\n                }\n            ]\n        },\n        {\n            \"name\": \"Kids\",\n            \"source\": \"feed\",\n            \"take\": 1,\n            \"offer\": 2,\n            \"keys\": [\n                {\n                    \"key\": \"Kids\",\n                    \"segCategory\": \"kids\",\n                    \"source\": \"feed\",\n                    \"sourceId\": 55,\n                    \"position\": 2,\n                    \"selected\": false\n                }\n            ]\n        },\n        {\n            \"name\": \"Lifestyle\",\n            \"source\": \"combined\",\n            \"take\": 2,\n            \"offer\": 7,\n            \"keys\": [\n                {\n                    \"key\": \"Fashion\",\n                    \"segCategory\": \"lifestyle.fashionAndBeauty\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 167,\n                    \"position\": 2,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Food and Dining\",\n                    \"segCategory\": \"lifestyle.food\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 168,\n                    \"position\": 1,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Pets\",\n                    \"segCategory\": \"lifestyle.pets.general\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 169,\n                    \"position\": 3,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"DIY\",\n                    \"segCategory\": \"lifestyle.diy\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 170,\n                    \"position\": 2,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Travel\",\n                    \"segCategory\": \"lifestyle.travel\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 171,\n                    \"position\": 1,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Outdoors\",\n                    \"segCategory\": \"lifestyle.outdoors\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 172,\n                    \"position\": 2,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Cars\",\n                    \"segCategory\": \"lifestyle.cars\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 196,\n                    \"position\": 2,\n                    \"selected\": false\n                }\n            ]\n        },\n        {\n            \"name\": \"Health and Science\",\n            \"source\": \"combined\",\n            \"take\": 2,\n            \"offer\": 3,\n            \"keys\": [\n                {\n                    \"key\": \"Health\",\n                    \"segCategory\": \"scienceAndHealth\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 8,\n                    \"position\": 1,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Science\",\n                    \"segCategory\": \"scienceAndHealth\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 192,\n                    \"position\": 3,\n                    \"selected\": false\n                }\n            ]\n        },\n        {\n            \"name\": \"Relationships\",\n            \"source\": \"combined\",\n            \"take\": 1,\n            \"offer\": 2,\n            \"keys\": [\n                {\n                    \"key\": \"Dating and Marriage\",\n                    \"segCategory\": \"lifestyle.familyAndRelationship\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 190,\n                    \"position\": 3,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Parenting\",\n                    \"segCategory\": \"lifestyle.familyAndRelationship\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 191,\n                    \"position\": 1,\n                    \"selected\": false\n                }\n            ]\n        },\n        {\n            \"name\": \"Culture\",\n            \"source\": \"combined\",\n            \"take\": 2,\n            \"offer\": 3,\n            \"keys\": [\n                {\n                    \"key\": \"Arts\",\n                    \"segCategory\": \"culture.artsAndDesign\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 160,\n                    \"position\": 3,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Books\",\n                    \"segCategory\": \"culture.books\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 161,\n                    \"position\": 2,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Design\",\n                    \"segCategory\": \"culture.artsAndDesign\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 162,\n                    \"position\": 3,\n                    \"selected\": false\n                }\n            ]\n        },\n        {\n            \"name\": \"Education\",\n            \"source\": \"combined\",\n            \"take\": 2,\n            \"offer\": 2,\n            \"keys\": [\n                {\n                    \"key\": \"History\",\n                    \"segCategory\": \"culture.history\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 183,\n                    \"position\": 2,\n                    \"selected\": false\n                },\n                {\n                    \"key\": \"Law\",\n                    \"segCategory\": \"law\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 185,\n                    \"position\": 3,\n                    \"selected\": false\n                }\n            ]\n        },\n        {\n            \"name\": \"Comedy\",\n            \"source\": \"combined\",\n            \"take\": 2,\n            \"offer\": 1,\n            \"keys\": [\n                {\n                    \"key\": \"Comedy\",\n                    \"segCategory\": \"humor\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 187,\n                    \"position\": 1,\n                    \"selected\": false\n                }\n            ]\n        },\n        {\n            \"name\": \"Documentary\",\n            \"source\": \"combined\",\n            \"take\": 1,\n            \"offer\": 1,\n            \"keys\": [\n                {\n                    \"key\": \"Documentary\",\n                    \"segCategory\": \"culture.documentary\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 188,\n                    \"position\": 1,\n                    \"selected\": false\n                }\n            ]\n        },\n        {\n            \"name\": \"Paranormal\",\n            \"source\": \"combined\",\n            \"take\": 1,\n            \"offer\": 1,\n            \"keys\": [\n                {\n                    \"key\": \"Paranormal\",\n                    \"segCategory\": \"Paranormal\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 189,\n                    \"position\": 3,\n                    \"selected\": false\n                }\n            ]\n        },\n        {\n            \"name\": \"Sustainability\",\n            \"source\": \"combined\",\n            \"take\": 1,\n            \"offer\": 1,\n            \"keys\": [\n                {\n                    \"key\": \"Sustainability\",\n                    \"segCategory\": \"lifestyle.sustainability\",\n                    \"source\": \"podcast\",\n                    \"sourceId\": 200,\n                    \"position\": 3,\n                    \"selected\": false\n                }\n            ]\n        },\n        {\n            \"name\": \"Offbeat\",\n            \"source\": \"combined\",\n            \"take\": 1,\n            \"offer\": 1,\n            \"keys\": [\n                {\n                    \"key\": \"Offbeat\",\n                    \"segCategory\": \"offbeat\",\n                    \"source\": \"playlist\",\n                    \"sourceId\": 90,\n                    \"position\": 2,\n                    \"selected\": false\n                }\n            ]\n        }\n    ]\n}"
}

Response 200

Example

{
  "success": true,
  "preferences": {
    "id": "2ee9cc00-1234-5678-abcd-1234abcd5678ef",
    "userId": "8765432a-9876-4qaz-89da-cbcd99f123b1",
    "appKey": "1dc65c9a87654a98a412345f6c654321",
    "location": null,
    "sourceType": "mix",
    "preferences": [
      {
        "name": "Trending and Popular",
        "source": "trending",
        "take": 6,
        "offer": 6,
        "keys": []
      },
      {
        "name": "News",
        "source": "combined",
        "take": 2,
        "offer": 6,
        "keys": [
          {
            "key": "Burst of the Day",
            "segCategory": "news.bod",
            "source": "bod",
            "sourceId": 0,
            "position": 1,
            "selected": false
          },
          {
            "key": "National News",
            "segCategory": "news.us",
            "source": "playlist",
            "sourceId": 4,
            "position": 999,
            "selected": false
          },
          {
            "key": "Politics",
            "segCategory": "news.us.politics",
            "source": "playlist",
            "sourceId": 4,
            "position": 2,
            "selected": false
          },
          {
            "key": "World News",
            "segCategory": "news.foreign",
            "source": "playlist",
            "sourceId": 6,
            "position": 3,
            "selected": false
          }
        ]
      },
      {
        "name": "Sports",
        "source": "combined",
        "take": 2,
        "offer": 13,
        "keys": [
          {
            "key": "Sports News",
            "segCategory": "news.sports",
            "source": "playlist",
            "sourceId": 10,
            "position": 999,
            "selected": false
          },
          {
            "key": "NBA Basketball",
            "segCategory": "sports.nba",
            "source": "playlist",
            "sourceId": 10,
            "position": 1,
            "selected": false
          },
          {
            "key": "NFL Football",
            "segCategory": "sports.nfl",
            "source": "playlist",
            "sourceId": 10,
            "position": 1,
            "selected": false
          },
          {
            "key": "MLB Baseball",
            "segCategory": "sports.mlb",
            "source": "playlist",
            "sourceId": 10,
            "position": 2,
            "selected": false
          },
          {
            "key": "NHL Hockey",
            "segCategory": "sports.nhl",
            "source": "playlist",
            "sourceId": 10,
            "position": 2,
            "selected": false
          },
          {
            "key": "NCAA",
            "segCategory": "sports.ncaa",
            "source": "playlist",
            "sourceId": 10,
            "position": 2,
            "selected": false
          },
          {
            "key": "FIFA",
            "segCategory": "sports.fifa",
            "source": "playlist",
            "sourceId": 10,
            "position": 2,
            "selected": false
          },
          {
            "key": "NASCAR Racing",
            "segCategory": "sports.nascar",
            "source": "playlist",
            "sourceId": 10,
            "position": 2,
            "selected": false
          },
          {
            "key": "Tennis",
            "segCategory": "sports.tennis",
            "source": "playlist",
            "sourceId": 10,
            "position": 2,
            "selected": false
          },
          {
            "key": "Wrestling and MMA",
            "segCategory": "sports.wrestling",
            "source": "playlist",
            "sourceId": 10,
            "position": 3,
            "selected": false
          },
          {
            "key": "Boxing",
            "segCategory": "sports.boxing",
            "source": "playlist",
            "sourceId": 10,
            "position": 3,
            "selected": false
          },
          {
            "key": "PGA Tour Golf",
            "segCategory": "sports.golf",
            "source": "playlist",
            "sourceId": 10,
            "position": 3,
            "selected": false
          },
          {
            "key": "WNBA Basketball",
            "segCategory": "sports.wnba",
            "source": "playlist",
            "sourceId": 10,
            "position": 3,
            "selected": false
          }
        ]
      },
      {
        "name": "Entertainment",
        "source": "combined",
        "take": 2,
        "offer": 1,
        "keys": [
          {
            "key": "Entertainment",
            "segCategory": "news.entertainment",
            "source": "playlist",
            "sourceId": 9,
            "position": 999,
            "selected": false
          },
          {
            "key": "TV and Movies",
            "segCategory": "news.entertainment",
            "source": "podcast",
            "sourceId": 157,
            "position": 1,
            "selected": false
          },
          {
            "key": "Music",
            "segCategory": "news.entertainment",
            "source": "podcast",
            "sourceId": 158,
            "position": 3,
            "selected": false
          },
          {
            "key": "Celebs",
            "segCategory": "news.entertainment",
            "source": "podcast",
            "sourceId": 159,
            "position": 2,
            "selected": false
          }
        ]
      },
      {
        "name": "Business",
        "source": "combined",
        "take": 2,
        "offer": 6,
        "keys": [
          {
            "key": "Business News",
            "segCategory": "news.finance",
            "source": "playlist",
            "sourceId": 3,
            "position": 1,
            "selected": false
          },
          {
            "key": "Real Estate",
            "segCategory": "business.personalFinance",
            "source": "podcast",
            "sourceId": 155,
            "position": 3,
            "selected": false
          },
          {
            "key": "Entrepreneurs",
            "segCategory": "business.smallMediumBusiness",
            "source": "podcast",
            "sourceId": 156,
            "position": 3,
            "selected": false
          },
          {
            "key": "Careers",
            "segCategory": "business.smallMediumBusiness",
            "source": "podcast",
            "sourceId": 197,
            "position": 1,
            "selected": false
          },
          {
            "key": "Consumer Protection",
            "segCategory": "business.consumerProtection",
            "source": "podcast",
            "sourceId": 198,
            "position": 3,
            "selected": false
          },
          {
            "key": "Financial Advice",
            "segCategory": "business.consumerProtection",
            "source": "podcast",
            "sourceId": 154,
            "position": 2,
            "selected": false
          }
        ]
      },
      {
        "name": "Tech",
        "source": "combined",
        "take": 2,
        "offer": 4,
        "keys": [
          {
            "key": "Tech News",
            "segCategory": "news.tech",
            "source": "playlist",
            "sourceId": 5,
            "position": 1,
            "selected": false
          },
          {
            "key": "Tech Advice",
            "segCategory": "tech.advice",
            "source": "podcast",
            "sourceId": 164,
            "position": 3,
            "selected": false
          },
          {
            "key": "Computer Science",
            "segCategory": "tech.pro",
            "source": "podcast",
            "sourceId": 165,
            "position": 2,
            "selected": false
          },
          {
            "key": "Gaming",
            "segCategory": "tech.gaming",
            "source": "podcast",
            "sourceId": 166,
            "position": 1,
            "selected": false
          }
        ]
      },
      {
        "name": "Kids",
        "source": "feed",
        "take": 1,
        "offer": 2,
        "keys": [
          {
            "key": "Kids",
            "segCategory": "kids",
            "source": "feed",
            "sourceId": 55,
            "position": 2,
            "selected": false
          }
        ]
      },
      {
        "name": "Lifestyle",
        "source": "combined",
        "take": 2,
        "offer": 7,
        "keys": [
          {
            "key": "Fashion",
            "segCategory": "lifestyle.fashionAndBeauty",
            "source": "podcast",
            "sourceId": 167,
            "position": 2,
            "selected": false
          },
          {
            "key": "Food and Dining",
            "segCategory": "lifestyle.food",
            "source": "podcast",
            "sourceId": 168,
            "position": 1,
            "selected": false
          },
          {
            "key": "Pets",
            "segCategory": "lifestyle.pets.general",
            "source": "podcast",
            "sourceId": 169,
            "position": 3,
            "selected": false
          },
          {
            "key": "DIY",
            "segCategory": "lifestyle.diy",
            "source": "podcast",
            "sourceId": 170,
            "position": 2,
            "selected": false
          },
          {
            "key": "Travel",
            "segCategory": "lifestyle.travel",
            "source": "podcast",
            "sourceId": 171,
            "position": 1,
            "selected": false
          },
          {
            "key": "Outdoors",
            "segCategory": "lifestyle.outdoors",
            "source": "podcast",
            "sourceId": 172,
            "position": 2,
            "selected": false
          },
          {
            "key": "Cars",
            "segCategory": "lifestyle.cars",
            "source": "podcast",
            "sourceId": 196,
            "position": 2,
            "selected": false
          }
        ]
      },
      {
        "name": "Health and Science",
        "source": "combined",
        "take": 2,
        "offer": 3,
        "keys": [
          {
            "key": "Health",
            "segCategory": "scienceAndHealth",
            "source": "playlist",
            "sourceId": 8,
            "position": 1,
            "selected": false
          },
          {
            "key": "Science",
            "segCategory": "scienceAndHealth",
            "source": "podcast",
            "sourceId": 192,
            "position": 3,
            "selected": false
          }
        ]
      },
      {
        "name": "Relationships",
        "source": "combined",
        "take": 1,
        "offer": 2,
        "keys": [
          {
            "key": "Dating and Marriage",
            "segCategory": "lifestyle.familyAndRelationship",
            "source": "podcast",
            "sourceId": 190,
            "position": 3,
            "selected": false
          },
          {
            "key": "Parenting",
            "segCategory": "lifestyle.familyAndRelationship",
            "source": "podcast",
            "sourceId": 191,
            "position": 1,
            "selected": false
          }
        ]
      },
      {
        "name": "Culture",
        "source": "combined",
        "take": 2,
        "offer": 3,
        "keys": [
          {
            "key": "Arts",
            "segCategory": "culture.artsAndDesign",
            "source": "podcast",
            "sourceId": 160,
            "position": 3,
            "selected": false
          },
          {
            "key": "Books",
            "segCategory": "culture.books",
            "source": "podcast",
            "sourceId": 161,
            "position": 2,
            "selected": false
          },
          {
            "key": "Design",
            "segCategory": "culture.artsAndDesign",
            "source": "podcast",
            "sourceId": 162,
            "position": 3,
            "selected": false
          }
        ]
      },
      {
        "name": "Education",
        "source": "combined",
        "take": 2,
        "offer": 2,
        "keys": [
          {
            "key": "History",
            "segCategory": "culture.history",
            "source": "podcast",
            "sourceId": 183,
            "position": 2,
            "selected": false
          },
          {
            "key": "Law",
            "segCategory": "law",
            "source": "podcast",
            "sourceId": 185,
            "position": 3,
            "selected": false
          }
        ]
      },
      {
        "name": "Comedy",
        "source": "combined",
        "take": 2,
        "offer": 1,
        "keys": [
          {
            "key": "Comedy",
            "segCategory": "humor",
            "source": "podcast",
            "sourceId": 187,
            "position": 1,
            "selected": false
          }
        ]
      },
      {
        "name": "Documentary",
        "source": "combined",
        "take": 1,
        "offer": 1,
        "keys": [
          {
            "key": "Documentary",
            "segCategory": "culture.documentary",
            "source": "podcast",
            "sourceId": 188,
            "position": 1,
            "selected": false
          }
        ]
      },
      {
        "name": "Paranormal",
        "source": "combined",
        "take": 1,
        "offer": 1,
        "keys": [
          {
            "key": "Paranormal",
            "segCategory": "Paranormal",
            "source": "podcast",
            "sourceId": 189,
            "position": 3,
            "selected": false
          }
        ]
      },
      {
        "name": "Sustainability",
        "source": "combined",
        "take": 1,
        "offer": 1,
        "keys": [
          {
            "key": "Sustainability",
            "segCategory": "lifestyle.sustainability",
            "source": "podcast",
            "sourceId": 200,
            "position": 3,
            "selected": false
          }
        ]
      },
      {
        "name": "Offbeat",
        "source": "combined",
        "take": 1,
        "offer": 1,
        "keys": [
          {
            "key": "Offbeat",
            "segCategory": "offbeat",
            "source": "playlist",
            "sourceId": 90,
            "position": 2,
            "selected": false
          }
        ]
      }
    ]
  }
}

Code samples

@ECHO OFF

curl -v -X POST "https://developersapi.audioburst.com/v2/user/preferences?userId={userId}"
-H "Content-Type: application/json"
-H "Ocp-Apim-Subscription-Key: {subscription key}"

--data-ascii "{body}" 
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;

namespace CSHttpClientSample
{
    static class Program
    {
        static void Main()
        {
            MakeRequest();
            Console.WriteLine("Hit ENTER to exit...");
            Console.ReadLine();
        }
        
        static async void MakeRequest()
        {
            var client = new HttpClient();
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            // Request headers
            client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");

            var uri = "https://developersapi.audioburst.com/v2/user/preferences?userId={userId}&" + queryString;

            HttpResponseMessage response;

            // Request body
            byte[] byteData = Encoding.UTF8.GetBytes("{body}");

            using (var content = new ByteArrayContent(byteData))
            {
               content.Headers.ContentType = new MediaTypeHeaderValue("< your content type, i.e. application/json >");
               response = await client.PostAsync(uri, content);
            }

        }
    }
}	
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class JavaSample 
{
    public static void main(String[] args) 
    {
        HttpClient httpclient = HttpClients.createDefault();

        try
        {
            URIBuilder builder = new URIBuilder("https://developersapi.audioburst.com/v2/user/preferences?userId={userId}");


            URI uri = builder.build();
            HttpPost request = new HttpPost(uri);
            request.setHeader("Content-Type", "application/json");
            request.setHeader("Ocp-Apim-Subscription-Key", "{subscription key}");


            // Request body
            StringEntity reqEntity = new StringEntity("{body}");
            request.setEntity(reqEntity);

            HttpResponse response = httpclient.execute(request);
            HttpEntity entity = response.getEntity();

            if (entity != null) 
            {
                System.out.println(EntityUtils.toString(entity));
            }
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}

<!DOCTYPE html>
<html>
<head>
    <title>JSSample</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>

<script type="text/javascript">
    $(function() {
        var params = {
            // Request parameters
        };
      
        $.ajax({
            url: "https://developersapi.audioburst.com/v2/user/preferences?userId={userId}&" + $.param(params),
            beforeSend: function(xhrObj){
                // Request headers
                xhrObj.setRequestHeader("Content-Type","application/json");
                xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
            },
            type: "POST",
            // Request body
            data: "{body}",
        })
        .done(function(data) {
            alert("success");
        })
        .fail(function() {
            alert("error");
        });
    });
</script>
</body>
</html>
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    NSString* path = @"https://developersapi.audioburst.com/v2/user/preferences?userId={userId}";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                      ];
    
    NSString* string = [array componentsJoinedByString:@"&"];
    path = [path stringByAppendingFormat:@"?%@", string];

    NSLog(@"%@", path);

    NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
    [_request setHTTPMethod:@"POST"];
    // Request headers
    [_request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
    [_request setValue:@"{subscription key}" forHTTPHeaderField:@"Ocp-Apim-Subscription-Key"];
    // Request body
    [_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSURLResponse *response = nil;
    NSError *error = nil;
    NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];

    if (nil != error)
    {
        NSLog(@"Error: %@", error);
    }
    else
    {
        NSError* error = nil;
        NSMutableDictionary* json = nil;
        NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
        NSLog(@"%@", dataString);
        
        if (nil != _connectionData)
        {
            json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
        }
        
        if (error || !json)
        {
            NSLog(@"Could not parse loaded json with error:%@", error);
        }
        
        NSLog(@"%@", json);
        _connectionData = nil;
    }
    
    [pool drain];

    return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';

$request = new Http_Request2('https://developersapi.audioburst.com/v2/user/preferences?userId={userId}');
$url = $request->getUrl();

$headers = array(
    // Request headers
    'Content-Type' => 'application/json',
    'Ocp-Apim-Subscription-Key' => '{subscription key}',
);

$request->setHeader($headers);

$parameters = array(
    // Request parameters
);

$url->setQueryVariables($parameters);

$request->setMethod(HTTP_Request2::METHOD_POST);

// Request body
$request->setBody("{body}");

try
{
    $response = $request->send();
    echo $response->getBody();
}
catch (HttpException $ex)
{
    echo $ex;
}

?>
########### Python 2.7 #############
import httplib, urllib, base64

headers = {
    # Request headers
    'Content-Type': 'application/json',
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.urlencode({
})

try:
    conn = httplib.HTTPSConnection('developersapi.audioburst.com')
    conn.request("POST", "/v2/user/preferences?userId={userId}&%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################

########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64

headers = {
    # Request headers
    'Content-Type': 'application/json',
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.parse.urlencode({
})

try:
    conn = http.client.HTTPSConnection('developersapi.audioburst.com')
    conn.request("POST", "/v2/user/preferences?userId={userId}&%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################
require 'net/http'

uri = URI('https://developersapi.audioburst.com/v2/user/preferences?userId={userId}')


request = Net::HTTP::Post.new(uri.request_uri)
# Request headers
request['Content-Type'] = 'application/json'
# Request headers
request['Ocp-Apim-Subscription-Key'] = '{subscription key}'
# Request body
request.body = "{body}"

response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
    http.request(request)
end

puts response.body