레코드 일괄 삭제
/crm-core/v1/records/bulk/delete여러 레코드를 1회 요청으로 일괄 삭제합니다. 기본은 소프트 삭제(휴지통 이동)이며 permanent: true로 영구 삭제 가능합니다. 한 번에 최대 1000개. MEMBER 이상 권한이 필요합니다.
Body Params
Response
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/bulk/delete', {
method: 'POST',
headers: { 'Authorization': authHeader, 'Content-Type': 'application/json' },
body: JSON.stringify({
"recordIds": [
"CRMRC1260423081530123REC11122233"
],
"permanent": false
})
});
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.post('https://api.solapi.com/crm-core/v1/records/bulk/delete', headers={
'Authorization': auth_header,
'Content-Type': 'application/json'
}, json={
"recordIds": [
"CRMRC1260423081530123REC11122233"
],
"permanent": False
})
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 POST 'https://api.solapi.com/crm-core/v1/records/bulk/delete' \
-H "Authorization: ${AUTH}" \
-H "Content-Type: application/json" \
-d '{"recordIds": ["CRMRC1260423081530123REC11122233"], "permanent": false}'
`permanent: true`는 되돌릴 수 없습니다. 관련 활동·이벤트 요약·관계도 함께 제거됩니다. 프로덕션 환경에서는 기본값(false)로 휴지통에 보관 후 필요 시 GC에 맡기는 것을 권장합니다.
**401 응답**: `{ "errorCode": "Unauthorized", "errorMessage": "권한이 없습니다." }`