Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

Migration Guide


Use this document if you intend to migrate from the old webhooks format to the new data format (version 2).

Webhooks will continue to send along both sets of keys until April 6th, 2015. For any strings which have become objects, the old format will be sent until April 6th, 2015.


Common fields

common-fields page anchor

The following changes affect all API calls which contain these fields:

  • added receivedAt timestamp field
  • added sentAt timestamp field
  • action field is now lowercased and called type
  • sessionId fields are now called anonymousId

The following changes affect only the options or context object. The standard naming going forward will be context.

  • options is now context
  • options.providers is now top-level integrations
  • library is now an Object
  • library now contains name and version
  • screenWidth is now screen.width
  • screenHeight is now screen.height
  • appReleaseVersion is now app.version
  • appVersion is now app.build
  • library-version is now library.version
  • deviceModel is now device.model
  • deviceManufacturer is now device.manufacturer
  • idForAdvertiser is now device.idfa
  • osVersion is now os.version
  • options.os is now an Object

The following changes only affect the Alias method.

  • from is now previousId
  • to is now userId

If you're using node, you can use our segmentio/transform-legacy(link takes you to an external page) library to convert your messages into the version 1 format. This is the same library that will be integrated into our webhooks until April 6th, 2015.