Create a custom property
Creates a new custom property for a work item type.
Path Parameters
workspace_slug:requiredstringThe workspace_slug represents the unique workspace identifier for a workspace in Plane. It can be found in the URL. For example, in the URL https://app.plane.so/my-team/projects/, the workspace slug is my-team.
project_id:requiredstringThe unique identifier of the project.
type_id:requiredstringThe unique identifier for the work item type.
Body Parameters
display_name:requiredstringDisplay name shown in the UI.
description:optionalstringDescription of the custom property.
default_value:optionalstring[]Default value(s) for the property.
validation_rules:optionalobjectValidation rules applied to property values.
is_required:optionalbooleanWhether this property is required when creating work items.
is_active:optionalbooleanWhether this property is currently active.
is_multi:optionalbooleanWhether this property allows multiple values.
options:optionalobject[]Array of option objects for OPTION type properties. This field can be used while creating a property with type OPTION to set options on the custom property during creation itself. Each option object can contain:
name(string): Name of the optiondescription(string): Description of the optionis_active(boolean): Whether the option is activesort_order(number): Sort order for the optionparent(string): Parent option ID for hierarchical optionsis_default(boolean): Whether this is the default optionlogo_props(object): Logo properties for the option
To add or update options on an OPTION property after creation, you can use the APIs from issue-types/options/add-dropdown-options.
curl -X POST \
"https://api.plane.so/api/v1/workspaces/my-workspace/projects/project-uuid/work-item-types/{type_id}/work-item-properties/" \
-H "X-API-Key: $PLANE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"display_name": "example-display_name",
"description": "example-description",
"default_value": "example-default_value",
"validation_rules": "example-validation_rules",
"is_required": true,
"is_active": true,
"is_multi": true,
"options": "example-options"
}'import requests
response = requests.post(
"https://api.plane.so/api/v1/workspaces/my-workspace/projects/project-uuid/work-item-types/{type_id}/work-item-properties/",
headers={"X-API-Key": "your-api-key"},
json={
'display_name': 'example-display_name',
'description': 'example-description',
'default_value': 'example-default_value',
'validation_rules': 'example-validation_rules',
'is_required': true,
'is_active': true,
'is_multi': true,
'options': 'example-options'
}
)
print(response.json())const response = await fetch(
'https://api.plane.so/api/v1/workspaces/my-workspace/projects/project-uuid/work-item-types/{type_id}/work-item-properties/',
{
method: 'POST',
headers: {
'X-API-Key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
display_name: 'example-display_name',
description: 'example-description',
default_value: 'example-default_value',
validation_rules: 'example-validation_rules',
is_required: true,
is_active: true,
is_multi: true,
options: 'example-options',
}),
},
);
const data = await response.json();{
"id": "project-uuid",
"name": "Project Name",
"identifier": "PROJ",
"description": "Project description",
"created_at": "2024-01-01T00:00:00Z"
}
