SDK API
  1. Request
SDK API
  • Request
    • Get or store user
      POST
    • Store visit event
      POST
    • Store event
      POST
    • Get campaign
      POST
    • Get strategy
      POST
    • Engagement
      GET
  1. Request

Store event

Developing
POST
/event
Отправка кастомных событий: добавление в корзину, покупка, авторизация, подписка и т.д.
Используется для построения сегментов, активации кампаний и формирования пользовательского профиля.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

Example
{
    "sec": "stringstringstringstring",
    "user": {
        "uid": "stringstringstringstring",
        "ses": "string",
        "attributes": {
            "property1": "string",
            "property2": "string"
        }
    },
    "ctx": {
        "type": "HOMEPAGE",
        "data": [
            "string"
        ],
        "lng": "string",
        "location": "string",
        "pageNumber": 0,
        "referrer": "string",
        "utm": {
            "utm_source": "string",
            "utm_medium": "string",
            "utm_campaign": "string",
            "utm_term": "string",
            "utm_content": "string"
        },
        "attributes": {
            "property1": "string",
            "property2": "string"
        }
    },
    "device": {
        "userTime": "2019-08-24T14:15:22Z",
        "ua": "string",
        "ip": "192.168.0.1",
        "id": "string",
        "tracking": "notDetermined",
        "permission": "provisional"
    },
    "options": {
        "isReturnCounter": false,
        "isReturnUserInfo": false
    },
    "data": [
        {
            "type": "add-to-cart-v1",
            "name": "string",
            "currency": "RUB",
            "value": 0,
            "quantity": 0,
            "productId": "string",
            "cart": [
                {
                    "productId": "string",
                    "quantity": 0,
                    "itemPrice": 0
                }
            ],
            "eventTime": "2019-08-24T14:15:22Z",
            "customProps": {
                "property1": "string",
                "property2": "string"
            }
        }
    ]
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/event' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "sec": "stringstringstringstring",
    "user": {
        "uid": "stringstringstringstring",
        "ses": "string",
        "attributes": {
            "property1": "string",
            "property2": "string"
        }
    },
    "ctx": {
        "type": "HOMEPAGE",
        "data": [
            "string"
        ],
        "lng": "string",
        "location": "string",
        "pageNumber": 0,
        "referrer": "string",
        "utm": {
            "utm_source": "string",
            "utm_medium": "string",
            "utm_campaign": "string",
            "utm_term": "string",
            "utm_content": "string"
        },
        "attributes": {
            "property1": "string",
            "property2": "string"
        }
    },
    "device": {
        "userTime": "2019-08-24T14:15:22Z",
        "ua": "string",
        "ip": "192.168.0.1",
        "id": "string",
        "tracking": "notDetermined",
        "permission": "provisional"
    },
    "options": {
        "isReturnCounter": false,
        "isReturnUserInfo": false
    },
    "data": [
        {
            "type": "add-to-cart-v1",
            "name": "string",
            "currency": "RUB",
            "value": 0,
            "quantity": 0,
            "productId": "string",
            "cart": [
                {
                    "productId": "string",
                    "quantity": 0,
                    "itemPrice": 0
                }
            ],
            "eventTime": "2019-08-24T14:15:22Z",
            "customProps": {
                "property1": "string",
                "property2": "string"
            }
        }
    ]
}'

Responses

🟢200Success
application/json
Body

Example
{
    "user": {
        "uid": "stringstringstringstring",
        "ses": "7356efc2-6ffd-4553-bade-b9ab5d9ce141",
        "segments": [
            "stringstringstringstring"
        ],
        "conditions": {
            "property1": {},
            "property2": {}
        },
        "details": {
            "slid": "string",
            "deviceInfo": {
                "brand": "string",
                "type": "desktop",
                "browser": "Chrome"
            },
            "trafficSource": "Paid Search",
            "geo": {
                "country": "string",
                "countryIso": "string",
                "region": "string",
                "regionIso": "string",
                "city": "string",
                "cityId": "string"
            },
            "isNew": true,
            "affinity": {
                "property1": {
                    "property1": 0,
                    "property2": 0
                },
                "property2": {
                    "property1": 0,
                    "property2": 0
                }
            }
        }
    },
    "campaigns": [
        {
            "campaignId": "stringstringstringstring",
            "experienceId": "stringstringstringstring",
            "trigger": "PAGELOAD"
        }
    ]
}
🟢204No Content
🟠403Forbidden
🟠422Parameter Error
🔴500Server Error
Modified at 2025-09-15 07:12:12
Previous
Store visit event
Next
Get campaign
Built with