External API
List custom fields
List every custom field in your teamspace, with its ID, type and options.
Lists every custom field in your teamspace, both People fields and Conversation fields – for example, to look up a field’s ID or the options in a Single select field. Nothing changes in Proto. Not sure how to send a request? See Make your first request.
Request
Send a GET request to:
https://v3-api.proto.cx/api/platform/v1/custom-fields/YOUR_TEAMSPACE_ID/list-custom-fields
In the address, replace anything starting with YOUR_ with your own.
Response
Proto replies 200 OK with the fields, in alphabetical order by name:
{
"custom_fields": [
{
"id": "01J0ABCDEF1234567890ABCDEF",
"entity": "customer",
"type": "select",
"name": "Plan",
"description": "Subscription plan",
"select_options": ["Free", "Pro", "Enterprise"],
"single_select_options": null,
"default_value": "Free"
},
{
"id": "01J0ABCDEF1234567890ABCDEG",
"entity": "conversation",
"type": "single_select",
"name": "Reason",
"description": "",
"select_options": null,
"single_select_options": [
{
"id": "cfg_01J0ABCDEF1234567890ABCD",
"name": "Billing",
"options": [
{ "id": "cfo_01J0ABCDEF1234567890ABCD", "name": "Refund", "description": "" }
]
}
],
"default_value": null
}
]
}
| Field | What it is |
|---|---|
id | The field’s ID |
entity | customer for People fields, conversation for Conversation fields. Older fields may say ticket or livechat. |
type | The field’s type – see the next table |
select_options | For a Dropdown field, its options. Otherwise null. |
single_select_options | For a Single select field, its groups of options. Otherwise null. A group’s id starts cfg_. |
default_value | The value a customer or conversation gets when none is set |
Each item in single_select_options has:
| Field | What it is |
|---|
Each item in options has:
| Field | What it is |
|---|---|
id | The option’s ID, starting cfo_. Send this ID as the field’s value. |
type | Shown in Proto as |
|---|---|
text | Text |
number | Number |
boolean | Toggle switch |
datetime | Date |
select | Dropdown |
single_select | Single select |
Errors
There are no errors specific to this request.
For errors any request can return, see If something goes wrong.