API

속성 수정

작성일 2026.03.24 | 수정일 2026.04.29

PATCH/crm-core/v1/properties/{propertyId}

속성의 이름·설명·필드 유형·옵션·마스킹·키 등을 부분 업데이트합니다. 전달된 필드만 갱신됩니다. OWNER 전용 권한이 필요합니다.

Path Params

NameTypeRequiredDescription
propertyIdstring*수정할 속성의 고유 ID

Body Params

NameTypeRequiredDescription
namestring속성 이름
descriptionstring속성 설명
fieldTypestring필드 유형 (주의: 기존 레코드 데이터와 호환되지 않는 타입 변경은 데이터 손실 유발 가능)
propertyGroupIdstring | null속성 그룹 ID (null 전달 시 그룹 해제)
keystring | null속성 키 (영문 시작, 최대 63자, 예약어 불가). 빈 문자열·null 전달 시 키 제거
isMaskedboolean마스킹 여부
optionsarray선택 옵션 목록 (전체 교체)
labelstring*옵션 레이블
valuestring*옵션 저장 값
prioritynumber*우선순위

Response

업데이트된 전체 속성 객체. 구조는 속성 조회 응답과 동일합니다 (workspaceId, createdBy 포함).

Structure

코드 예제

const crypto = require('crypto');

const apiKey = 'NCSXXXXXXXXXXXXX';
const apiSecret = 'YOUR_API_SECRET';
const dateTime = new Date().toISOString();
const salt = crypto.randomBytes(16).toString('hex');
const signature = crypto.createHmac('sha256', apiSecret).update(dateTime + salt).digest('hex');
const authHeader = HMAC-SHA256 apiKey=${apiKey}, date=${dateTime}, salt=${salt}, signature=${signature};

const response = await fetch('https://api.solapi.com/crm-core/v1/properties/CRMPP1260423091530123PPP11122233', {
method: 'PATCH',
headers: { 'Authorization': authHeader, 'Content-Type': 'application/json' },
body: JSON.stringify({
"name": "영업 단계",
"options": [
{
"label": "리드",
"value": "LEAD",
"priority": 1
},
{
"label": "계약완료",
"value": "CLOSED_WON",
"priority": 2
}
]
})
});
const data = await response.json();

import hmac, hashlib, secrets, requests
from datetime import datetime, timezone

api_key = 'NCSXXXXXXXXXXXXX'
api_secret = 'YOUR_API_SECRET'
date_time = datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%SZ')
salt = secrets.token_hex(16)
signature = hmac.new(api_secret.encode(), (date_time + salt).encode(), hashlib.sha256).hexdigest()
auth_header = f'HMAC-SHA256 apiKey={api_key}, date={date_time}, salt={salt}, signature={signature}'

response = requests.patch('https://api.solapi.com/crm-core/v1/properties/CRMPP1260423091530123PPP11122233', headers={
'Authorization': auth_header,
'Content-Type': 'application/json'
}, json={
"name": "영업 단계",
"options": [
{
"label": "리드",
"value": "LEAD",
"priority": 1
},
{
"label": "계약완료",
"value": "CLOSED_WON",
"priority": 2
}
]
})
data = response.json()

API_KEY="NCSXXXXXXXXXXXXX"
API_SECRET="YOUR_API_SECRET"
DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
SALT=$(openssl rand -hex 16)
SIGNATURE=$(echo -n "${DATE}${SALT}" | openssl dgst -sha256 -hmac "${API_SECRET}" | awk '{print $NF}')
AUTH="HMAC-SHA256 apiKey=${API_KEY}, date=${DATE}, salt=${SALT}, signature=${SIGNATURE}"

curl -X PATCH 'https://api.solapi.com/crm-core/v1/properties/CRMPP1260423091530123PPP11122233' \
-H "Authorization: ${AUTH}" \
-H "Content-Type: application/json" \
-d '{"name": "영업 단계", "options": [{"label": "리드", "value": "LEAD", "priority": 1}, {"label": "계약완료", "value": "CLOSED_WON", "priority": 2}]}'

lightbulb

**타입 변경 주의**: `fieldType`을 바꾸면 기존 레코드에 저장된 값이 새 타입과 호환되지 않을 수 있습니다(예: NUMBER → TEXT는 안전, TEXT → NUMBER는 파싱 실패 시 데이터 손실 가능). 프로덕션 환경에서는 새 속성 생성 + 마이그레이션을 권장합니다.

lightbulb

`options` 배열은 **전체 교체**됩니다. 기존 옵션을 유지하면서 한두 개만 추가하려면 먼저 현재 값을 조회한 뒤 병합해서 보내세요.

lightbulb

**401 응답**: `{ "errorCode": "Unauthorized", "errorMessage": "권한이 없습니다." }`