---
title: "Connected ID (account_link_id) 인증서 연동 해제"
method: POST
path: "/v1/credentials/{account_link_id}/unlink"
tags: ["CredentialUnlink"]
---

# Connected ID (account_link_id) 인증서 연동 해제

`POST /v1/credentials/{account_link_id}/unlink`

## Request

- Base URL: `https://api.xdata.kr` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xdata.kr/v1/credentials/{account_link_id}/unlink`
- Auth: one of:
  - HTTP basic
  - OAuth 2 (authorization code, authorization URL `https://api.xdata.kr/oauth/authorize`, token URL `https://api.xdata.kr/oauth/token`)

`POST /v1/credentials/{account_link_id}/unlink` 연결 해제 단일 진입점.

JWT(console_user) 또는 desktop_agent client_credential 로 호출한다.
정책 평가 + user_credentials
UPDATE (ACTIVE -> INACTIVE) + GCS cert/key 삭제 + `account_link.unlinked`
audit 단일 트랜잭션.

응답 분기:
    - 정상 해제                              -> 200 OK + 3필드 envelope
    - 정책 거부 (AuthPolicyError)            -> 401/402/403/422/429
    - Service 거부 (AccountLinkUnlinkError)  -> 8 error_code 정밀 매핑
    - ValueError (account_link_id 형식 등)   -> 400 VALIDATION_INVALID_FIELD
    - 그 외 예외                              -> 500 INTERNAL_ERROR

## Path parameters

- `account_link_id` string, required

## Query parameters

- `env_scope` 'production' | 'real_test' | 'sandbox', nullable: 환경을 고릅니다. 값은 production · real_test · sandbox 중 하나입니다. 경로 접두(/v1/sandbox/... · /v1/test/... · /v1/production/...) · X-Env-Scope 헤더 · env_scope 쿼리 가운데 한 통로로 반드시 보내야 합니다. 빼면 자동으로 채우지 않고 거절하며, 두 통로에 서로 다른 값을 담아도 거절합니다. 거절은 HTTP 422 이고 오류 코드는 VALIDATION_ENV_SCOPE_MISMATCH 입니다.

## Headers

- `User-Agent` string, nullable
- `X-Env-Scope` 'production' | 'real_test' | 'sandbox', nullable: 환경을 고릅니다. 값은 production · real_test · sandbox 중 하나입니다. 경로 접두(/v1/sandbox/... · /v1/test/... · /v1/production/...) · X-Env-Scope 헤더 · env_scope 쿼리 가운데 한 통로로 반드시 보내야 합니다. 빼면 자동으로 채우지 않고 거절하며, 두 통로에 서로 다른 값을 담아도 거절합니다. 거절은 HTTP 422 이고 오류 코드는 VALIDATION_ENV_SCOPE_MISMATCH 입니다.

## Request body

- CredentialUnlinkRequest: `POST /v1/credentials/{account_link_id}/unlink` 요청 본문.
  - `unlink_reason` string, nullable: 폐기 사유 enum: user_request / admin_action / security_incident. None -> user_request (console_user v1 default).

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xdata/apis/xboss-api.md) · [All operations](https://skmtc.dev/xdata/apis/xboss-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xdata/apis/xboss-api/revisions/816de78950db?raw)
