Ingest a batch of events (1..500)
Validates, enriches (geo, default context) and writes the events. Invalid events do not fail the batch: they are listed in `rejected`. The whole batch is rejected only on batch-level errors (400/401/403/413/415/429/503).
Validates, enriches (geo, default context) and writes the events.
Invalid events do not fail the batch: they are listed in rejected.
The whole batch is rejected only on batch-level errors (400/401/403/413/415/429/503).
appKeyHeaderX-App-Key<token>Public app write key, pk_ followed by 32 base62 characters. Alternatively, pass it in the app_key body field.
Content-Encoding?string"gzip""identity"- body
app_key?stringAlternative to the X-App-Key header (for sendBeacon)
^pk_[A-Za-z0-9]{32}$sent_at*stringWhen the HTTP request was sent, by the device clock; used to correct clock skew
date-timecontext?Device context. The event's context overrides the batch context field by field.
A missing platform is taken from the key's platform, then from the app's only platform;
otherwise it is other with a platform_missing warning. A missing environment means production.
events*array<>1 <= items <= 500Batch processed (may be a partial success)
application/json- response
accepted*integer0 <= valuerejected*array<>warnings*array<>server_time*stringdate-timecurl -X POST 'https://i.appmetrica.online/v1/events' \ -H 'Content-Type: application/json' \ -d '{ "sent_at": "2026-10-13T09:15:02.120Z", "context": { "platform": "ios", "os_name": "iOS", "os_version": "26.0.1", "app_version": "3.4.0", "app_build": "341", "device_model": "iPhone17,3", "device_type": "phone", "locale": "ru-RU", "environment": "production" }, "events": [ { "insert_id": "0199d6a1-7c2e-7b1a-9f00-3c1d2e4f5a61", "name": "session_start", "timestamp": "2026-10-13T09:11:58.004Z", "install_id": "6f1c2a9e-3b7d-4c55-8a2e-0d9b1f7e4c21", "session_id": "0199d6a1-7b90-7e3c-8d11-5a6b7c8d9e0f", "user_id": "a3f9c2d1-77b4-4e0a-9c1e-2b5d8f6e1a90" }, { "insert_id": "0199d6a4-5d6e-7f80-9a1b-2c3d4e5f6a7b", "name": "session_end", "timestamp": "2026-10-13T09:15:01.990Z", "install_id": "6f1c2a9e-3b7d-4c55-8a2e-0d9b1f7e4c21", "session_id": "0199d6a1-7b90-7e3c-8d11-5a6b7c8d9e0f", "user_id": "a3f9c2d1-77b4-4e0a-9c1e-2b5d8f6e1a90", "duration_ms": 183986 } ]}'{ "accepted": 2, "rejected": [], "warnings": [], "server_time": "2026-10-13T09:15:02.318Z"}