## Create Contact

`print_mail.contacts.create(ContactCreateParams**kwargs)  -> Contact`

**post** `/print-mail/v1/contacts`

Creates a contact. This will also verify the contact's address **if you create it using a live API key**. To sucessfully create a contact, either a `firstName`, a `companyName`, or both are required. You can supply both, but you **cannot** supply neither.

You have the option to supply the entire address (except for `countryCode`) via `addressLine1`, in which case PostGrid will parse it automatically. However, this is **not guaranteed to be correct**, so we recommend passing along the structured address fields (`city`, `provinceOrState`, etc) if you have them.

_Note that if you create a contact that has identical information to another contact, this will simply update the description of the existing contact and return it. This avoids creating duplicate contacts._

### Parameters

- `address_line1: str`

  The first line of the contact's address.

- `country_code: str`

  The ISO 3611-1 country code of the contact's address.

- `first_name: str`

- `address_line2: Optional[str]`

  Second line of the contact's address, if applicable.

- `city: Optional[str]`

  The city of the contact's address.

- `company_name: Optional[str]`

  Company name of the contact.

- `description: Optional[str]`

  An optional string describing this resource. Will be visible in the API and the dashboard.

- `email: Optional[str]`

  Email of the contact.

- `force_verified_status: Optional[bool]`

  If `true`, PostGrid will force this contact to have an `addressStatus` of `verified` even if our address verification system says otherwise.

- `job_title: Optional[str]`

  Job title of the contact.

- `last_name: Optional[str]`

  Last name of the contact.

- `metadata: Optional[Dict[str, object]]`

  See the section on Metadata.

- `phone_number: Optional[str]`

  Phone number of the contact.

- `postal_or_zip: Optional[str]`

  The postal or ZIP code of the contact's address.

- `province_or_state: Optional[str]`

  Province or state of the contact's address.

- `skip_verification: Optional[bool]`

  If `true`, PostGrid will skip running this contact's address through our address verification system.

### Returns

- `class Contact: …`

  - `id: str`

    A unique ID prefixed with contact_

  - `address_line1: str`

    The first line of the contact's address.

  - `address_status: Literal["verified", "corrected", "failed"]`

    One of `verified`, `corrected`, or `failed`.

    - `"verified"`

    - `"corrected"`

    - `"failed"`

  - `country_code: str`

    The ISO 3611-1 country code of the contact's address.

  - `created_at: datetime`

    The UTC time at which this resource was created.

  - `live: bool`

    `true` if this is a live mode resource else `false`.

  - `object: Literal["contact"]`

    Always `contact`.

    - `"contact"`

  - `updated_at: datetime`

    The UTC time at which this resource was last updated.

  - `address_errors: Optional[str]`

    A series of human-readable errors/warnings that were raised when running the provided address through our address verification.

  - `address_line2: Optional[str]`

    Second line of the contact's address, if applicable.

  - `city: Optional[str]`

    The city of the contact's address.

  - `company_name: Optional[str]`

    Company name of the contact.

  - `description: Optional[str]`

    An optional string describing this resource. Will be visible in the API and the dashboard.

  - `email: Optional[str]`

    Email of the contact.

  - `first_name: Optional[str]`

    First name of the contact.

  - `force_verified_status: Optional[bool]`

    If `true`, PostGrid will force this contact to have an `addressStatus` of `verified` even if our address verification system says otherwise.

  - `job_title: Optional[str]`

    Job title of the contact.

  - `last_name: Optional[str]`

    Last name of the contact.

  - `metadata: Optional[Dict[str, object]]`

    See the section on Metadata.

  - `phone_number: Optional[str]`

    Phone number of the contact.

  - `postal_or_zip: Optional[str]`

    The postal or ZIP code of the contact's address.

  - `province_or_state: Optional[str]`

    Province or state of the contact's address.

  - `skip_verification: Optional[bool]`

    If `true`, PostGrid will skip running this contact's address through our address verification system.

### Example

```python
import os
from postgrid import PostGrid

client = PostGrid(
    print_mail_api_key=os.environ.get("POSTGRID_PRINT_MAIL_API_KEY"),  # This is the default and can be omitted
)
contact = client.print_mail.contacts.create(
    address_line1="90 Canal St Suite 600, Boston MA 90210",
    country_code="US",
    first_name="Kevin",
    company_name="PostGrid",
)
print(contact.id)
```

#### Response

```json
{
  "id": "contact_pxd7wnnD1xY6H6etKNvjb4",
  "object": "contact",
  "live": false,
  "companyName": "PostGrid",
  "addressLine1": "90 CANAL ST STE 600",
  "city": "BOSTON",
  "provinceOrState": "MA",
  "postalOrZip": "90210-1234",
  "countryCode": "US",
  "skipVerification": false,
  "forceVerifiedStatus": false,
  "addressStatus": "verified",
  "createdAt": "2022-02-16T15:08:41.052Z",
  "updatedAt": "2022-02-16T15:08:41.052Z"
}
```
