---
title: "PostUserEvent"
method: POST
path: "/rmp/event/v1/platforms/{platform}/userevents"
tags: ["Event"]
---

# PostUserEvent

`POST /rmp/event/v1/platforms/{platform}/userevents`

Post an individual user event. Server host may vary by platform. Moloco's account manager will provide accurate host information.

## Path parameters

- `platform` string, required

## Request body

- V1Event — Request body for Event API
  - `id` string — Recommended. Unique ID generated by the client that could be used as an identifier. The length should not exceed 128 characters.
  - `event_type` 'UNKNOWN_EVENT_TYPE' | 'SEARCH' | 'ITEM_PAGE_VIEW' | 'ADD_TO_CART' | 'PURCHASE' | 'ADD_TO_WISHLIST' | 'HOME' | 'LAND' | 'PAGE_VIEW', required — Supported EventTypes.
  - `timestamp` string, int64, required — Unix timestamp in milliseconds that the event happened at. (e.g., 1617870506121)
  - `channel_type` 'UNKNOWN_CHANNEL_TYPE' | 'APP' | 'SITE' | 'DESKTOP_SITE' | 'MOBILE_SITE', required — ChannelType enumerates available channel types. Simply using APP and SITE is fine, but you can also further distinguish DESKTOP_SITE and MOBILE_SITE for web users. - APP: Mobile App (iOS or Android) - SITE: Site (e.g. Website) - DESKTOP_SITE: Desktop Site (e.g. Desktop Website) - MOBILE_SITE: Mobile Site (e.g. Mobile Website)
  - `domain` string — Set domain to a value that can identify the domain portion of your website's URL. We recommend you keep the same value across your website and application if they share your backend.
  - `user_id` string — User identifier used by the platform. This should typically be the sign-in ID used within the platform, and is highly recommended to be hashed prior to being sent to Moloco. Please provide this value whenever available to achieve optimal performance. If the value is unknown for any reason, please leave empty and do not fill in a default or random value.
  - `device` EventDevice
    - `os` string — OS of the device. "ios" or "android" must be included for the App channel type.
    - `os_version` string — Device OS version, which is taken from the device without manipulation or normalization. (e.g., "14.4.1")
    - `advertising_id` string — Deprecated. For app traffic, IDFA of iOS or ADID of android should be filled in this field. (e.g., 7acefbed-d1f6-4e4e-aa26-74e93dd017e4). Note that "00000000-0000-0000-0000-000000000000" is not allowed (reference: https://developer.apple.com/documentation/adsupport/asidentifiermanager/advertisingidentifier#discussion).
    - `unique_device_id` string — Deprecated. Please use persistent_id as alternative. For app traffic, a unique identifier for the device being used should be provided in this field. Clients can issue identifiers for their user devices or use their IDFV values if using iOS apps. The length of this id should not exceed 128 characters.
    - `persistent_id` string — Alternative ID to track users regardless of sign-in status. This can typically be an ID associated with the device that the user is on, and is highly recommended to be hashed prior to being sent to Moloco. Please provide this value in addition to the user_id whenever available to achieve optimal performance. If the value is unknown for any reason, please leave empty and do not fill in a default or random value. For further information, please refer to this guide: https://mcm-docs.moloco.com/docs/generating-persistent-identifiers
    - `model` string — Device model, which is taken from the device without manipulation or normalization. (e.g., "iPhone 11 Pro")
    - `ua` string — User Agent. (e.g., "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/111FFF")
    - `language` string — ISO-639-1 alpha-2 language code. (e.g., "en")
  - `items` EventItem[] — Items information related to the event. Required for ADD_TO_CART, ADD_TO_WISHLIST, ITEM_PAGE_VIEW and PURCHASE event types.
    - `id` string, required — Unique identifier of the Item.
    - `price` CommonMoney — A monetary amount in a specific currency. For example, `{currency: "USD", amount: 12.34}` means $12.34. Price of the single item.
      - `currency` 'UNKNOWN_CURRENCY' | 'USD' | 'KRW' | 'JPY' | 'EUR' | 'GBP' | 'SEK' | 'INR' | 'THB' | 'IDR' | 'CNY' | 'CAD' | 'RUB' | 'BRL' | 'SGD' | 'HKD' | 'AUD' | 'PLN' | 'DKK' | 'VND' | 'MYR' | 'PHP' | 'TRY' | 'VES' | 'AED' | 'CHF', required — Currency enumerates available currencies. - UNKNOWN_CURRENCY: Unknown currency. - USD: US Dollar. - KRW: Korean Won. - JPY: Japanese Yen. - EUR: EU Euro. - GBP: British Pound. - SEK: Swedish Krona. - INR: India Rupee. - THB: Thailand Baht. - IDR: Indonesia Rupiah. - CNY: China Yuan. - CAD: Canada Dollar. - RUB: Russia Ruble. - BRL: Brazil Real. - SGD: Singapore Dollar. - HKD: Hong Kong Dollar. - AUD: Autrailia Dollar. - PLN: Poland Zloty. - DKK: Denmark Krone. - VND: Viet Nam Dong. - MYR: Malaysia Ringgit. - PHP: Philippines Peso. - TRY: Turkey Lira. - VES: Venezuela Bolívar Soberano. - AED: United Arab Emirates Dirham. - CHF: Swiss Franc.
      - `amount` number, double, required — Amount of money. (e.g., 12.34)
    - `quantity` integer — Quantity of the item. Recommended.
    - `item_group_id` string — Unique identifier of the Item Group. id and/or item_group_id must be provided.
    - `seller_id` string — Unique identifier of the seller of the item. This field is required for MSPI integration unless the seller cannot be associated with that item for the specific event.
    - `price_seller` CommonMoney — A monetary amount in a specific currency. For example, `{currency: "USD", amount: 12.34}` means $12.34. Price of the single item.
      - `currency` 'UNKNOWN_CURRENCY' | 'USD' | 'KRW' | 'JPY' | 'EUR' | 'GBP' | 'SEK' | 'INR' | 'THB' | 'IDR' | 'CNY' | 'CAD' | 'RUB' | 'BRL' | 'SGD' | 'HKD' | 'AUD' | 'PLN' | 'DKK' | 'VND' | 'MYR' | 'PHP' | 'TRY' | 'VES' | 'AED' | 'CHF', required — Currency enumerates available currencies. - UNKNOWN_CURRENCY: Unknown currency. - USD: US Dollar. - KRW: Korean Won. - JPY: Japanese Yen. - EUR: EU Euro. - GBP: British Pound. - SEK: Swedish Krona. - INR: India Rupee. - THB: Thailand Baht. - IDR: Indonesia Rupiah. - CNY: China Yuan. - CAD: Canada Dollar. - RUB: Russia Ruble. - BRL: Brazil Real. - SGD: Singapore Dollar. - HKD: Hong Kong Dollar. - AUD: Autrailia Dollar. - PLN: Poland Zloty. - DKK: Denmark Krone. - VND: Viet Nam Dong. - MYR: Malaysia Ringgit. - PHP: Philippines Peso. - TRY: Turkey Lira. - VES: Venezuela Bolívar Soberano. - AED: United Arab Emirates Dirham. - CHF: Swiss Franc.
      - `amount` number, double, required — Amount of money. (e.g., 12.34)
  - `revenue` CommonMoney — A monetary amount in a specific currency. For example, `{currency: "USD", amount: 12.34}` means $12.34. Price of the single item.
    - `currency` 'UNKNOWN_CURRENCY' | 'USD' | 'KRW' | 'JPY' | 'EUR' | 'GBP' | 'SEK' | 'INR' | 'THB' | 'IDR' | 'CNY' | 'CAD' | 'RUB' | 'BRL' | 'SGD' | 'HKD' | 'AUD' | 'PLN' | 'DKK' | 'VND' | 'MYR' | 'PHP' | 'TRY' | 'VES' | 'AED' | 'CHF', required — Currency enumerates available currencies. - UNKNOWN_CURRENCY: Unknown currency. - USD: US Dollar. - KRW: Korean Won. - JPY: Japanese Yen. - EUR: EU Euro. - GBP: British Pound. - SEK: Swedish Krona. - INR: India Rupee. - THB: Thailand Baht. - IDR: Indonesia Rupiah. - CNY: China Yuan. - CAD: Canada Dollar. - RUB: Russia Ruble. - BRL: Brazil Real. - SGD: Singapore Dollar. - HKD: Hong Kong Dollar. - AUD: Autrailia Dollar. - PLN: Poland Zloty. - DKK: Denmark Krone. - VND: Viet Nam Dong. - MYR: Malaysia Ringgit. - PHP: Philippines Peso. - TRY: Turkey Lira. - VES: Venezuela Bolívar Soberano. - AED: United Arab Emirates Dirham. - CHF: Swiss Franc.
    - `amount` number, double, required — Amount of money. (e.g., 12.34)
  - `search_query` string — Query string for the search. Required for SEARCH event.
  - `session_id` string — Deprecated. Please use custom_id as alternative. Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.
  - `custom_id` string — Alternative ID to track users regardless of sign-in status or device. This ID should be provided as a third option following the user_id and device.persistent_id, and is highly recommended to be hashed prior to being sent to Moloco. This ID must be provided if both the user_id and device.persistent_id fields are left empty. Please do not fill in a default value, and instead randomize it if you must, but we recommend you send some ID that can be used to track users even if for a short time span. Please reach out to Moloco if you have further questions about this ID.
  - `page_id` string — Page ID should be a uniquely assigned value for each page in the app or web site. It is a mandatory field if the Event type is PAGE_VIEW. Otherwise, it's not required to have a value for the page_id parameter. If the Event type is PAGE_VIEW, provide a string that can identify a context of the event, such as "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar." Any value will be acceptable if it helps identify unique pages.
  - `referrer_page_id` string — Similar to referer in HTTP, this value indicates from which page the user came to the current page.
  - `shipping_charge` CommonMoney — A monetary amount in a specific currency. For example, `{currency: "USD", amount: 12.34}` means $12.34. Price of the single item.
    - `currency` 'UNKNOWN_CURRENCY' | 'USD' | 'KRW' | 'JPY' | 'EUR' | 'GBP' | 'SEK' | 'INR' | 'THB' | 'IDR' | 'CNY' | 'CAD' | 'RUB' | 'BRL' | 'SGD' | 'HKD' | 'AUD' | 'PLN' | 'DKK' | 'VND' | 'MYR' | 'PHP' | 'TRY' | 'VES' | 'AED' | 'CHF', required — Currency enumerates available currencies. - UNKNOWN_CURRENCY: Unknown currency. - USD: US Dollar. - KRW: Korean Won. - JPY: Japanese Yen. - EUR: EU Euro. - GBP: British Pound. - SEK: Swedish Krona. - INR: India Rupee. - THB: Thailand Baht. - IDR: Indonesia Rupiah. - CNY: China Yuan. - CAD: Canada Dollar. - RUB: Russia Ruble. - BRL: Brazil Real. - SGD: Singapore Dollar. - HKD: Hong Kong Dollar. - AUD: Autrailia Dollar. - PLN: Poland Zloty. - DKK: Denmark Krone. - VND: Viet Nam Dong. - MYR: Malaysia Ringgit. - PHP: Philippines Peso. - TRY: Turkey Lira. - VES: Venezuela Bolívar Soberano. - AED: United Arab Emirates Dirham. - CHF: Swiss Franc.
    - `amount` number, double, required — Amount of money. (e.g., 12.34)
  - `decision_track_id` string — Track ID for the event. Track ID is generated by a call to the Decision API. Fill in this field accordingly if the user event is to be associated with a Decision API response.
  - `personalization_mode` 'UNKNOWN_PERSONALIZATION_MODE' | 'STANDARD' | 'METRIC_ONLY' | 'ID_LESS' — PersonalizationMode determines how user identification is handled in decision and event processing. - STANDARD: STANDARD means standard user processing with full user identification. - METRIC_ONLY: METRIC_ONLY means user data is used for metric collection only, not for personalization. - ID_LESS: ID_LESS means no user identification is used.

## Response `200`

A successful response.

- V1PostUserEventResponse

## Other responses

- `400` — Bad request. Detailed cause can be found in the response message.
- `401` — Unauthorized. The request does not have valid authentication credentials for the operation.
- `403` — Permission denied. The caller does not have permission to execute the specified operation.
- `404` — Not found. One or more resources required to perform the request does not exist. Detailed cause can be found in the response message.
- `429` — Too many requests either by platform or by user. Detailed cause can be found in the response message.
- `500` — Internal server error. Detailed cause can be found in the response message.

---

[API](https://skmtc.dev/moloco/apis/decision-api.md) · [All operations](https://skmtc.dev/moloco/apis/decision-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/moloco/decision-api/revisions/206968b164e7/schema)
