{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "9in adapter /user request",
  "description": "What 9in POSTs to <your base URL>/user: an id or an identifier.",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "email",
                "username",
                "phone"
              ]
            },
            "value": {
              "type": "string",
              "minLength": 1,
              "maxLength": 320
            }
          },
          "required": [
            "type",
            "value"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "identifier"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        }
      },
      "required": [
        "id"
      ],
      "additionalProperties": false
    }
  ]
}
