# Create Application

The Create Application API is used to create a new Application in the Lili platform.

The respon contains a UUID representing the applicant that was created in the Lili platform, and a URL that allows initializing the application process with the pre-filled information.

Endpoint: PUT /lili/api/v1/lead
Version: v2.0.0
Security: accessKey

## Request fields (application/json):

  - `email` (string, required)
    The unique ID of the webhook

  - `phoneNumber` (string)
    Customer phone number. E.164 format.

  - `ssn` (string)
    Customer SSN
    Example: "XXX-XX-XXXX"

  - `birthDate` (string)
    Customer birth date

  - `firstName` (string)
    Customer first name

  - `lastName` (string)
    Customer last name

  - `line1` (string)
    Customer address line1

  - `line2` (string)
    Customer address line2

  - `city` (string)
    Customer address city

  - `state` (string)
    Customer address 2 letter state code
    Example: "NY"

  - `country` (string)
    Customer country of residence (Alpha 2, ISO 3166 format)
    Example: "NY"

  - `postalCode` (string)
    Customer address postal code
    Example: "XXXXX"

  - `ein` (string)
    Business EIN

  - `businessName` (string)
    Business name

  - `businessAddress` (object)

  - `businessAddress.line1` (string)
    Line 1 of the address

  - `businessAddress.line2` (string)
    Line 2 of the address

  - `businessAddress.city` (string)
    City

  - `businessAddress.state` (string)
    State 2 letter code (ISO 3166 format)
    Example: "NY"

  - `businessAddress.postalCode` (string)
    Postal code
    Example: "XXXXX"

  - `businessAddress.country` (string)
    Country 2 letter code (ISO 3166 format)
    Example: "US"

  - `registeredBusinessAddress` (object)

  - `mailingAddress` (object)

  - `businessType` (any)
    Incorporation type of the business
    Enum: "DBA", "LLC", "MMLLC", "GENERAL_PARTNERSHIP", "LLP", "S_CORP", "SSN", "C_CORP"

  - `incorporationState` (string)
    State the business was incorporated in

  - `uniqueId` (string)
    Unique ID to be used by the partner to identify the customer

  - `duns` (string)
    Business DUNS number

  - `passportNumber` (string)
    Passport number

  - `idGovNumber` (string)
    Non US customer National ID number

  - `idCountry` (string)
    National ID country (Alpha 2, ISO 3166 format). 
Note that if a passport number is supplied, this is the passport issuance country

  - `idExpirationDate` (string)
    National ID expiration date. Note that if passport number is supplied, this is the passport expiration date

  - `ownershipPercent` (number)
    The ownership percentage of the customer

  - `documentUrls` (array)
    A list of URLs containing the business documents of the customer

  - `documentDataList` (array)
    A list of Base64 encoded documents

  - `documentDataList.content` (string, required)
    File content, Base64 decoded

  - `documentDataList.contentType` (string, required)
    The file content type. All standard mime types are supported

  - `documentDataList.fileName` (string, required)
    The name of the file

  - `documentDataList.llcFileType` (string)
    The type of the file
    Enum: "IRS_EIN_LETTER", "ARTICLES_OF_ORGANIZATION", "LETTER_OF_REINSTATEMENT", "GOVERNMENT_IDENTIFICATION", "ARTICLES_OF_INCORPORATION", "SIGNED_PARTNERSHIP_AGREEMENT", "AMENDMENT_DOCUMENT", "OPERATING_AGREEMENT", "UTILITY_BILL", "PASSPORT", "SS4_DOCUMENT"

  - `uboList` (array)
    A list of UBOs with >25% of the business ownership

  - `uboList.email` (string, required)
    The unique ID of the webhook

  - `uboList.phoneNumber` (string)
    Customer phone number. E.164 format.

  - `uboList.ssn` (string)
    Customer SSN
    Example: "XXX-XX-XXXX"

  - `uboList.birthDate` (string)
    Customer birth date

  - `uboList.firstName` (string)
    Customer first name

  - `uboList.lastName` (string)
    Customer last name

  - `uboList.passportNumber` (string)
    Passport number

  - `uboList.idGovNumber` (string)
    Non US customer National ID number

  - `uboList.idCountry` (string)
    National ID country (Alpha 2, ISO 3166 format). 
Note that if a passport number is supplied, this is the passport issuance country

  - `uboList.idExpirationDate` (string)
    National ID expiration date. Note that if passport number is supplied, this is the passport expiration date

  - `uboList.role` (any)
    The UBO role in the account
    Enum: "PARTNER", "PARTNER_FULL_ACCESS"

  - `uboList.ownershipPercent` (number)
    The ownership percentage of the UBO

  - `uboList.address` (object)

  - `naicsCode` (string)
    NAICS code of the business

  - `campaign` (string)
    Campaign code

  - `metadata` (object)
    A map of key-value pairs to store additional partner-specific data on the customer
    Example: {"key1":"value1","key2":"value2"}

  - `eddQuestionData` (array)
    A list of EDD questions and answers

  - `eddQuestionData.question` (string)
    The question

  - `eddQuestionData.answer` (string)
    The answer

  - `eddQuestionData.questionId` (string)
    The answer

## Response 201 fields (application/json):

  - `customerId` (string, required)
    A unique ID for the customer (same as person ID)

  - `location` (string, required)
    A unique URL to be used by the customer for a personalized application flow

  - `token` (string, required)
    The token that should be sent to Lili Connect UI

  - `partnerSuppliedId` (string)
    The uniqueID provided by the partner in the Create Application call. Empty if none was supplied

  - `metadata` (object)
    The metadata key-value pairs stored on the customer

  - `uboData` (array)
    The UBOs of the business

  - `uboData.email` (string)
    The UBO email

  - `uboData.uboId` (string)
    A unique ID for the UBO

  - `personId` (string, required)
    The unique ID of the registered person


