

{
	"$schema":"http://json-schema.org/draft-04/schema#",
	"title":"CreateChat",
	"type":"object",
	"additionalProperties":false,
	"description":"Analytics-v2 .. CreateChat object",
	"properties":{
		"log_context":{
			"$ref":"/resources/schema/analytics/client/v2/LogContext.json",
			"description":"Required Log Context Reference"
		},
		"event_name":{
			"type": "string",
			"enum": ["CREATE_CHAT"]		
		},
		"schema_definition":{
			"type": "string",
			"enum": ["CreateChat"]
		},
		"action":{
			"type": "string",
			"description": "Log CLICK when user hits the top right pen sign to open contacts page; Log SAVE when done is clicked; Log CANCEL when user cancels"
		},
		"group_id":{
			"type":"string",
			"description":"Unique group Id"
		},
		"group_members_list" : {
            "type" : "array",
            "items" : {
                "$ref" : "/resources/schema/analytics/client/v2/GroupMembersListItem.json"
            },
            "minItems" : 2,
            "uniqueItems" : true,
            "description" : "List of user IDs invited and flags for whether the user is an existing one or a new one"
        },
		"number_of_people":{
			"type":"number",
			"description":"number of people added in the chat.  Non null when action=SAVE"
		}
	},
	"required":[
		"action"
	]
}