> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.propexo.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.propexo.com/_mcp/server.

# Update Application

PUT https://api.propexo.com/v1/applications/{id}
Content-Type: application/json

Update an Application for an Integration.

Reference: https://docs.propexo.com/api-reference/pms-generic-ap-is/applications/update-application

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.propexo.com` (Production, default)
- `https://api.sandbox.propexo.com` (Sandbox)

## Request

### Path parameters

- `id` (string, required) — The Propexo unique identifier for the application

### Body (application/json)

This endpoint expects a _v1_applications_{id}_put_input.

- `applicant_id` (string, optional) — The Propexo unique identifier for the applicant
- `application_id` (string, optional) — The Propexo unique identifier for the application
- `lease_period_id` (string, optional) — The Propexo unique identifier for the lease period
- `unit_id` (string, optional) — The Propexo unique identifier for the unit
- `lead_source_id` (string, optional) — The Propexo unique identifier for the lead source
- `address_1` (string, optional) — The first address line associated with the applicant
- `address_2` (string, optional) — The second address line associated with the applicant
- `application_status` (enum, optional) — The status associated with the application
  - Allowed values: `COMPLETED`, `APPROVED`
- `attachments` (list of V1ApplicationsIdPutInputAttachmentsItems, optional) — Files to upload for the applicant. All the files can have a maximum combined file size of 50 MB
- `city` (string, optional) — The city associated with the applicant
- `create_new_events_only` (V1ApplicationsIdPutInputCreateNewEventsOnly, optional) — Whether or not new events should be created on the applicant
- `date_of_birth` (V1ApplicationsIdPutInputDateOfBirth, optional) — The date of birth associated with the applicant
- `email_1` (string, optional) — The primary email address associated with the applicant
- `first_name` (string, optional) — The first name associated with the applicant
- `last_name` (string, optional) — The last name associated with the applicant
- `move_in_date` (V1ApplicationsIdPutInputMoveInDate, optional) — The desired move-in date to the unit listed in the application
- `phone_1_type` (enum, optional) — Type of the primary phone number
  - Allowed values: `FAX`, `HOME`, `MOBILE`, `WORK`
- `phone_1` (string, optional) — Primary phone number associated with the applicant
- `state` (string, optional) — The state associated with the applicant
- `zip` (string, optional) — The zip code associated with the applicant
- `pets` (list of V1ApplicationsIdPutInputPetsItems, optional) — A list of applicant pets. If any pets are provided, this list will overwrite the existing list of pets
- `vehicles` (list of V1ApplicationsIdPutInputVehiclesItems, optional) — A list of vehicles for the application
- `employment_history` (list of V1ApplicationsIdPutInputEmploymentHistoryItems, optional) — The employment history of the applicant
- `add_ons` (list of V1ApplicationsIdPutInputAddOnsItems, optional) — Add-ons of the applicant
- `employee_id` (string, optional) — The Propexo unique identifier for the employee
- `application_status_id` (string, optional) — The Propexo unique identifier for the application status for this application
- `application_date` (V1ApplicationsIdPutInputApplicationDate, optional) — The application date associated with the applicant
- `start_date` (V1ApplicationsIdPutInputStartDate, optional) — The start date associated with the lease
- `end_date` (V1ApplicationsIdPutInputEndDate, optional) — The end date associated with the lease
- `status` (enum, optional) — The status associated with the application
  - Allowed values: `PENDING`, `APPROVED`, `CANCELED`, `DENIED`, `SIGNED`
- `phone_2` (string, optional) — Secondary phone number associated with the applicant
- `phone_2_type` (enum, optional) — Type of the secondary phone number
  - Allowed values: `FAX`, `HOME`, `MOBILE`, `WORK`
- `notes` (string, optional) — Notes associated with the applicant
- `rent_amount_in_cents` (integer, optional) — The rent amount in cents for the applicant
- `desired_lease_term_in_months` (string, optional) — The desired lease term in months of the applicant
- `floor_plan_id` (string, optional) — The Propexo unique identifier for the floor plan
- `other_occupants` (list of V1ApplicationsIdPutInputOtherOccupantsItems, optional) — A list of other occupants for the application. Only new occupants should be passed in, existing occupants cannot be updated
- `emergency_contacts` (list of V1ApplicationsIdPutInputEmergencyContactsItems, optional) — A list of emergency contacts for the applicant
- `middle_name` (string, optional) — The middle name associated with the applicant
- `maiden_name` (string, optional) — The maiden name associated with the applicant
- `move_out_date` (V1ApplicationsIdPutInputMoveOutDate, optional) — The desired move-out date to the unit listed in the application
- `is_evicted` (boolean, optional) — Whether the applicant has been evicted
- `is_felony` (boolean, optional) — Whether the applicant has a felony
- `is_criminal_charge` (boolean, optional) — Whether the applicant has a criminal charge
- `eviction_description` (string, optional) — The description of the eviction
- `felony_description` (string, optional) — The description of the felony
- `criminal_charge_description` (string, optional) — The description of the criminal charge
- `marital_status` (enum, optional) — The marital status of the applicant
  - Allowed values: `SINGLE`, `MARRIED`
- `identification_number` (string, optional) — The social security number of the applicant
- `drivers_license_number` (string, optional) — The driver's license number of the applicant
- `address_history` (list of V1ApplicationsIdPutInputAddressHistoryItems, optional) — The address history of the applicant
- `other_income` (list of V1ApplicationsIdPutInputOtherIncomeItems, optional) — A list of other income sources for the applicant
- `concession_fees` (list of V1ApplicationsIdPutInputConcessionFeesItems, optional) — A list of concession fees for the application
- `application_fees` (list of V1ApplicationsIdPutInputApplicationFeesItems, optional) — A list of application fees for the application. Only new application fees should be passed in, existing fees cannot be updated
- `events` (list of V1ApplicationsIdPutInputEventsItems, optional, deprecated) — DEPRECATED: Please use /events endpoints to write events. Array of events associated with this applicant

## Response

### 200

Successful response

- `job_id` (string, required) — The ID of the job created to handle this operation
- `data` (V1ApplicationsIdPutOutputData, required)

## Errors

### 400 Bad Request Error

Bad Request

- `error` (ErrorResponseError, required)

## Types

### V1ApplicationsIdPutInputAttachmentsItems

- `file_data` (string, required) — The contents of the file, as a base64 encoded string. The PMS has a max file size of 50 MB.
- `file_name` (string, required) — The name of the file including the extension. Ex: "image.jpg"
- `mime_type` (string, required) — The mime type of the file. Ex: "image/jpeg"
- `lease_file_type` (string, optional) — Deprecated: Use the `file_type_id` field instead. The PMS specific lease file type of the document
- `file_type_id` (string, optional) — The Propexo file type ID of the lease file type to upload. Prefer this over the raw input of the lease_file_type.
- `is_private` (boolean, optional) — If the file should be marked as private. If true the file will not be shown in the resident portal.

### V1ApplicationsIdPutInputCreateNewEventsOnly

Whether or not new events should be created on the applicant

### V1ApplicationsIdPutInputDateOfBirth

The date of birth associated with the applicant

### V1ApplicationsIdPutInputMoveInDate

The desired move-in date to the unit listed in the application

### V1ApplicationsIdPutInputPetsItems

- `type` (string, required) — The type associated with the applicant pet
- `name` (string, optional) — The name associated with the applicant pet
- `age_in_years` (integer, optional) — The age in years of the applicant pet
- `weight_in_pounds` (integer, optional) — The weight in pounds of the applicant pet
- `breed` (string, optional) — The breed of the applicant pet
- `color` (string, optional) — The color of the applicant pet
- `gender` (string, optional) — The raw value for the gender of the applicant pet
- `is_fixed` (boolean, optional) — Whether the applicant pet is fixed
- `is_service_animal` (boolean, optional) — Whether the applicant pet is a service animal

### V1ApplicationsIdPutInputVehiclesItems

- `make` (string, required) — The make of the vehicle
- `model` (string, optional) — The model of the vehicle
- `year` (integer, optional) — The year the vehicle was made
- `color` (string, optional) — The color of the vehicle
- `license_plate_number` (string, optional) — The license plate number of the vehicle
- `license_plate_state` (enum, optional) — The issuing state of the license plate
  - Allowed values: `AA`, `AE`, `AK`, `AL`, `AP`, `AR`, `AS`, `AZ`, `CA`, `CO`, `CT`, `DC`, `DE`, `FL`, `FM`, `GA`, `GU`, `HI`, `IA`, `ID`, `IN`, `KS`, `KY`, `LA`, `MA`, `MD`, `ME`, `MH`, `MI`, `MN`, `MO`, `MP`, `MS`, `MT`, `NC`, `NE`, `NL`, `NJ`, `NM`, `NV`, `NY`, `OH`, `OK`, `OR`, `PA`, `PR`, `SD`, `TN`, `TX`, `UT`, `VA`, `VI`, `VT`, `WA`, `WI`, `WV`, `WY`, `AB`, `BC`, `MB`, `NB`, `NL`, `NT`, `NS`, `NU`, `ON`, `PE`, `QC`, `SK`, `YT`

### V1ApplicationsIdPutInputEmploymentHistoryItems

- `is_current_employer` (boolean, required) — Whether this employment history entry is for a current employer
- `name` (string, required) — The name of the employer
- `start_date` (V1ApplicationsIdPutInputEmploymentHistoryItemsStartDate, required) — The start date of the applicant's employment at this employer
- `monthly_income_in_cents` (integer, required) — The monthly income of the applicant at this employer in cents
- `end_date` (V1ApplicationsIdPutInputEmploymentHistoryItemsEndDate, optional) — The end date of the applicant's employment at this employer. Ignore this field if is_current_employer is set to true
- `address_1` (string, optional) — The first line of the address of the employer
- `city` (string, optional) — The city of the address of the employer
- `state` (enum, optional) — The state of the address of the employer
  - Allowed values: `AA`, `AE`, `AK`, `AL`, `AP`, `AR`, `AS`, `AZ`, `CA`, `CO`, `CT`, `DC`, `DE`, `FL`, `FM`, `GA`, `GU`, `HI`, `IA`, `ID`, `IN`, `KS`, `KY`, `LA`, `MA`, `MD`, `ME`, `MH`, `MI`, `MN`, `MO`, `MP`, `MS`, `MT`, `NC`, `NE`, `NL`, `NJ`, `NM`, `NV`, `NY`, `OH`, `OK`, `OR`, `PA`, `PR`, `SD`, `TN`, `TX`, `UT`, `VA`, `VI`, `VT`, `WA`, `WI`, `WV`, `WY`, `AB`, `BC`, `MB`, `NB`, `NL`, `NT`, `NS`, `NU`, `ON`, `PE`, `QC`, `SK`, `YT`
- `zip` (string, optional) — The zip code of the address of the employer
- `phone` (string, optional) — The phone number of the employer
- `supervisor_first_name` (string, optional) — The first name of the applicant's supervisor at this employer
- `supervisor_last_name` (string, optional) — The last name of the applicant's supervisor at this employer
- `position` (string, optional) — The position held at this employer, or the job description of the applicant

### V1ApplicationsIdPutInputAddOnsItems

- `rentable_item_id` (string, required) — The Propexo unique identifier for the rentable item
- `employee_id` (string, required) — The Propexo unique identifier for the employee
- `start_date` (V1ApplicationsIdPutInputAddOnsItemsStartDate, optional) — The start date associated with the employee
- `end_date` (V1ApplicationsIdPutInputAddOnsItemsEndDate, optional) — The end date associated with the employee

### V1ApplicationsIdPutInputApplicationDate

The application date associated with the applicant

### V1ApplicationsIdPutInputStartDate

The start date associated with the lease

### V1ApplicationsIdPutInputEndDate

The end date associated with the lease

### V1ApplicationsIdPutInputOtherOccupantsItems

- `relationship` (enum, required) — The relationship of the occupant to the applicant
  - Allowed values: `ROOMMATE`, `SPOUSE`, `GUARANTOR`, `OTHER`
- `first_name` (string, required) — The first name associated with the occupant
- `last_name` (string, required) — The last name associated with the occupant
- `third_party_id` (string, required) — A unique ID you would like to associate with the occupant. This is not the Yardi occupant ID
- `organization_name` (string, required) — The name of your organization. Yardi uses this for associating an occupant
- `email_1` (string, optional) — The primary email address associated with the occupant
- `phone_1` (string, optional) — Primary phone number associated with the occupant
- `phone_1_type` (enum, optional) — Type of the primary phone number
  - Allowed values: `FAX`, `HOME`, `MOBILE`, `WORK`
- `phone_2` (string, optional) — Secondary phone number associated with the occupant
- `phone_2_type` (enum, optional) — Type of the secondary phone number
  - Allowed values: `FAX`, `HOME`, `MOBILE`, `WORK`
- `address_1` (string, optional) — The first address line associated with the occupant
- `city` (string, optional) — The city associated with the occupant
- `state` (enum, optional) — The state associated with the occupant
  - Allowed values: `AA`, `AE`, `AK`, `AL`, `AP`, `AR`, `AS`, `AZ`, `CA`, `CO`, `CT`, `DC`, `DE`, `FL`, `FM`, `GA`, `GU`, `HI`, `IA`, `ID`, `IN`, `KS`, `KY`, `LA`, `MA`, `MD`, `ME`, `MH`, `MI`, `MN`, `MO`, `MP`, `MS`, `MT`, `NC`, `NE`, `NL`, `NJ`, `NM`, `NV`, `NY`, `OH`, `OK`, `OR`, `PA`, `PR`, `SD`, `TN`, `TX`, `UT`, `VA`, `VI`, `VT`, `WA`, `WI`, `WV`, `WY`, `AB`, `BC`, `MB`, `NB`, `NL`, `NT`, `NS`, `NU`, `ON`, `PE`, `QC`, `SK`, `YT`
- `zip` (string, optional) — The zip code associated with the occupant

### V1ApplicationsIdPutInputEmergencyContactsItems

- `first_name` (string, required) — The first name of the emergency contact
- `last_name` (string, required) — The last name of the emergency contact
- `relationship` (enum, required) — The relationship of the emergency contact to the applicant
  - Allowed values: `DAUGHTER`, `FRIEND`, `HUSBAND`, `SON`, `WIFE`, `OTHER`
- `address_1` (string, optional) — The first line of the address of the emergency contact
- `city` (string, optional) — The city of the address of the emergency contact
- `state` (enum, optional) — The state of the address of the emergency contact
  - Allowed values: `AA`, `AE`, `AK`, `AL`, `AP`, `AR`, `AS`, `AZ`, `CA`, `CO`, `CT`, `DC`, `DE`, `FL`, `FM`, `GA`, `GU`, `HI`, `IA`, `ID`, `IN`, `KS`, `KY`, `LA`, `MA`, `MD`, `ME`, `MH`, `MI`, `MN`, `MO`, `MP`, `MS`, `MT`, `NC`, `NE`, `NL`, `NJ`, `NM`, `NV`, `NY`, `OH`, `OK`, `OR`, `PA`, `PR`, `SD`, `TN`, `TX`, `UT`, `VA`, `VI`, `VT`, `WA`, `WI`, `WV`, `WY`, `AB`, `BC`, `MB`, `NB`, `NL`, `NT`, `NS`, `NU`, `ON`, `PE`, `QC`, `SK`, `YT`
- `zip` (string, optional) — The zip code of the address of the emergency contact
- `country` (V1ApplicationsIdPutInputEmergencyContactsItemsCountry, optional) — The country of the address of the emergency contact. If your application needs to support submitting an applicant who resides in another country, please reach out to Propexo Support for help
- `phone_1` (string, optional) — The phone number of the emergency contact

### V1ApplicationsIdPutInputMoveOutDate

The desired move-out date to the unit listed in the application

### V1ApplicationsIdPutInputAddressHistoryItems

- `address_1` (string, required) — The first address line associated with the applicant's historical address
- `city` (string, required) — The city associated with the applicant's historical address
- `state` (enum, required) — The state associated with the applicant
  - Allowed values: `AA`, `AE`, `AK`, `AL`, `AP`, `AR`, `AS`, `AZ`, `CA`, `CO`, `CT`, `DC`, `DE`, `FL`, `FM`, `GA`, `GU`, `HI`, `IA`, `ID`, `IN`, `KS`, `KY`, `LA`, `MA`, `MD`, `ME`, `MH`, `MI`, `MN`, `MO`, `MP`, `MS`, `MT`, `NC`, `NE`, `NL`, `NJ`, `NM`, `NV`, `NY`, `OH`, `OK`, `OR`, `PA`, `PR`, `SD`, `TN`, `TX`, `UT`, `VA`, `VI`, `VT`, `WA`, `WI`, `WV`, `WY`, `AB`, `BC`, `MB`, `NB`, `NL`, `NT`, `NS`, `NU`, `ON`, `PE`, `QC`, `SK`, `YT`
- `zip` (string, required) — The zip code associated with the applicant's historical address
- `notice_provided` (boolean, required) — Whether notice has been given to the applicant's historical address
- `move_in_date` (V1ApplicationsIdPutInputAddressHistoryItemsMoveInDate, required) — The date when the applicant moved into their historical address
- `country` (V1ApplicationsIdPutInputAddressHistoryItemsCountry, optional) — The country associated with the applicant's historical address. If your application needs to support submitting an applicant who resides in another country, please reach out to Propexo Support for help
- `property_name` (string, optional) — The property name of the applicant's historical address
- `reason_for_leaving` (string, optional) — The reason the applicant left their historical address
- `monthly_payment_in_cents` (integer, optional) — For the applicant's historical address, the applicant's monthly payment for rent or mortgage in cents
- `move_out_date` (V1ApplicationsIdPutInputAddressHistoryItemsMoveOutDate, optional) — The date when the applicant moved out of their historical address. If this is the applicant's current address, omit this field
- `manager_phone` (string, optional) — The phone number of a property manager who works at this address
- `manager_email` (string, optional) — The email of a property manager who works at this address
- `management_company` (string, optional) — The name of the company who owns the property at this address

### V1ApplicationsIdPutInputOtherIncomeItems

- `source` (string, required) — The source of the income for the applicant
- `monthly_income_in_cents` (integer, required) — The monthly income from this income source in cents

### V1ApplicationsIdPutInputConcessionFeesItems

- `start_date` (V1ApplicationsIdPutInputConcessionFeesItemsStartDate, required) — The start date of the applicant's recurring concession fee
- `end_date` (V1ApplicationsIdPutInputConcessionFeesItemsEndDate, required) — The end date of the applicant's recurring concession fee
- `concession_id` (string, required) — The Propexo unique identifier for the concession. This concession must be associated with the unit that the applicant is applying for

### V1ApplicationsIdPutInputApplicationFeesItems

- `charge_code_id` (string, required) — The Propexo unique identifier for the charge code. This must be an application fee charge code
- `amount_in_cents` (integer, required) — The application fee amount in cents
- `description` (string, optional) — Description of the application fee

### V1ApplicationsIdPutInputEventsItems

- `x_type_id` (string, required) — The PMS id for the event type.
- `unit_id` (string, optional) — The Propexo unique identifier for the unit
- `x_leasing_agent_id` (string, optional) — The PMS id for the leasing agent.
- `x_sub_type_id` (string, optional) — The PMS id for the event sub type.
- `x_result_id` (string, optional) — The PMS id for the event result.
- `event_datetime` (string, optional) — The date and time that the event occured.
- `appointment_datetime` (string, optional) — The date and time that the appointment will occur. Required if using appointment type.
- `time_from` (string, optional)
- `time_to` (string, optional)
- `notes` (string, optional) — General notes about the event.
- `title` (string, optional) — Title for the event.
- `reasons_for_event` (string, optional) — The reason the event occurred.
- `id` (string, optional) — The Propexo unique identifier for the event. Only required if attempting to update an existing event.

### V1ApplicationsIdPutOutputData

### ErrorResponseError

- `code` (string, required)
- `message` (string, required)
- `details` (map from string to any, optional)

### V1ApplicationsIdPutInputEmploymentHistoryItemsStartDate

The start date of the applicant's employment at this employer

### V1ApplicationsIdPutInputEmploymentHistoryItemsEndDate

The end date of the applicant's employment at this employer. Ignore this field if is_current_employer is set to true

### V1ApplicationsIdPutInputAddOnsItemsStartDate

The start date associated with the employee

### V1ApplicationsIdPutInputAddOnsItemsEndDate

The end date associated with the employee

### V1ApplicationsIdPutInputEmergencyContactsItemsCountry

The country of the address of the emergency contact. If your application needs to support submitting an applicant who resides in another country, please reach out to Propexo Support for help

### V1ApplicationsIdPutInputAddressHistoryItemsMoveInDate

The date when the applicant moved into their historical address

### V1ApplicationsIdPutInputAddressHistoryItemsCountry

The country associated with the applicant's historical address. If your application needs to support submitting an applicant who resides in another country, please reach out to Propexo Support for help

### V1ApplicationsIdPutInputAddressHistoryItemsMoveOutDate

The date when the applicant moved out of their historical address. If this is the applicant's current address, omit this field

### V1ApplicationsIdPutInputConcessionFeesItemsStartDate

The start date of the applicant's recurring concession fee

### V1ApplicationsIdPutInputConcessionFeesItemsEndDate

The end date of the applicant's recurring concession fee

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "job_id": "string",
  "data": {}
}
```

**SDK Code**

```python
import requests

url = "https://api.propexo.com/v1/applications/id"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.propexo.com/v1/applications/id';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.propexo.com/v1/applications/id"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.propexo.com/v1/applications/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.propexo.com/v1/applications/id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.propexo.com/v1/applications/id', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.propexo.com/v1/applications/id");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.propexo.com/v1/applications/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```