API

레코드 삭제

작성일 2026.03.24 | 수정일 2026.04.28

DELETE/crm-core/v1/records/{recordId}

레코드를 휴지통으로 이동(소프트 삭제)합니다. 삭제된 레코드는 14일간 휴지통에 보관되며 POST /crm-core/v1/records/{recordId}/restore로 복원할 수 있습니다. 관련 활동·이벤트·관계는 즉시 삭제되지 않으며, 레코드 복원 시 함께 복구됩니다. MEMBER 이상 권한이 필요합니다.

Path Params

NameTypeRequiredDescription
recordIdstring*삭제할 레코드의 고유 ID

Response

NameTypeRequiredDescription
recordIdstring*삭제 처리된 레코드 ID
entityIdstring*소속 개체 ID

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/records/CRMRC1260423081530123REC11122233', {
method: 'DELETE',
headers: { 'Authorization': authHeader, 'Content-Type': 'application/json' }
});
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.delete('https://api.solapi.com/crm-core/v1/records/CRMRC1260423081530123REC11122233', headers={
'Authorization': auth_header,
'Content-Type': 'application/json'
})
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 DELETE 'https://api.solapi.com/crm-core/v1/records/CRMRC1260423081530123REC11122233' \
-H "Authorization: ${AUTH}" \
-H "Content-Type: application/json"

lightbulb

**휴지통 정책**: 삭제된 레코드는 **14일** 후 GC(Garbage Collection)에 의해 영구 삭제됩니다. 복원하려면 14일 이내에 `POST /crm-core/v1/records/{recordId}/restore`를 호출하세요.

lightbulb

대량 삭제는 `POST /crm-core/v1/records/bulk/delete` 엔드포인트를 사용하세요. `recordIds` 배열로 한 번에 최대 1000건 처리 가능합니다.

lightbulb

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