> ## Documentation Index
> Fetch the complete documentation index at: https://docs.contactsmanager.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Contact

> Core contact model representing a person or organization in the ContactsManager SDK

# Contact

The `Contact` model is the core data structure in the ContactsManager SDK that represents a person or organization. It contains basic information about the contact and references to related contact information components.

## Properties

### Identity

* `identifier: String` - Unique identifier for the contact
* `id: String` - Alias for identifier, conforming to Identifiable protocol

### Basic Information

* `contactType: Int` - Type of contact (0 = person, 1 = organization)

### Name Components

* `namePrefix: String?` - Title or honorific (e.g., Dr., Mr.)
* `givenName: String?` - First name
* `middleName: String?` - Middle name
* `familyName: String?` - Last name
* `previousFamilyName: String?` - Previous last name (e.g., maiden name)
* `nameSuffix: String?` - Name suffix (e.g., "Jr.", "III")
* `nickname: String?` - Informal name

### Display Information

* `contactSection: String?` - Section for alphabetical grouping
* `displayName: String?` - Formatted full name for display

### Organization Information

* `organizationName: String?` - Company or organization name
* `departmentName: String?` - Department within organization
* `jobTitle: String?` - Professional title

### Additional Information

* `notes: String?` - General notes about the contact
* `bio: String?` - Biographical information
* `location: String?` - Geographic location

### Image Data

* `imageUrl: String?` - URL to contact's avatar image
* `imageData: Data?` - Full-size image data
* `thumbnailImageData: Data?` - Optimized thumbnail image data
* `imageDataAvailable: Bool` - Indicates if image data is available

### Contact Information Lists

The Contact model contains collections of related information stored in separate models:

* [Phone Numbers](/models/phone-number) - Collection of `ContactPhoneNumber` objects
* [Email Addresses](/models/email-address) - Collection of `ContactEmailAddress` objects
* [URL Addresses](/models/url-address) - Collection of `ContactURLAddress` objects
* [Social Profiles](/models/social-profile) - Collection of `ContactSocial` objects
* [Physical Addresses](/models/address) - Collection of `ContactAddress` objects
* [Instant Message Addresses](/models/instant-message) - Collection of `ContactInstantMessage` objects
* [Relations](/models/relation) - Collection of `ContactRelation` objects

### Additional Lists

* `interests: [String]` - List of interests/hobbies
* `avatars: [String]` - List of avatar URLs

### Dates

* `birthday: Date?` - Contact's birthday
* [Important Dates](/models/date) - Collection of `ContactDate` objects
* `createdAt: Double` - Creation timestamp

### Metadata

* `matchString: String?` - Searchable string containing all contact information
* `isDeleted: Bool` - Soft deletion flag
* `parentContactId: String?` - ID of parent contact if this is a linked contact
* `lastSyncedAt: Double?` - Timestamp of last successful sync with server
* `dirtyTime: Double?` - Last modification timestamp
* `sourceId: String?` - External source identifier

## Usage Example

```swift theme={null}
// Create a new contact
let contact = Contact(
    identifier: UUID().uuidString,
    firstName: "John",
    lastName: "Doe"
)

// Add phone number
let phoneNumber = ContactPhoneNumber(
    contactId: contact.id,
    value: "+1234567890",
    type: "mobile",
    emoji: "📱"
)
contact.phoneNumbers.append(phoneNumber)

// Add email address
let email = ContactEmailAddress(
    contactId: contact.id,
    value: "john.doe@example.com",
    type: "work",
    emoji: "💼"
)
contact.emailAddresses.append(email)
```

## Related Models

* [LocalCanonicalContact](/models/local-canonical-contact) - Links a local contact with a canonical user profile
* [CanonicalContact](/models/canonical-contact) - Server-side user profile information
