{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendraven-ai/json-schema/sendraven-ai-contact-update-schema.json",
  "title": "ContactUpdate",
  "description": "PATCH /v1/contacts/{id}. Every field optional; fields left out are not touched, and unknown fields are ignored.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sendraven-ai-contacts-api-openapi.yml#/components/schemas/ContactUpdate",
  "type": "object",
  "properties": {
    "first_name": {
      "type": "string",
      "maxLength": 120,
      "description": "Replaces the name. A name cannot be cleared to null here; an empty string stores an empty name."
    },
    "last_name": {
      "type": "string",
      "maxLength": 120,
      "description": "As first_name."
    },
    "unsubscribed": {
      "type": "boolean",
      "description": "true does a full unsubscribe: flag, marketing suppression (detail \"unsubscribed via the API\"), pending scheduled sends cancelled and enrolments ended. false resubscribes: clears the flag and the marketing suppression, and is refused with 409 invalid_state for a complaint or a suppression for all mail (such as a hard bounce), which must be removed deliberately through /v1/suppressions first."
    },
    "attributes": {
      "type": "object",
      "additionalProperties": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          }
        ]
      },
      "propertyNames": {
        "minLength": 1,
        "pattern": "^(?!\\$)[^.\\u0000]+$"
      },
      "description": "Custom property values by key; each value a string, number or boolean. Keys cannot be empty, contain \".\" or a null character, or start with \"$\"; such a key is refused with 422 (message starting \"attributes:\") before anything is written. Each value is coerced to the type of its declared contact property (GET /v1/contact-properties). Merged: keys not sent are kept. A key with no declared property is stored as sent and does not create one."
    },
    "last_active_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the person was last active in your product. Kept only if later than the stored value, so a replayed or out-of-order update cannot move it back; more than a day ahead is refused. null clears it."
    }
  }
}