Amplitude · JSON Structure

User Mapping Api User Mapping Structure

UserMapping schema from Amplitude User Mapping API

Type: object Properties: 3 Required: 2
A/B TestingAnalyticsExperimentationFeature FlagsProduct AnalyticsUser Behavior

UserMapping is a JSON Structure definition published by Amplitude, describing 3 properties, of which 2 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

global_user_id user_id unmap

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amplitude/refs/heads/main/json-structure/user-mapping-api-user-mapping-structure.json",
  "name": "UserMapping",
  "description": "UserMapping schema from Amplitude User Mapping API",
  "type": "object",
  "properties": {
    "global_user_id": {
      "type": "string",
      "description": "The primary user ID that other identities will be mapped to."
    },
    "user_id": {
      "type": "string",
      "description": "The user ID to map to the global_user_id."
    },
    "unmap": {
      "type": "boolean",
      "description": "When true, removes the mapping instead of creating it."
    }
  },
  "required": [
    "global_user_id",
    "user_id"
  ]
}