{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/peeve-ai/json-schema/peeve-ai-user-push-schema.json",
  "title": "UserPush",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/peeve-ai-openapi.yml#/components/schemas/UserPush",
  "type": "object",
  "required": [
    "external_user_id"
  ],
  "properties": {
    "external_user_id": {
      "type": "string",
      "description": "Your stable id for this user. The identity key — it ties the record to its history, so it must survive key rotation."
    },
    "email": {
      "type": "string",
      "format": "email",
      "description": "Encrypted at rest, indexed by a keyed hash so lookup still works."
    },
    "name": {
      "type": "string",
      "description": "Encrypted at rest."
    },
    "company": {
      "type": "string",
      "description": "Encrypted at rest."
    },
    "phone": {
      "type": "string",
      "description": "Encrypted at rest."
    },
    "plan": {
      "type": "string",
      "maxLength": 80,
      "description": "The user's plan in *your* product, as a display name. Plaintext; it does not affect your Peeve entitlements."
    },
    "created_at": {
      "type": "string",
      "description": "When the account was created in your product. Distinguishes a new signup from a returning user browsing logged out."
    },
    "vendor_token": {
      "type": "string",
      "description": "A token your backend issues for this user, stored encrypted so a Custom API connector can call your API as them. Never travels through the browser."
    },
    "attributes": {
      "type": "object",
      "additionalProperties": true,
      "description": "Free-form business context, merged into the user's stored attributes. Plaintext and non-secret — identity belongs in the fields above."
    }
  }
}