--- title: "서브 계정 생성" slug: "management-subaccount-createsubaccount" tags: ["Sub Account"] updated: 2026-09-17T09:16:41Z published: 2026-09-17T09:16:41Z canonical: "api.ncloud-docs.com/management-subaccount-createsubaccount" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # 서브 계정 생성 Classic/VPC 환경에서 이용 가능합니다. 서브 계정을 생성합니다. 서브 계정을 생성하면 계정별 권한 설정이 가능하여 안전하고 안정적으로 서비스를 운영할 수 있습니다. 참고 서브 계정은 최대 500개까지 생성할 수 있습니다. ## 요청 요청 형식을 설명합니다. 요청 형식은 다음과 같습니다. | 메서드 | URI | | --- | --- | | POST | /api/v1/sub-accounts | ### 요청 헤더 Sub Account API에서 공통으로 사용하는 헤더에 대한 정보는 [Sub Account 요청 헤더](/docs/management-subaccount#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94)를 참조해 주십시오. ### 요청 바디 요청 바디에 대한 설명은 다음과 같습니다. | 필드 | 타입 | 필수 여부 | 설명 | | --- | --- | --- | --- | | `apiAllowSources` | Array | Optional | 서브 계정의 API 접근 가능 소스 목록: [apiAllowSources](/docs/management-subaccount-createsubaccount#apiAllowSources) | | `canAPIGatewayAccess` | Boolean | Required | 서브 계정의 API Gateway 접근 가능 여부 - Access Key를 생성하여 API Gateway에 등록된 API 사용 가능 여부 - `true` \| `false` - `true`: 가능 - `false`: 불가 | | `canConsoleAccess` | Boolean | Required | 서브 계정의 콘솔 접근 가능 여부 - `true` \| `false` - `true`: 가능 - `false`: 불가 | | `consolePermitIps` | Array | Optional | 서브 계정의 콘솔 접근 가능 IP 대역 목록 | | `email` | String | Optional | 서브 계정 사용자 메일 주소 - 6~100자 | | `isMfaMandatory` | Boolean | Optional | 서브 계정의 2차 인증 필수 여부 - `true` \| `false` (기본값) - `true`: 필수 - `false`: 선택 | | `loginId` | String | Required | 서브 계정 로그인 아이디 - 영어 대문자, 소문자, 숫자, 특수문자 '.', '@', '-', '_'를 조합하여 3~60자 이내로 입력 - 첫 글자는 영어 대소문자 - [서브 계정 로그인 아이디 중복 확인](/docs/management-subaccount-checkloginid)을 통해 아이디 중복 여부 확인 가능 | | `memo` | String | Optional | 서브 계정에 대한 설명(Byte) - 0~300 | | `name` | String | Required | 서브 계정 사용자 이름 - 2~30자 | | `needPasswordGenerate` | Boolean | Optional | 서브 계정 로그인 비밀번호 생성 방식 - `true` \| `false` (기본값) - `true`: 자동 생성 - `false`: 직접 입력 | | `needPasswordReset` | Boolean | Required | 서브 계정 로그인 비밀번호 재설정 알림 여부 - 서브 계정으로 최초 로그인 시 비밀번호 변경 안내 여부 - `true` \| `false` - `true`: 알림 - `false`: 알림 안 함 | | `password` | String | Conditional | 서브 계정 로그인 비밀번호 - `needPasswordGenerate`가 `false`인 경우 반드시 입력 - 영어 대문자, 소문자, 숫자, 특수문자를 조합하여 8~16자 이내로 입력 - [로그인 비밀번호 체크](/docs/management-subaccount-checkpassword)를 통해 비밀번호 유효성 확인 가능 | | `useApiAllowSource` | Boolean | Optional | 서브 계정의 API 접근 가능 소스 제한 여부 - `true` \| `false` - `true`: 지정한 소스에서만 접근 가능 - `false`: 모든 소스에서 접근 가능 | | `useConsolePermitIp` | Boolean | Optional | 서브 계정의 콘솔 접근 가능 IP 대역 제한 여부 - `true` \| `false` - `true`: 지정한 IP 대역에서만 접근 가능 - `false`: 모든 곳에서 접근 가능 | | `tags` | Map | Optional | 서브 계정의 태그 - 리소스당 최대 20개 - [key, value 제약 조건](/docs/management-resourcemanager-attachtag) 참조 | #### `apiAllowSources` `apiAllowSources`에 대한 설명은 다음과 같습니다. | 필드 | 타입 | 필수 여부 | 설명 | | --- | --- | --- | --- | | `type` | String | Conditional | 접근 소스 유형 - `IP` \| `VPC` \| `VPC_SERVER` - `IP`: 서버 단일 IP 또는 서브넷을 포함한 IP 대역 - `VPC`: 사용 중인 VPC - `VPC_SERVER`: 사용 중인 VPC 환경의 서버 | | `source` | String | Conditional | 접근 소스 정보 - IP 주소 또는 인스턴스 번호 입력 | ### 요청 예시 요청 예시는 다음과 같습니다. ``` curl --location --request POST 'https://subaccount.apigw.ntruss.com/api/v1/sub-accounts' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "apiAllowSources": [ { "type": "IP", "source": "***.***.***.***" } ], "canAPIGatewayAccess": true, "canConsoleAccess": true, "consolePermitIps": [ "***.***.***.***" ], "email": "email@ncloud.com", "isMfaMandatory": false, "loginId": "testuser33", "memo": "testuser account", "name": "userts3", "needPasswordGenerate": true, "needPasswordReset": true, "useApiAllowSource": true, "useConsolePermitIp": true, "tags": { "env": "dev", "team": "a" } }' ``` ## 응답 응답 형식을 설명합니다. ### 응답 바디 응답 바디에 대한 설명은 다음과 같습니다. | 필드 | 타입 | 필수 여부 | 설명 | | --- | --- | --- | --- | | `id` | String | - | 서브 계정 아이디 | | `success` | Boolean | - | API 호출 성공 여부 - `true` \| `false` - `true`: 성공 - `false`: 실패 | | `generatedPassword` | String | - | 서브 계정 비밀번호 - `needPasswordGenerate`가 `true`인 경우 표시 | ### 응답 상태 코드 Sub Account API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 [Sub Account 응답 상태 코드](/docs/management-subaccount#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C)를 참조해 주십시오. ### 응답 예시 응답 예시는 다음과 같습니다. ``` { "id": "e60b75d0-****-****-****-***********", "success": true, "generatedPassword": "*****************" } ```