Create a customer property ​
POST/api/v1/workspaces/{workspace_slug}/customer-properties/
Creates a new customer property definition in a workspace.
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.
Body Parameters ​
name:optionalstringName of the property.
display_name:optionalstringDisplay name of the property.
description:optionalstringDescription of the property.
property_type:optionalstringType of the property.
relation_type:optionalstringRelation type of the property.
is_required:optionalbooleanWhether the property is required.
is_multi:optionalbooleanWhether the property supports multiple values.
is_active:optionalbooleanWhether the property is active.
sort_order:optionalnumberSort order for the property.
default_value:optionalstring[]Default values for the property.
settings:optionalobjectSettings for the property.
validation_rules:optionalobjectValidation rules for the property.
logo_props:optionalobjectLogo properties for the property.
external_source:optionalstringExternal source identifier.
external_id:optionalstringExternal ID from the external source.
Create a customer property
bash
curl -X POST \
"https://api.plane.so/api/v1/workspaces/my-workspace/customer-properties/" \
-H "X-API-Key: $PLANE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example-name",
"display_name": "example-display_name",
"description": "example-description",
"property_type": "example-property_type",
"relation_type": "example-relation_type",
"is_required": true,
"is_multi": true,
"is_active": true,
"sort_order": 1,
"default_value": "example-default_value",
"settings": "example-settings",
"validation_rules": "example-validation_rules",
"logo_props": "example-logo_props",
"external_source": "example-external_source",
"external_id": "example-external_id"
}'python
import requests
response = requests.post(
"https://api.plane.so/api/v1/workspaces/my-workspace/customer-properties/",
headers={"X-API-Key": "your-api-key"},
json={
'name': 'example-name',
'display_name': 'example-display_name',
'description': 'example-description',
'property_type': 'example-property_type',
'relation_type': 'example-relation_type',
'is_required': true,
'is_multi': true,
'is_active': true,
'sort_order': 1,
'default_value': 'example-default_value',
'settings': 'example-settings',
'validation_rules': 'example-validation_rules',
'logo_props': 'example-logo_props',
'external_source': 'example-external_source',
'external_id': 'example-external_id'
}
)
print(response.json())javascript
const response = await fetch('https://api.plane.so/api/v1/workspaces/my-workspace/customer-properties/', {
method: 'POST',
headers: {
'X-API-Key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'example-name',
display_name: 'example-display_name',
description: 'example-description',
property_type: 'example-property_type',
relation_type: 'example-relation_type',
is_required: true,
is_multi: true,
is_active: true,
sort_order: 1,
default_value: 'example-default_value',
settings: 'example-settings',
validation_rules: 'example-validation_rules',
logo_props: 'example-logo_props',
external_source: 'example-external_source',
external_id: 'example-external_id',
}),
});
const data = await response.json();Response201
json
{
"id": "resource-uuid",
"created_at": "2024-01-01T00:00:00Z"
}
