Skip to main content
POST
/
v1
/
interactions
Interaction Upload API
curl --request POST \
  --url 'https://api.askmiso.com/v1/interactions?api_key=' \
  --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
(product_detail_page_view · object | search · object | add_to_cart · object | remove_from_cart · object | checkout · object | refund · object | subscribe · object | unsubscribe · object | add_to_collection · object | remove_from_collection · object | read · object | watch · object | listen · object | like · object | dislike · object | share · object | rate · object | bookmark · object | complete · object | feedback · object | impression · object | viewable_impression · object | click · object | submit · object | home_page_view · object | category_page_view · object | promo_page_view · object | product_image_view · object | custom · object)[]
required

Response

Successful Response

message
string
required

Human-readable message

Example:

"success"