Skip to content

Update an existing custom field definition

PUT https://api.prosperworks.com/developer_api/v1/custom_field_definitions/{{custom_field_definition_id}}

Field Type Details Default
name string Name of the Custom Field Definition
data_type string One of the following strings: "Checkbox", "Currency", “Date", "Dropdown", "Float", "MultiSelect", "Percentage", “String", "Text", "URL"
available_on string array List of strings containing one or more of the following: “lead”, “person”, “opportunity”, “company”, "project", "task"
options integer array Array of options for Dropdown and MultiSelect fields. A minimum of one option is required for Dropdown and a minimum of 2 options is required for MultiSelect
currency string 3-letter currency code (e.g., "USD", "CAD")

Request Body

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
{
  "available_on": [ "lead", "person", "opportunity"],
  "options": [
    {
        "name": "Option 1"
    },
    {
        "name": "Option 2"
    },
    {
        "name": "Option 3"
    }
  ]
}

Example Requests

Update options for an existing Dropdown Custom Field

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
curl --request PUT "https://api.prosperworks.com/developer_api/v1/custom_field_definitions/3" \
  --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 "{
  \"available_on\": [ \"lead\", \"person\", \"opportunity\"],
  \"options\": [
    {
        \"name\": \"Option 1\"
    },
    {
        \"name\": \"Option 2\"
    },
    {
        \"name\": \"Option 3\"
    }
  ]
}"
 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
{
    "id": 3,
    "name": "A Dropdown",
    "canonical_name": null,
    "data_type": "Dropdown",
    "available_on": [
        "lead",
        "person",
        "opportunity"
    ],
    "options": [
        {
            "id": 7,
            "name": "Option 1",
            "rank": 0
        },
        {
            "id": 8,
            "name": "Option 2",
            "rank": 1
        },
        {
            "id": 9,
            "name": "Option 3",
            "rank": 2
        }
    ]
}

Update a String Custom Field

1
2
3
4
5
6
7
8
curl --request PUT "https://api.prosperworks.com/developer_api/v1/custom_field_definitions/7" \
  --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 "{
  \"name\": \"Renamed String\"
}"
1
2
3
4
5
6
7
{
    "id": 7,
    "name": "Renamed String",
    "canonical_name": null,
    "data_type": "String",
    "available_on": []
}