# Update a lead

**PUT /api/v1/leads/{uuid}**

A status change sets status_changed_at to now. Changing the source without a sub-source clears the sub-source.


## Servers
- https://api.plannrcrm.com: https://api.plannrcrm.com ()


## Authentication methods
- Personal access token & O auth2


## Parameters

### Path parameters

- **uuid** (string)
  The UUID of the lead.



### Body: application/json (object)

- **title** (string | null)
  Title of the lead.

- **first_name** (string)
  First name of the lead.

- **last_name** (string)
  Last name of the lead.

- **entity_name** (string | null)
  Entity name for non-individual leads.

- **client_type** (string)


  Client type of the lead. One of individual, joint, trust and business.

  | Value | Description |
  | ----- | ----------- |
  |individual|Individual|
  |joint|Joint|
  |trust|Trust|
  |business|Business|

- **date_of_birth** (string(date) | null)
  Date of birth. The lead must be at least 18 years old.

- **status** (string)


  Status of the lead. One of new, contacted, pending_call_back, awaiting_client_action, meeting_booked and uncontactable. A change updates status_changed_at.

  | Value | Description |
  | ----- | ----------- |
  |new|New|
  |contacted|Contacted|
  |pending_call_back|Pending Call Back|
  |awaiting_client_action|Awaiting Client Action|
  |meeting_booked|Meeting Booked|
  |uncontactable|Uncontactable|

- **is_vulnerable** (string | null)


  Whether the lead is vulnerable. One of yes, no and possibly.

  | Value | Description |
  | ----- | ----------- |
  |yes|Yes|
  |no|No|
  |possibly|Possibly|

- **source_uuid** (string(uuid))
  UUID of a lead source in the firm. An archived source is only accepted when it is already the lead's source. Changing the source without sending sub_source_uuid clears the sub-source.

- **sub_source_uuid** (string(uuid) | null)
  UUID of a sub-source belonging to the lead's source (or to source_uuid when both are sent). An archived sub-source is only accepted when it is already the lead's sub-source.

- **campaign** (string | null)
  Campaign the lead came from.

- **lead_interest_uuids** (array[string(uuid)])
  UUIDs of lead interests in the firm; replaces the current set. An archived interest is only accepted when it is already attached.

- **custom_fields** (object)
  Custom field values keyed by the custom field reference. Only references configured for leads are accepted. References left out keep their current value.



## Responses
### 200


#### Body: application/json (object)
- **uuid** (string)

- **title** (string)

- **first_name** (string)

- **last_name** (string)

- **name** (string)

- **client_type** (string)

- **date_of_birth** (string)

- **status** (string)

- **status_changed_at** (string)

- **is_archived** (boolean)

- **is_promoted** (boolean)

- **can_update** (boolean)

- **can_archive** (boolean)

- **can_assign** (boolean)

- **can_update_introducer** (boolean)

- **source** (object)

- **sub_source** (object)

- **assigned_account** (object)

- **introduced_by** (object)

- **created_by** (object)

- **archived_by** (object)

- **promoted_by** (object)

- **client_account** (object)

- **primary_email** (object)

- **primary_phone_number** (object)

- **primary_address** (object)

- **interests** (array[object])

- **custom_fields** (array[object])

- **created_at** (string)

- **updated_at** (string)


### 403
Unauthorized

#### Body: application/json (object)
- **message** (string)
  A human-readable description of the error.


### 404
Lead belongs to another firm

#### Body: application/json (object)
- **message** (string)
  A human-readable description of the error.


### 409


#### Body: application/json (object)
- **message** (string)
  A human-readable description of the error.


### 422
Validation error

#### Body: application/json (object)
- **message** (string)
  A human-readable description of the error.

- **errors** (object)
  Validation messages keyed by the field that failed.



[Powered by Bump.sh](https://bump.sh)
