{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/past-dev/json-schema/past-dev-identity-schema.json",
  "title": "Identity",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/past-dev-identities-api-openapi.yml#/components/schemas/Identity",
  "type": "object",
  "required": [
    "identity",
    "traits",
    "origin",
    "lastSeenAt",
    "createdAt",
    "updatedAt"
  ],
  "additionalProperties": false,
  "properties": {
    "identity": {
      "type": "string"
    },
    "traits": {
      "type": "object",
      "propertyNames": {
        "maxLength": 200
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 2000
      }
    },
    "origin": {
      "type": "string",
      "enum": [
        "api",
        "ingest",
        "csv",
        "audience",
        "connector",
        "console",
        "login",
        "link"
      ]
    },
    "lastSeenAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "audiences": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "The audience slugs the identity reaches, on the single-record read; null elsewhere."
    }
  }
}