Create a customer property
POST/api/v1/workspaces/{workspace_slug}/customer-properties/
Create a new customer property in the specified workspace.
Path parameters
workspace_slug:requiredstringThe workspace slug. It appears in your Plane URLs. In https://app.plane.so/my-team/projects/, the slug is my-team.
Body parameters
display_name:requiredstringThe property's display name.
description:optionalstringThe property's description.
logo_props:optionalobjectLogo settings used by the Plane editor.
sort_order:optionalnumberPosition used for manual ordering.
property_type:requiredstringTEXT- TextDATETIME- DatetimeDECIMAL- DecimalBOOLEAN- BooleanOPTION- OptionRELATION- RelationURL- URLEMAIL- EmailFILE- File
relation_type:optionalstringISSUE- IssueUSER- User
is_required:optionalbooleanWhether a value is required for this property.
default_value:optionalarrayThe property's default value.
settings:optionalobjectThe property's settings.
is_active:optionalbooleanWhether the property is active.
is_multi:optionalbooleanWhether the property accepts more than one value.
validation_rules:optionalobjectThe property's validation rules.
external_source:optionalstringThe system external_id came from, for example github or jira.
external_id:optionalstringYour system's identifier for this record, for sync and import correlation.
created_by:optionalstringID of the user who created the property.
updated_by:optionalstringID of the user who last updated the property.
Scopes
customers.properties:write
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" \
# Or use -H "Authorization: Bearer $PLANE_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"display_name": "Example Name",
"description": "Example description",
"logo_props": "example-value",
"sort_order": 1,
"property_type": "TEXT",
"relation_type": "ISSUE",
"is_required": true,
"default_value": [
"Example Name"
],
"settings": "example-value",
"is_active": true,
"is_multi": true,
"validation_rules": "example-value",
"external_source": "github",
"external_id": "550e8400-e29b-41d4-a716-446655440000",
"created_by": "550e8400-e29b-41d4-a716-446655440000",
"updated_by": "550e8400-e29b-41d4-a716-446655440000"
}'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={
"display_name": "Example Name",
"description": "Example description",
"logo_props": "example-value",
"sort_order": 1,
"property_type": "TEXT",
"relation_type": "ISSUE",
"is_required": true,
"default_value": [
"Example Name"
],
"settings": "example-value",
"is_active": true,
"is_multi": true,
"validation_rules": "example-value",
"external_source": "github",
"external_id": "550e8400-e29b-41d4-a716-446655440000",
"created_by": "550e8400-e29b-41d4-a716-446655440000",
"updated_by": "550e8400-e29b-41d4-a716-446655440000"
}
)
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({
display_name: "Example Name",
description: "Example description",
logo_props: "example-value",
sort_order: 1,
property_type: "TEXT",
relation_type: "ISSUE",
is_required: true,
default_value: ["Example Name"],
settings: "example-value",
is_active: true,
is_multi: true,
validation_rules: "example-value",
external_source: "github",
external_id: "550e8400-e29b-41d4-a716-446655440000",
created_by: "550e8400-e29b-41d4-a716-446655440000",
updated_by: "550e8400-e29b-41d4-a716-446655440000",
}),
},
);
const data = await response.json();Response201
json
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"name": "Example Name",
"display_name": "Example Name",
"description": "Example description",
"property_type": "TEXT",
"deleted_at": "2024-01-01T00:00:00Z",
"logo_props": "example-value",
"sort_order": 1,
"relation_type": "ISSUE",
"is_required": true
}
