{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/certifier-io/json-schema/certifier-io-credential-interaction-schema.json",
  "title": "CredentialInteraction",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/certifier-io-openapi.json#/components/schemas/CredentialInteraction",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique credential interaction's identifier"
    },
    "credentialId": {
      "type": "string",
      "description": "The unique credential's identifier, to which this credential interaction belongs"
    },
    "eventType": {
      "type": "string",
      "enum": [
        "credential_viewed",
        "credential_shared_to_linkedin",
        "credential_added_to_linkedin_profile",
        "credential_shared_to_facebook",
        "credential_shared_to_twitter",
        "credential_shared_to_messenger",
        "credential_shared_to_whatsapp",
        "credential_shared_to_pinterest",
        "credential_shared_to_telegram",
        "credential_shared_to_weibo",
        "credential_downloaded",
        "credential_link_copied",
        "credential_verified"
      ],
      "description": "Specifies the type of user interaction event related to the credential"
    },
    "triggeredBy": {
      "type": "string",
      "enum": [
        "recipient",
        "guest"
      ],
      "description": "The actor that triggered this credential interaction. Currently one of two values: recipient or guest"
    },
    "triggeredAt": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time when this credential interaction happened. Formatted as an ISO 8601 date and time string"
    }
  },
  "required": [
    "id",
    "credentialId",
    "eventType",
    "triggeredBy",
    "triggeredAt"
  ]
}