{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/modoboa/json-schema/modoboa-identity-schema.json",
  "title": "Identity",
  "description": "Serializer used for identities.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/modoboa-identities-api-openapi.yml#/components/schemas/Identity",
  "type": "object",
  "properties": {
    "pk": {
      "type": "integer"
    },
    "type": {
      "type": "string"
    },
    "identity": {
      "type": "string"
    },
    "name_or_rcpt": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    },
    "enabled": {
      "type": "boolean"
    },
    "possible_actions": {
      "type": "string",
      "readOnly": true
    }
  },
  "required": [
    "enabled",
    "identity",
    "name_or_rcpt",
    "pk",
    "possible_actions",
    "tags",
    "type"
  ],
  "$defs": {
    "Tag": {
      "type": "object",
      "description": "Serializer used to represent a tag.",
      "properties": {
        "name": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "label",
        "name",
        "type"
      ]
    }
  }
}