Custom fields: 4 operations (custom_fields.list, custom_fields.create, custom_fields.update, custom_fields.delete).
The definitions of the fields a workspace adds to its leads. How their values are read, written, filtered, set in bulk, exported and reported by webhooks: Custom fields .
GET /v1/custom-fields
The workspace's custom fields (at most 5) and how many leads carry each.
Operation id custom_fields.listScopes leads:readRate class `read` Idempotency Not applicable Keys Developer keys
Field Type Required Description dataobject[]yes maxintegeryes -9007199254740991 to 9007199254740991
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl "https://api.dmhero.ai/v1/custom-fields" \
-H "Authorization: Bearer $DMHERO_API_KEY"JSON Schema Response 200 Copy
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"coverage": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Leads of the workspace that carry a non-blank value for this field."
}
},
"required": [
"key",
"label",
"created_at",
"coverage"
],
"additionalProperties": false
}
},
"max": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"data",
"max"
],
"additionalProperties": false
}POST /v1/custom-fields
Define a custom field. The key is derived from the label unless given, and never changes.
Operation id custom_fields.createScopes leads:writeRate class `write` Idempotency `Idempotency-Key` accepted Keys Developer keys
Field Type Required Description labelstringyes keystringno at most 100 characters
Field Type Required Description coverageintegeryes Leads of the workspace that carry a non-blank value for this field.. -9007199254740991 to 9007199254740991 created_atdate-timeyes keystringyes labelstringyes
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X POST "https://api.dmhero.ai/v1/custom-fields" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"label": "Deal size"
}'JSON Schema Request body Copy
{
"type": "object",
"properties": {
"label": {
"type": "string"
},
"key": {
"type": "string",
"maxLength": 100
}
},
"required": [
"label"
]
}Response 201 Copy
{
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"coverage": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Leads of the workspace that carry a non-blank value for this field."
}
},
"required": [
"key",
"label",
"created_at",
"coverage"
],
"additionalProperties": false
}PATCH /v1/custom-fields/{key}
Rename a custom field's label. The key stays.
Operation id custom_fields.updateScopes leads:writeRate class `write` Idempotency Not applicable Keys Developer keys
Name Type Required Description keystringyes 1 to 100 characters
Field Type Required Description labelstringyes
Field Type Required Description coverageintegeryes Leads of the workspace that carry a non-blank value for this field.. -9007199254740991 to 9007199254740991 created_atdate-timeyes keystringyes labelstringyes
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X PATCH "https://api.dmhero.ai/v1/custom-fields/string" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"label": "string"
}'JSON Schema Request body Copy
{
"type": "object",
"properties": {
"label": {
"type": "string"
}
},
"required": [
"label"
]
}Response 200 Copy
{
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"coverage": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Leads of the workspace that carry a non-blank value for this field."
}
},
"required": [
"key",
"label",
"created_at",
"coverage"
],
"additionalProperties": false
}DELETE /v1/custom-fields/{key}
Delete a custom field and strip its value from every lead of the workspace. Needs confirm=true.
Operation id custom_fields.deleteScopes leads:deleteRate class `write` Idempotency Not applicable Keys Developer keys Destructive Yes: it removes or stops something that cannot be restored by repeating the call
Name Type Required Description keystringyes 1 to 100 characters
Name Type Required Description confirmbooleanno
Field Type Required Description keystringyes values_strippedintegeryes -9007199254740991 to 9007199254740991
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X DELETE "https://api.dmhero.ai/v1/custom-fields/string?confirm=true" \
-H "Authorization: Bearer $DMHERO_API_KEY"JSON Schema Response 200 Copy
{
"type": "object",
"properties": {
"key": {
"type": "string"
},
"values_stripped": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"key",
"values_stripped"
],
"additionalProperties": false
}