Skip to content

Update a Lead

PUT https://api.prosperworks.com/developer_api/v1/leads/{{example_lead_id}}

Updates are only applied to fields explicitly specified in the request body. For example, if an update request is made with an empty body, no updates will be made. To remove the value from a field, the request body must specify the target field value as 'null'.

Request body

1
2
3
4
5
6
7
8
9
{
  "details": "This is an update",
  "custom_fields": [
    {
      "custom_field_definition_id": 184997,
      "value": [ 262644, 262645 ]
    }
  ]
}

Example Requests

Update a Lead

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
curl --location --request PUT "https://api.prosperworks.com/developer_api/v1/leads/{{example_lead_id}}" \
  --header "X-PW-AccessToken: YOUR_TOKEN_HERE" \
  --header "X-PW-Application: developer_api" \
  --header "X-PW-UserEmail: YOUR_EMAIL_HERE" \
  --header "Content-Type: application/json" \
  --data "{
  \"details\":\"This is an update\",
  \"custom_fields\": [
    {
      \"custom_field_definition_id\": 184997,
      \"value\": [262644,262645]
    }
  ]
}"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
  "id": 8894157,
  "name": "Test Lead",
  "prefix": null,
  "first_name": "Test",
  "last_name": "Lead",
  "middle_name": null,
  "suffix": null,
  "address": {
    "street": "301 Howard St Ste 600",
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94105",
    "country": "US"
  },
  "assignee_id": 137658,
  "company_name": "Lead's Company",
  "customer_source_id": 331241,
  "details": "This is an update",
  "email": {
    "email": "address@workemail.com",
    "category": "work"
  },
  "interaction_count": 0,
  "monetary_unit": null,
  "monetary_value": 100,
  "socials": [
    {
      "url": "facebook.com/test_lead",
      "category": "facebook"
    }
  ],
  "status": "New",
  "status_id": 208231,
  "tags": [
    "tag 1",
    "tag 2"
  ],
  "title": "Title",
  "websites": [
    {
      "url": "www.workwebsite.com",
      "category": "work"
    }
  ],
  "phone_numbers": [
    {
      "number": "415-999-4321",
      "category": "mobile"
    },
    {
      "number": "415-555-1234",
      "category": "work"
    }
  ],
  "custom_fields": [
    {
      "custom_field_definition_id": 100764,
      "value": "A Text Value"
    },
    {
      "custom_field_definition_id": 128735,
      "value": 1511942400
    },
    {
      "custom_field_definition_id": 184997,
      "value": [
        262644,
        262645
      ]
    },
    {
      "custom_field_definition_id": 103481,
      "value": null
    }
  ],
  "date_created": 1489018784,
  "date_modified": 1513976942,
  "date_last_contacted": null
}