cURL
Python
JavaScript
PHP
Go
Java
curl --request POST \
--url https://api.zixflow.com/api/v1/attributes/{ target} /{ targetId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"apiKeyName": "<string>",
"inputType": "<string>",
"name": "<string>",
"config": {
"currencyDisplayType": "<string>",
"currencyCode": "<string>",
"recordReference": {},
"aiWizard": "<string>",
"dateDisplayType": "<string>"
},
"defaultValue": "<string>",
"description": "<string>",
"isEditable": true,
"isMultiSelect": true,
"isRequired": true,
"isUnique": true,
"validation": "<string>"
}'
200-Success
401-Unauthorised
{
"status" : true ,
"message" : "success" ,
"data" : {
"_id" : "64ad815b273e66dae1afe10f" ,
"apiKeyName" : "name" ,
"inputType" : "text" ,
"name" : "Name" ,
"config" : {
"currencyDisplayType" : null ,
"currencyCode" : null ,
"recordReference" : [ ] ,
"aiWizard" : null ,
"dateDisplayType" : null
} ,
"defaultValue" : null ,
"description" : "" ,
"isEditable" : true ,
"isMultiSelect" : false ,
"isRequired" : false ,
"isUnique" : false ,
"validation" : "none"
}
}
Description
This API endpoint allows the creation of a new attribute within a specified target, either a collection or a list. Attributes define the nature and characteristics of the data stored within the target.
Path
Specifies the target type, which can be either “collection” or “list.”
A unique identifier for the target, either a collection ID or a list ID, depending on the target type.
Body
The API key name used to store data in the collection or list for this field.
Defines the input type or nature of the field. Possible values include text, number, checkbox, currency, date, timestamp, rating, status, select, multiselect, record-reference, actor-reference, domain, file, ai-wizard, email-address, phone-number.
The human-readable name of the field.
Configuration settings for the attribute, including currency display type, currency code, record reference, AI wizard, and date display type.
Accepted values: “code,” “name,” “narrowSymbol,” “symbol.” Specifies how currency should be displayed.
The currency code (e.g., “EUR,” “GBP,” “USD,” “CAD,” “AUD”).
An array of collection IDs connected to this attribute.
The AI wizard field prompt.
Defines how to display the date field.
The default value for the attribute.
A description providing additional information about the attribute.
Indicates whether the attribute is editable (true/false).
Indicates whether the attribute supports multiple selections (true/false).
Indicates whether the attribute is required (true/false).
Indicates whether the attribute values must be unique (true/false).
The validation type for the attribute. Possible values include “none,” “email,” “url,” “phone,” “customRegex.”
Response
Indicates the success or failure of the attribute creation. In this case,
true signifies a successful operation.
Provides a human-readable message accompanying the response. In this instance,
it confirms the successful creation of the attribute.
An object containing details of the newly created attribute:
A unique identifier for the attribute, allowing for precise referencing.
The API key name used to store data in the collection or list for this field.
Defines the input type or nature of the field.
The human-readable name of the field.
Configuration settings for the attribute.
The default value for the attribute.
A description providing additional information about the attribute.
Indicates whether the attribute is editable.
Indicates whether the attribute supports multiple selections.
Indicates whether the attribute is required.
Indicates whether the attribute values must be unique.
The validation type for the attribute.
200-Success
401-Unauthorised
{
"status" : true ,
"message" : "success" ,
"data" : {
"_id" : "64ad815b273e66dae1afe10f" ,
"apiKeyName" : "name" ,
"inputType" : "text" ,
"name" : "Name" ,
"config" : {
"currencyDisplayType" : null ,
"currencyCode" : null ,
"recordReference" : [ ] ,
"aiWizard" : null ,
"dateDisplayType" : null
} ,
"defaultValue" : null ,
"description" : "" ,
"isEditable" : true ,
"isMultiSelect" : false ,
"isRequired" : false ,
"isUnique" : false ,
"validation" : "none"
}
}