Skip to main content
POST
/
v1
/
interactions
Interaction Upload API
curl --request POST \
  --url https://api.askmiso.com/v1/interactions \
  --header 'Content-Type: application/json' \
  --data '{
  "data": [
    {
      "type": "product_detail_page_view",
      "duration": 61.5,
      "product_ids": [
        "123ABC-BLACK"
      ],
      "product_group_ids": [
        "123ABC"
      ],
      "user_id": "user_1234",
      "anonymous_id": "86D51273AD8BF84217E1567B6CBE7152D7034404",
      "timestamp": "2023-11-07T05:31:56Z",
      "miso_id": "123e4567-e89b-12d3-a456-426614174000",
      "context": {
        "campaign": {
          "name": "spring_sale",
          "source": "Google",
          "medium": "cpc",
          "term": "running+shoes",
          "content": "textlink"
        },
        "truncated_ip": "1.1.1.0",
        "locale": "en-US",
        "region": "US East",
        "page": {
          "url": "https://example.com/miso-tshirt-123ABC",
          "referrer": "https://example.com/",
          "title": "My Product Page"
        },
        "user_agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0",
        "custom_context": {
          "session_variable_1": [
            "value_1",
            "value_2"
          ]
        }
      }
    }
  ]
}'
{
  "message": "success"
}

Authorizations

api_key
string
query
required

Your secret API key is used to access every Miso API endpoint. You should secure this key and only use it on a backend server. Never leave this key in your client-side JavaScript code. If the private key is compromised, you can revoke it in Dojo and get a new one.

Specify your secret key in the api_key query parameter. For example:

POST /v1/users?api_key=039c501ac8dfcac91c6f05601cee876e1cc07e17

Body

application/json
data
Data Β· array
required
  • product_detail_page_view
  • add_to_cart
  • remove_from_cart
  • checkout
  • refund
  • subscribe
  • unsubscribe
  • add_to_collection
  • remove_from_collection
  • read
  • watch
  • listen
  • like
  • dislike
  • share
  • rate
  • bookmark
  • complete
  • feedback
  • impression
  • viewable_impression
  • click
  • submit
  • home_page_view
  • category_page_view
  • promo_page_view
  • product_image_view
  • custom

Response

Successful Response

message
string
required

Human-readable message

Example:

"success"