{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asap-cool/json-schema/asap-cool-activity-view-schema.json",
  "title": "ActivityView",
  "description": "Public projection of a `crm.activity`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asap-cool-crm-api-openapi.yml#/components/schemas/ActivityView",
  "type": "object",
  "required": [
    "id",
    "contact_id",
    "kind",
    "summary",
    "source_app",
    "payload",
    "occurred_at",
    "created_at"
  ],
  "properties": {
    "actor_user_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Author, or `null` when emitted by an automation."
    },
    "body": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional long form."
    },
    "contact_id": {
      "type": "string",
      "format": "uuid",
      "description": "Contact the activity is about."
    },
    "created_at": {
      "type": "string",
      "description": "When it was recorded (RFC3339)."
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Stable identifier."
    },
    "kind": {
      "type": "string",
      "description": "Activity kind (`note`, `call`, `email_sent`, …)."
    },
    "occurred_at": {
      "type": "string",
      "description": "When it happened (RFC3339)."
    },
    "payload": {
      "description": "Structured extras, including `supersedes` for a corrected note."
    },
    "source_app": {
      "type": "string",
      "description": "Emitting app slug."
    },
    "source_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Id of the emitting row in its own schema, when there is one."
    },
    "summary": {
      "type": "string",
      "description": "One-line summary."
    }
  }
}