post
https://api.duodeal.app/api/custom-fields
Creates a new custom field definition.
Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Internal field name (used as key, no spaces) |
label | string | Yes | Display label shown in the UI |
type | string | Yes | Field type (see Field Types below) |
scope | string | Yes | Entity scope (see Scopes below) |
required | boolean | Yes | Whether the field is mandatory |
formula | string | No | Formula expression (required for Formula type) |
options | object | No | Options for Select/MultiSelect (see Options below) |
weight | integer | No | Sort order/priority (lower = first) |
size | string | No | CSS width class (e.g., w-full, w-1/2) |
editable | boolean | No | Whether users can edit (default: true) |
public | boolean | No | Whether visible publicly |
activate | boolean | No | Whether the field is active (default: true) |
enableAi | boolean | No | Enable AI features for this field |
hubspotMap | string | No | HubSpot property name to sync with |
isMappedToHubspot | boolean | No | Enable HubSpot sync |
Field Types
| Type | Description |
|---|---|
Text | Single-line text input |
MultilineText | Multi-line text area |
RichText | Rich text editor (HTML) |
Number | Numeric input |
Date | Date picker |
datetime | Date and time picker |
Select | Single-choice dropdown |
MultiSelect | Multiple-choice dropdown |
Image | Image upload |
User | User selector |
Formula | Calculated field |
Html | Raw HTML content |
System | System-managed field |
Scopes
| Scope | Description |
|---|---|
deal | Deal/opportunity fields |
customer | Customer/contact fields |
customer-company | Customer company fields |
product | Product catalog fields |
quotation | Quotation fields |
quotation-line | Quotation line item fields |
Options Object (for Select/MultiSelect)
{
"items": [
{ "label": "Option 1" },
{ "label": "Option 2" }
]
}Response
201 Created: Custom field successfully created400 Bad Request: Invalid request body or validation error401 Unauthorized: Invalid or missing API key
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
201Resource created
400Bad request
401Unauthorized
