@@ -4,7 +4,6 @@ description: Create a customer property via Plane API. HTTP POST request format,
44keywords : plane, plane api, rest api, api integration, customers, crm, customer management
55---
66
7-
87# Create a customer property
98
109<div class =" api-endpoint-badge " >
@@ -195,33 +194,30 @@ print(response.json())
195194<template #javascript>
196195
197196``` javascript
198- const response = await fetch (
199- " https://api.plane.so/api/v1/workspaces/my-workspace/customer-properties/" ,
200- {
201- method: " POST" ,
202- headers: {
203- " X-API-Key" : " your-api-key" ,
204- " Content-Type" : " application/json"
205- },
206- body: JSON .stringify ({
207- " name" : " example-name" ,
208- " display_name" : " example-display_name" ,
209- " description" : " example-description" ,
210- " property_type" : " example-property_type" ,
211- " relation_type" : " example-relation_type" ,
212- " is_required" : true ,
213- " is_multi" : true ,
214- " is_active" : true ,
215- " sort_order" : 1 ,
216- " default_value" : " example-default_value" ,
217- " settings" : " example-settings" ,
218- " validation_rules" : " example-validation_rules" ,
219- " logo_props" : " example-logo_props" ,
220- " external_source" : " example-external_source" ,
221- " external_id" : " example-external_id"
222- })
223- }
224- );
197+ const response = await fetch (" https://api.plane.so/api/v1/workspaces/my-workspace/customer-properties/" , {
198+ method: " POST" ,
199+ headers: {
200+ " X-API-Key" : " your-api-key" ,
201+ " Content-Type" : " application/json" ,
202+ },
203+ body: JSON .stringify ({
204+ name: " example-name" ,
205+ display_name: " example-display_name" ,
206+ description: " example-description" ,
207+ property_type: " example-property_type" ,
208+ relation_type: " example-relation_type" ,
209+ is_required: true ,
210+ is_multi: true ,
211+ is_active: true ,
212+ sort_order: 1 ,
213+ default_value: " example-default_value" ,
214+ settings: " example-settings" ,
215+ validation_rules: " example-validation_rules" ,
216+ logo_props: " example-logo_props" ,
217+ external_source: " example-external_source" ,
218+ external_id: " example-external_id" ,
219+ }),
220+ });
225221const data = await response .json ();
226222```
227223
0 commit comments