Skip to main content

Edit Prospect

Edit a limited number of fields on a specified company prospect. This endpoint allows you to update the prospect's status and, optionally, application details. The application object is never required — but if you include it, status must be 'applicant' or 'resident' in the same request. Prospect data must be nested under the 'client' key in the JSON body. This endpoint requires a private API key with the clients route permission; public keys are rejected.

PUT
/api/v2/clients/:client_id

Request

Example request (with application)PUTapplication/json
curl -X PUT \
    -H "Content-Type: application/json" \
    --user "YOUR_API_KEY:" \
    -d '{
      "client": {
        "status": "applicant",
        "application": {
          "unit_id": 123,
          "lease_start_date": "2020-06-01",
          "lease_expiration_date": "2020-05-31",
          "application_submitted_date": "2020-05-20",
          "application_price": "1200.00"
        }
      }
    }' \
    "https://api.funnelleasing.com/api/v2/clients/890"

Response

Example responseJSON200 · application/json
{
  "data": {
    "client": {
      "id": 111,
      "group": 20,
      "broker_email": "",
      "broker_phone": "",
      "broker_name": " ",
      "people": [
        {
          "first_name": "Lara",
          "last_name": "Smith",
          "preferred_name": "",
          "email": "lara.smith@outlook.com",
          "phone_1": "555-777-5555",
          "phone_2": "",
          "id": 27,
          "is_primary": true,
          "email_updates_opt_in": 10,
          "sms_opted_in": 10,
          "move_out_date": null
        }
      ],
      "move_in_date": null,
      "client_referral": "None",
      "campaign_info": "None",
      "layout": "",
      "price_floor": null,
      "price_ceiling": null,
      "discovery_source": null,
      "status": "Applicant",
      "active_live_chat_id": null,
      "sms_opted_in": 10
    }
  }
}
⚠️

Requires a private API key

GET and PUT /api/v2/clients/{id} require a private API key with the clients route permission. A public key gets a generic 403 here, even if it otherwise has the clients permission — see Route permissions on the Authentication page for why that 403 looks different from a route-permission error.

Simple Status Change Example

For a simple status change without application details:

Example request (status change only)JSON200 · application/json
{
  "client": {
    "status": "toured"
  }
}
ℹ️

Error bodies carry no validation detail

For privacy and simplicity, this endpoint replaces every validation error message with the literal string "missing or invalid data" — never an array, and never the underlying reason (e.g. it won't distinguish "not an integer" from "not a valid choice"). The error keys still tell you which fields failed. A prospect id that doesn't exist for your company returns a plain 404 with Django's default HTML error page, not a JSON body — don't attempt to parse a 404 from this endpoint as JSON.

Prospect Not Found (404)

Returned when client_id doesn't match a prospect for your company. As noted above, this is Django's default HTML error page, not a JSON body — don't attempt to parse it as JSON.

Error responseJSON404 · application/json
(Django default HTML error page — not JSON)

Invalid Status (400)

Returned in two distinct cases that produce an identical body: status itself is missing or isn't one of the valid choices, or application was sent alongside a status other than 'applicant' or 'resident'.

Error responseJSON400 · application/json
{
  "errors": {
    "status": "missing or invalid data"
  }
}

Invalid Application Data (400)

If one or more fields inside application are missing or invalid (for example, an unrecognized unit_id or an unparseable date), a 400 error response will be returned, keyed by field under application. This example shows unit_id, lease_start_date, and application_submitted_date all failing at once.

Error responseJSON400 · application/json
{
  "errors": {
    "application": {
      "unit_id": "missing or invalid data",
      "lease_start_date": "missing or invalid data",
      "application_submitted_date": "missing or invalid data"
    }
  }
}