Create a customer property ​
POST/api/v1/workspaces/{slug}/customer-properties/
Create a new customer property in the specified workspace.
Path Parameters ​
slug:requiredstringSlug.
Body Parameters ​
display_name:requiredstringDisplay name.
description:optionalstringDescription.
logo_props:optionalobjectLogo props.
sort_order:optionalnumberSort order.
property_type:requiredstringTEXT- TextDATETIME- DatetimeDECIMAL- DecimalBOOLEAN- BooleanOPTION- OptionRELATION- RelationURL- URLEMAIL- EmailFILE- File
relation_type:optionalstringISSUE- IssueUSER- User
is_required:optionalbooleanIs required.
default_value:optionalarrayDefault value.
settings:optionalobjectSettings.
is_active:optionalbooleanIs active.
is_multi:optionalbooleanIs multi.
validation_rules:optionalobjectValidation rules.
external_source:optionalstringExternal source.
external_id:optionalstringExternal id.
created_by:optionalstringCreated by.
updated_by:optionalstringUpdated by.
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" \
-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
}
