{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/conduyt-com/json-schema/conduyt-com-contact-read-schema.json",
  "title": "ContactRead",
  "description": "GET /contacts/{id}. The stored contact row passes through as is (every column is typed here, nullable ones null when unset); only hasOutboundSms and hasOutboundEmail are guaranteed present. The tags, the owner and the facts the read computes are joined in beside it.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/conduyt-com-openapi.yaml#/components/schemas/ContactRead",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "hasOutboundSms",
    "hasOutboundEmail"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "accountId": {
      "type": "string",
      "format": "uuid"
    },
    "firstName": {
      "type": [
        "string",
        "null"
      ]
    },
    "lastName": {
      "type": [
        "string",
        "null"
      ]
    },
    "email": {
      "type": [
        "string",
        "null"
      ]
    },
    "phone": {
      "type": [
        "string",
        "null"
      ]
    },
    "company": {
      "type": [
        "string",
        "null"
      ]
    },
    "companyId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "jobTitle": {
      "type": [
        "string",
        "null"
      ]
    },
    "addressLine1": {
      "type": [
        "string",
        "null"
      ]
    },
    "addressLine2": {
      "type": [
        "string",
        "null"
      ]
    },
    "city": {
      "type": [
        "string",
        "null"
      ]
    },
    "state": {
      "type": [
        "string",
        "null"
      ]
    },
    "zip": {
      "type": [
        "string",
        "null"
      ]
    },
    "country": {
      "type": "string"
    },
    "timezone": {
      "type": [
        "string",
        "null"
      ]
    },
    "timezoneSource": {
      "type": [
        "string",
        "null"
      ]
    },
    "avatarUrl": {
      "type": [
        "string",
        "null"
      ]
    },
    "source": {
      "type": [
        "string",
        "null"
      ]
    },
    "territory": {
      "type": [
        "string",
        "null"
      ]
    },
    "customFields": {
      "type": "object",
      "additionalProperties": true
    },
    "metadata": {
      "type": "object",
      "additionalProperties": true
    },
    "leadScore": {
      "type": "integer"
    },
    "lineTypeClaimUntil": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "optedOutSms": {
      "type": "boolean"
    },
    "optedOutEmail": {
      "type": "boolean"
    },
    "emailOptInAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "lastContactedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "lastCallDisposition": {
      "type": [
        "string",
        "null"
      ]
    },
    "lastInboundAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "lastOutboundAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "conversationLastReadAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "assignedTo": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "collaborators": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "legacyStatus": {
      "type": [
        "string",
        "null"
      ]
    },
    "masterStatus": {
      "type": "string"
    },
    "wonDealId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "masterStatusChangedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "lastActionAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "lastContactAttemptAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "pooledAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "assignedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "pooledFrom": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "pooledAttemptFloor": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "masterStatusReason": {
      "type": [
        "string",
        "null"
      ]
    },
    "externalBackend": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "language": {
      "type": [
        "string",
        "null"
      ]
    },
    "doNotContact": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "doNotContactReason": {
      "type": [
        "string",
        "null"
      ]
    },
    "doNotContactById": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "doNotContactAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "deletedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "revision": {
      "type": "integer"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "tags": {
      "type": "array",
      "description": "The contact's tags (the tag rows themselves, not the join rows).",
      "items": {
        "type": "object",
        "required": [
          "id",
          "accountId",
          "name",
          "color",
          "description",
          "createdAt",
          "mergedIntoId",
          "mergedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "mergedIntoId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "mergedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      }
    },
    "assignedUser": {
      "type": [
        "object",
        "null"
      ],
      "description": "The owning user, null when unassigned.",
      "required": [
        "id",
        "firstName",
        "lastName",
        "email"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "firstName": {
          "type": [
            "string",
            "null"
          ]
        },
        "lastName": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": "string"
        }
      }
    },
    "sourceLists": {
      "type": "array",
      "description": "Smart Lists this lead was imported from. Always empty for a caller who cannot manage Smart Lists.",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "addedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "addedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "recentActivities": {
      "type": "array",
      "description": "The five newest activities, newest first.",
      "items": {
        "type": "object",
        "required": [
          "id",
          "type",
          "title",
          "description",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "hasOutboundSms": {
      "type": "boolean",
      "description": "true when at least one outbound SMS to this contact was proven sent; drives the Message check context (false = the first text, true = a conversation)."
    },
    "hasOutboundEmail": {
      "type": "boolean",
      "description": "true when at least one outbound email to this contact was proven sent; drives the email Message check context (true = a conversation, so a genuine \"Re:\" reply is not flagged as a fake one)."
    },
    "doNotContactBy": {
      "type": [
        "object",
        "null"
      ],
      "description": "Who switched on Do not contact, null when nobody did or the user is gone.",
      "required": [
        "id",
        "firstName",
        "lastName"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "firstName": {
          "type": [
            "string",
            "null"
          ]
        },
        "lastName": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "_visibility": {
      "type": "object",
      "required": [
        "editable"
      ],
      "properties": {
        "editable": {
          "type": "boolean",
          "description": "Whether the caller may edit this contact."
        }
      }
    }
  }
}