{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tale-dev/json-schema/tale-dev-contact-schema.json",
  "title": "Contact",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tale-dev-contacts-api-openapi.yml#/components/schemas/Contact",
  "type": "object",
  "required": [
    "id",
    "organizationId",
    "source",
    "tags",
    "createdAt",
    "updatedAt"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "organizationId": {
      "type": "string"
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "email": {
      "type": [
        "string",
        "null"
      ],
      "format": "email"
    },
    "phone": {
      "type": [
        "string",
        "null"
      ]
    },
    "externalId": {
      "type": [
        "string",
        "null"
      ]
    },
    "source": {
      "type": "string"
    },
    "locale": {
      "type": [
        "string",
        "null"
      ]
    },
    "address": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "lifecycleStatus": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true,
      "description": "Read-only, set by the platform: null while the contact is live, `expired` once the organization’s retention policy has marked it for purge (such a contact still answers reads until the purge runs), `trashed` after a delete — a trashed contact is not served at all. No input schema takes it; a CRM pipeline stage belongs in `metadata`."
    },
    "createdAt": {
      "type": "integer",
      "minimum": 0,
      "description": "Epoch milliseconds"
    },
    "updatedAt": {
      "type": "integer",
      "minimum": 0,
      "description": "Epoch milliseconds"
    }
  }
}