Skip to main content
POST
When Ecomail sends a push notification, it adds a click token named ecm_push_id to the FCM message data payload, next to deep_link. Post that token back to this endpoint when the recipient taps the notification, and Ecomail attributes the click to the campaign or automation that sent it. For web recipients with an https deep link, Ecomail also adds the token to the link the browser opens (webpush.fcm_options.link) as the ecm_push_id query parameter.
Ecomail only adds ecm_push_id when the notification has a deep link and the recipient is a known subscriber. A notification without a deep link carries no token, and there is nothing to report.
Ecomail counts each token once. A token sent again, in a later request or twice in one batch, adds no click, so you can safely retry a request that failed. You can batch up to 500 tokens in a single request.
array|string
required
Click tokens read from the ecm_push_id value in the notification’s data payload, or from the ecm_push_id query parameter of the link opened on the web. Send an array of 1 to 500 tokens, or a single token as a plain string. Each token can be up to 2048 characters.

Responses

The status code tells you how many of the tokens Ecomail accepted:
  • 204 — every token was accepted. The response has no body.
  • 200 — some tokens were rejected. The accepted ones are still registered, and rejected says how many were not.
  • 422 — none of the tokens were accepted, or the ecm_push_id field itself failed validation. Nothing was registered.
A token is rejected when it is malformed, was not issued by Ecomail, or belongs to a different account than the API key you used.