{
  "$id": "https://intentschema.org/intents/communication/email/message/purge/v1.json",
  "fqdn": "org.intentschema.communication.email.message.purge.v1",
  "title": "Purge email message",
  "description": "Permanently delete a message bypassing trash. Subject to spoliation risk under FRCP 37(e); blocked by legal hold.",
  "payload": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "required": [
      "target"
    ],
    "properties": {
      "target": {
        "allOf": [
          {
            "$ref": "https://intentschema.org/common/target/v1.json"
          },
          {
            "required": [
              "external_id"
            ]
          }
        ]
      },
      "idempotency_key": {
        "type": "string"
      }
    }
  },
  "result": {
    "type": "object",
    "properties": {
      "external_id": {
        "type": "string"
      },
      "purged_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  },
  "examples": [
    {
      "name": "purge",
      "value": {
        "target": {
          "system": "gmail",
          "external_id": "msg_abc123"
        }
      }
    }
  ]
}
