Ingestion

Upload events (HTTP V2)

Changed on

Send events to Amplitude in real time. Requests are limited to 1 MB.

Retrying safely. Idempotency is per event, not per request, and is keyed on insert_id — Amplitude does not honour an Idempotency-Key header. Set a stable insert_id on every event before the first attempt and reuse it verbatim on retries; Amplitude discards an event whose insert_id matches one already seen for that device_id within the last 7 days. Without it, a retry after a network timeout double-counts every event in the payload, because a request that timed out may still have been ingested.

post/2/httpapi

Request

  • Base URL
    https://api2.amplitude.com
  • Auth
    none required

Request body

api_keystring required

Amplitude project API key.

Response

Events accepted.

code200
events_ingestedinteger

Number of events ingested from the request.

payload_size_bytesinteger

Size of the upload payload in bytes.

server_upload_timeinteger

Milliseconds since epoch when Amplitude accepted the request.

Changes

    • breaking

      the response's body type changed from object to object string for status

    • breaking

      the response's body type changed from object to object string for status

    • breaking

      the response's body type changed from object to object string for status

    • breaking

      the response's body type changed from object to object string for status

    • breaking

      the response's body type changed from object to object string for status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status