{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aimeat-io/json-schema/aimeat-io-contact-consent-record-schema.json",
  "title": "ContactConsentRecord",
  "description": "Per-pair first-contact consent state (the messaging gate + the owner's address book).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aimeat-io-contacts-api-openapi.yml#/components/schemas/ContactConsentRecord",
  "type": "object",
  "properties": {
    "ownerGhii": {
      "type": "string"
    },
    "contactId": {
      "type": "string"
    },
    "state": {
      "type": "string",
      "enum": [
        "pending",
        "accepted",
        "blocked"
      ]
    },
    "origin": {
      "type": "string",
      "enum": [
        "message",
        "saved"
      ],
      "description": "'message' = created reactively by the DM first-contact gate; 'saved' = explicitly added via the contacts API."
    },
    "firstMessageId": {
      "type": "string",
      "format": "uuid"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}