# User Endpoint

The User Endpoint handles all User-related Functionalities within a valid Frontend Session. It does not handle User Interaction, you can find those Endpoints here:

{% content-ref url="interaction-endpoint" %}
[interaction-endpoint](https://api.docs.nexx.cloud/frontend-api/endpoints/interaction-endpoint)
{% endcontent-ref %}

## Account Management

## /register

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/register`

This Endpoint registers a User. All User entered Details must be valid POST Attributes (like username, firstname etc).

#### Request Body

| Name                       | Type    | Description                                                                                                                                                                                                                                            |
| -------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| provider                   | string  | \[facebook, google, twitter, aad, external] The User was registered via a Social Connector                                                                                                                                                             |
| vouchercode                | string  | if given, the Voucher will be consumed automatically after successfull Registration.                                                                                                                                                                   |
| affiliatepartner           | string  | in Case the User originally came from an Affilaite Session but decided to register in a later Session, this Parameter will be the Code an (existing) Affiliate Partner for this User Registration.                                                     |
| affiliateparam             | string  | in Case of a given Affilate Partner ID, this is a Partner Specific Code, which may be used later in Payment Transactions.                                                                                                                              |
| connectedForm              | integer | if the Registration Form was built with a nexxOMNIA Form, the Form ID should be sent here. This will ensude automatic Validation based on the Form Rules.                                                                                              |
| paymentRegistrationService | string  | if set and equals a valid 3Q nexx Payment Subscriber Code, the User will be connected to this Service internally.                                                                                                                                      |
| skipLogin                  | boolean | if set to 1 and Login would be possible afterwards (=automatic Authorization), the User will not be logged in. Instead, the API will return an **itemupdate** Object.                                                                                  |
| isPreRegister              | boolean | if set to 1 and Login would be possible afterwards, the User will not be logged in (like "skipLogin" Parameter). In this Case though, the User will also receive a different Confirmation Email for his Login, as the target Platform is not live yet. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /registeranonymous

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/registeranonymous`

This Endpoint registers an anonymous User. All User-related Details may be sent via POST (all Attributes are valid except Username).

#### Request Body

| Name  | Type   | Description                   |
| ----- | ------ | ----------------------------- |
| email | string | The Email Address to register |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /verifyaccountdetailsunique

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/verifyaccountdetailsunique/:item`

This Endpoint validates a Username and/or Email Address for Uniqueness.

#### Path Parameters

| Name | Type   | Description                |
| ---- | ------ | -------------------------- |
| item | string | the given User Information |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /verifytokenunique

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/verifytokenunique/:token`

This Endpoint validates a 3rd Party Connector Token for Uniqueness.

#### Path Parameters

| Name  | Type   | Description               |
| ----- | ------ | ------------------------- |
| token | string | the given Connector Token |

#### Request Body

| Name     | Type   | Description                                                      |
| -------- | ------ | ---------------------------------------------------------------- |
| provider | string | \[google, twitter, facebook] the 3Q nexx Code for the Connector. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /authorize

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/authorize/:token`

This Endpoint represents the final Step in a Registration Process (if AutoAuthorize is disabled).

#### Request Body

| Name  | Type   | Description             |
| ----- | ------ | ----------------------- |
| token | string | the Authorization Token |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /authorizedevice

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/authorizedevice`

will verify a new Device for a User with 2FA Login.

#### Request Body

| Name | Type   | Description                                               |
| ---- | ------ | --------------------------------------------------------- |
| code | string | The SMS Code, sent to the User and Device                 |
| type | string | \[sms, app] the Type of Code submitted, defaults to "sms" |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /authorizelogin

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/authorizelogin`

will verify a Login for a User with U2F Device

#### Request Body

| Name  | Type   | Description                                                                  |
| ----- | ------ | ---------------------------------------------------------------------------- |
| token | string | the U2F Challenge, given as JSON Object, created by the Browser (or ARC SDK) |
| host  | string | the current Domain Host                                                      |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /prepareavsupdate

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/prepareavsupdate`

#### Request Body

| Name     | Type    | Description                         |
| -------- | ------- | ----------------------------------- |
| provider | string  | a 3Q nexx AVS Provider Code         |
| ageclass | integer | \[16, 18] the desired new Age Class |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /finishavsupdate

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/finishavsupdate`

#### Request Body

| Name              | Type    | Description                                                               |
| ----------------- | ------- | ------------------------------------------------------------------------- |
| transaction       | number  | The ID of the /startavsupdate Process                                     |
| transactionresult | boolean | The Result from the AVS Provider. If set to 1, the Age Class will be set. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /registerdeviceforpush

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/registerdeviceforpush`

marks the Device as willing to receive Push Messages

#### Request Body

| Name  | Type   | Description                             |
| ----- | ------ | --------------------------------------- |
| token | string | the unique Token for the current Device |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /prepareregisteru2fdevice

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/prepareregisteru2fdevice`

will create the Challenge for a new U2F Request

#### Request Body

| Name | Type   | Description             |
| ---- | ------ | ----------------------- |
| host | string | the current Domain Host |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /finishregisteru2fdevice

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/finishregisteru2fdevice`

#### Request Body

| Name  | Type   | Description                                                                  |
| ----- | ------ | ---------------------------------------------------------------------------- |
| token | string | the U2F Challenge, given as JSON Object, created by the Browser (or ARC SDK) |
| host  | string | the current Domain Host                                                      |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /prepareregisterauthenticator

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/prepareregisterauthenticator`

will create the Challenge for a new U2F Request

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /finishregisterauthenticator

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/finishregisterauthenticator`

#### Request Body

| Name    | Type | Description                                                  |
| ------- | ---- | ------------------------------------------------------------ |
| process | int  | the Process ID, obtained from the corresponding prepare Call |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /requesttakeout

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/requesttakeout`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /resetpassword

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/resetpassword/:token`

will reset the User Password to a self-given new Value. This is only valid for a predefined Password Reset Link, which Token must be given too.

#### Path Parameters

| Name  | Type   | Description                              |
| ----- | ------ | ---------------------------------------- |
| token | string | the Token of a valid Password Reset Link |

#### Request Body

| Name        | Type   | Description      |
| ----------- | ------ | ---------------- |
| newpassword | string | the new Password |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /resendwelcomemail

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/resendwelcomemail`

will resent the User Welcome Email (needs the Eternal Session and a Backend Process).

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /verifypassword

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/verifywelcome`

will verify, that the given Password matches the stored User Password

#### Path Parameters

| Name     | Type   | Description                                |
| -------- | ------ | ------------------------------------------ |
| password | string | the User entered Password for Verification |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /profile

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/profile`

#### Query Parameters

| Name         | Type    | Description                            |
| ------------ | ------- | -------------------------------------- |
| addEventData | boolean | also include the last 25 joined Events |
| addGroupData | boolean | also include the last 25 joined Groups |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /requestpass

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/requestpass`

will try to find a registered and authorized User and sends an Email with new Login Details to that Account.

#### Query Parameters

| Name  | Type   | Description                                                  |
| ----- | ------ | ------------------------------------------------------------ |
| token | string | the given User Information (Email, Username or Phone Number) |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /requestkeycode

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/requestkeycode`

will invalidate all open 2FA Codes and generates a new Code for the given Device.

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /changepassword

<mark style="color:orange;">`PUT`</mark> `https://api.nexx.cloud/v3.1/user/changepassword`

#### Request Body

| Name            | Type   | Description                 |
| --------------- | ------ | --------------------------- |
| currentpassword | string | the currently used Password |
| newpassword     | string | the new Password            |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /updatestatus

<mark style="color:orange;">`PUT`</mark> `https://api.nexx.cloud/v3.1/user/updatestatus`

#### Request Body

| Name   | Type   | Description           |
| ------ | ------ | --------------------- |
| status | string | the new Status Update |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /updatechannelsubscriptions

<mark style="color:orange;">`PUT`</mark> `https://api.nexx.cloud/v3.1/user/updatechannelsubscriptions`

updates a User Notification Preferences for new Media in a given Channel.

#### Query Parameters

| Name    | Type    | Description                                          |
| ------- | ------- | ---------------------------------------------------- |
| channel | integer | the target Channel                                   |
| viamail | boolean | set to 1, if the User wants to be informed via Email |
| viapush | boolean | set to 1, if ths User wants to be informed via Push  |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /updatedata

<mark style="color:orange;">`PUT`</mark> `https://api.nexx.cloud/v3.1/user/updatedata`

will update all User Details (except Password, Username and Status). All given User Details must be sent via PUT Parameters as in the /register Endpoint.

#### Request Body

| Name          | Type    | Description                                                                                               |
| ------------- | ------- | --------------------------------------------------------------------------------------------------------- |
| connectedForm | integer | if handled via a nexxOMNIA Form, Auto Validation will take Place based on the Rules for the given Form ID |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /unsubscribe

<mark style="color:red;">`DELETE`</mark> `https://api.nexx.cloud/v3.1/user/unsubscribe`

unsubscribe from all Newsletters

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /unregister

<mark style="color:red;">`DELETE`</mark> `https://api.nexx.cloud/v3.1/user/unregister`

will remove the User completey. This Operation cannot be undone, so use with extreme Care.

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Media Item Lists

Media Item List Endpoints return Lists of Media Items, that the User interacted in any Way.&#x20;

| Parameter          | Values        | Description                                                                                                                                                                               |
| ------------------ | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **forUserID**      | valid User ID | if omitted, the currently loggedin User is the target User. If coming from a Backend Process with the "eternal Session", this Parameter can be set for querying for statistical Purposes. |
| **mediaDataLevel** | \[flat, null] | as the returned Lists can become very long, set this Parameter to "flat" in order to only retrieve minimal Media Informations                                                             |

## /history

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/history`

#### Query Parameters

| Name             | Type    | Description                                  |
| ---------------- | ------- | -------------------------------------------- |
| streamtype       | string  | reduce returned List to the given Streamtype |
| excludeCompleted | boolean | <p>dont include fully watched Items<br></p>  |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /historyformerge

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/historyformerge`

This special Endpoint is designed for History Synchronization on Login. It only returnes the Media IDs and will always return ALL of them - Paging is not supported in this Case.

#### Query Parameters

| Name             | Type    | Description                                                                                                                             |
| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| streamtypes      | string  | a Comma seperated List of Streamtypes to be included in the Result Set                                                                  |
| includeProgress  | boolean | if set to 1, the Result Set will contain a maximally reached Progress for each Media Item (for Streamtypes, that have a Time Dimension) |
| excludeCompleted | boolean | dont include fully watched Items                                                                                                        |
| maxDays          | integer | if set, include only Items, watched during the last maxDays Days.                                                                       |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /searchhistory

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/searchhistory`

#### Query Parameters

| Name       | Type   | Description                                  |
| ---------- | ------ | -------------------------------------------- |
| streamtype | string | reduce returned List to the given Streamtype |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /purchaseditems

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/purchaseditems`

#### Query Parameters

| Name           | Type    | Description                                                       |
| -------------- | ------- | ----------------------------------------------------------------- |
| streamtype     | string  | reduce returned List to the given Streamtype                      |
| excludeExpired | boolean | <p>dont include PPV Items, that are not available anymore<br></p> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /favourites

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/favourites`

#### Query Parameters

| Name       | Type   | Description                                  |
| ---------- | ------ | -------------------------------------------- |
| streamtype | string | reduce returned List to the given Streamtype |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /watchlist

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/watchlist`

#### Query Parameters

| Name       | Type   | Description                                  |
| ---------- | ------ | -------------------------------------------- |
| streamtype | string | reduce returned List to the given Streamtype |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /cart

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/cart`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /itemsininterest

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/itemsininterest`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /likes

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/likes`

#### Query Parameters

| Name       | Type   | Description                                  |
| ---------- | ------ | -------------------------------------------- |
| streamtype | string | reduce returned List to the given Streamtype |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /ratings

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/ratings`

#### Query Parameters

| Name       | Type   | Description                                  |
| ---------- | ------ | -------------------------------------------- |
| streamtype | string | reduce returned List to the given Streamtype |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /comments

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/comments`

#### Query Parameters

| Name       | Type   | Description                                  |
| ---------- | ------ | -------------------------------------------- |
| streamtype | string | reduce returned List to the given Streamtype |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /clips

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/clips`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /uploads

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/uploads`

#### Request Body

| Name       | Type   | Description                            |
| ---------- | ------ | -------------------------------------- |
| streamtype | string | return Uploads of the given Streamtype |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /teams

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/teams`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /events

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/user/events`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## User Media

## /prepareupload

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/prepareupload`

This Endpoint will return Upload URLs, Tokens and Filenames for all file based UGC Uploads.

#### Request Body

| Name         | Type    | Description                                                     |
| ------------ | ------- | --------------------------------------------------------------- |
| file         | string  | the Name of the File to upload                                  |
| fromCapture  | boolean | if set to 1, this File has been taken by Camera (or Microphone) |
| forUserStory | boolean | if set to 1, the File will be added to the Users own Story      |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /finishupload

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/finishupload`

This Endpoint will return Upload URLs, Tokens and Filenames for all file based UGC Uploads.

#### Request Body

| Name             | Type    | Description                                                                                                                            |
| ---------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| file             | string  | The Server Filename, received from /prepareupload                                                                                      |
| originalFile     | string  | the original Filename                                                                                                                  |
| context          | string  | The Purpose of the Upload \[profilepicture, profilebackground, image, video, videocover, articlecover, playlistcover, collectioncover] |
| item             | number  | in Case the uploaded File is a Cover, set the ID of the target Media Item here                                                         |
| forUserStory     | boolean | if set to 1, the File will be added to the Users own Story                                                                             |
| lat              | number  | the Latitude of the Users Geo Position                                                                                                 |
| lng              | number  | the Longitude of the Users Geo Position                                                                                                |
| mediaTitle       | string  | the Title of the Media Item (only usefull if context is image or video)                                                                |
| mediaDescription | string  | the Description of the Media Item (only usefull if contexts is image or video)                                                         |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /addarticle

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/addarticle`

This Endpoint will create a UGC Media Item of Streamtype "article".

#### Request Body

| Name        | Type    | Description                                                                             |
| ----------- | ------- | --------------------------------------------------------------------------------------- |
| title       | string  | the Title of the new Article                                                            |
| subtitle    | string  | an optional Subtitle of the new Article                                                 |
| teaser      | string  | an optional Teaser for the new Article                                                  |
| text        | string  | the Contents of the Article (should be HTML)                                            |
| autoPublish | boolean | if set to 1, automatically post the Article (unless Domain UGC Restrictions are active) |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /addplaylist

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/addplaylist`

Thsi Endpoint will create a UGC Media Item of Streamtype "playlist".

#### Request Body

| Name        | Type    | Description                                                                             |
| ----------- | ------- | --------------------------------------------------------------------------------------- |
| title       | string  | the Title of the new Playlist                                                           |
| subtitle    | string  | an optional Subtitle of the new Playlist                                                |
| teaser      | string  | an optional Teaser for the new Playlist                                                 |
| description | string  | an optional Description for the new Playlist                                            |
| autoPublish | boolean | if set to 1, automatically post the Playlist (unless Domain UGC Restrictions are active |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /addcollection

<mark style="color:green;">`POST`</mark> `https://api.nexx.cloud/v3.1/user/addcollection`

This Endpoint will create a UGC Media Item of Streamtype "collection"

#### Request Body

| Name        | Type    | Description                                                                               |
| ----------- | ------- | ----------------------------------------------------------------------------------------- |
| title       | string  | the Title of the new Collection                                                           |
| subtitle    | string  | an optional Subtitle of the new Collection                                                |
| teaser      | string  | an optional Teaser for the new Collection                                                 |
| description | string  | an optional Description for the new Collection                                            |
| autoPublish | boolean | if set to 1, automatically post the Collection (unless Domain UGC Restrictions are active |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}
