이 가이드는 API 명세를 기반으로 자동 생성했습니다.
Classic/VPC 환경에서 이용 가능합니다.
Ncloud API 표준 규격을 적용한 API입니다.
호출한 계정을 마스터 계정으로 하는 Organization을 생성합니다.
- 어떤 Organization에도 소속되지 않은 사업자 계정만 생성할 수 있습니다.
- Organization 이름은 마스터 계정의 사용자 이름으로 설정됩니다.
- 생성과 함께 마스터 계정 이름의 최상위 계정 그룹과 기본 Quota Policy(
Organization_Default_Policy)가 만들어집니다. - 매월 1일 00시 00분부터 2일 23시 59분까지는 생성할 수 없습니다.
요청
요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.
| 메서드 | URI |
|---|---|
| POST | /open-api/v2/organizations |
요청 헤더
Organization API에서 공통으로 사용하는 헤더에 대한 정보는 Organization 요청 헤더를 참조해 주십시오.
요청 바디
요청 바디에 대한 설명은 다음과 같습니다.
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
description |
String | Optional | Organization 설명
|
요청 예시
요청 예시는 다음과 같습니다.
curl --location --request POST 'https://organization.apigw.ntruss.com/open-api/v2/organizations' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json'
응답
응답 형식을 설명합니다.
응답 바디
응답 바디에 대한 설명은 다음과 같습니다.
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
no |
Integer (int32) | Required | Organization 번호
|
name |
String | Required | Organization 이름. 마스터 계정의 사용자 이름으로 설정 (마스터 계정과 Organization에 소속된 멤버 계정에게만 노출)
|
description |
String | null | Optional | Organization 설명. 설명 없이 생성한 Organization은 null
|
masterMemberNo |
Integer (int64) | Required | 마스터 계정 회원 번호
|
masterMemberName |
String | Required | 마스터 계정 사용자 이름 (마스터 계정과 Organization에 소속된 멤버 계정에게만 노출)
|
masterMemberEmailAddress |
String (email) | Required | 마스터 계정 사용자 메일 주소 (마스터 계정과 Organization에 소속된 멤버 계정에게만 노출)
|
callerMembership |
Object | Required | 호출한 계정의 소속 정보. 호출한 계정에 따라 값이 다름
|
callerMembership.masterMember |
Boolean | Required | 호출한 계정의 마스터 계정 여부
|
callerMembership.memberNo |
Integer (int64) | Required | 호출한 계정의 회원 번호
|
callerMembership.memberStatus |
String | Required | 호출한 계정의 계정 상태
|
callerMembership.joinedDateTime |
String (date-time) | Required | 가입 일시(UTC). 호출한 계정이 Organization에 등록된 일시
|
응답 상태 코드
호출에 실패하면 기본 오류 응답 형식의 응답 바디를 반환하며, 오류 코드는 error.errorCode 값입니다.
응답 상태 코드에 대한 설명은 다음과 같습니다.
| HTTP 상태 코드 | 코드 | 메시지 | 설명 |
|---|---|---|---|
| 201 | - | - | Organization 생성 완료 |
| 400 | BadRequest |
The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. |
요청 바디가 JSON 형식이 아닌 경우. 요청 바디를 확인한 뒤 다시 요청 |
| 400 | InvalidParameter |
The specified parameter is invalid. |
description이 문자열이 아니거나 1000자를 넘는 경우. 요청 바디의 필드 값을 확인한 뒤 다시 요청 |
| 400 | InvalidState |
The request cannot be processed in the current state. |
이용 제한 시간(매월 1일 00시 00분~2일 23시 59분)에 요청한 경우. 매월 3일 00시 이후 다시 요청 |
| 402 | PaymentRequired |
Payment is required to process this request. Check your billing status. |
결제 수단이 등록되지 않았거나 미납된 서비스 이용 요금이 있는 경우. 결제 수단을 등록하거나 미납 요금을 납부한 뒤 다시 요청 |
| 403 | AccessDenied |
The request was denied by an access policy. |
사업자 회원이 아니거나 민간 회원이 아닌 계정으로 호출한 경우. 사업자 회원으로 전환하거나 민간 회원 계정의 인증 정보로 다시 요청 |
| 403 | Forbidden |
You do not have sufficient permissions to perform this action. |
서브 계정으로 호출했는데 이 API를 호출할 권한이 없는 경우. 서브 계정에 필요한 권한을 부여한 뒤 다시 요청 |
| 409 | Conflict |
The request could not be processed because of a conflict in the current status of the resource. |
이미 다른 Organization에 가입한 계정인 경우 가입한 Organization에서 탈퇴한 뒤 다시 요청. 파트너 회원 체결·탈퇴나 파트너 코드 변경이 예정된 계정인 경우 예정된 변경이 끝난 뒤 다시 요청. |
| 415 | UnsupportedMediaType |
The content type of the request body is not supported. |
요청 바디의 Content-Type이 application/json이 아닌 경우. Content-Type: application/json을 지정해 다시 요청 |
| 500 | InternalServerError |
The request processing has failed because of an unknown error, exception, or failure. |
Organization을 생성하는 중 오류가 발생한 경우. 잠시 후 다시 요청 |
| 502 | BadGateway |
The server received an invalid response from an upstream service. Retry your request later. |
서브 계정의 권한을 확인하지 못한 경우. 잠시 후 다시 요청 |
참고
Organization API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 Organization 응답 상태 코드를 참조해 주십시오.
응답 예시
응답 예시는 다음과 같습니다.
{
"no": 2706,
"name": "홍길동",
"description": "개발본부 계정의 비용 통합 결제와 이용 한도 관리",
"masterMemberNo": 2600001,
"masterMemberName": "홍길동",
"masterMemberEmailAddress": "master@example.com",
"callerMembership": {
"masterMember": true,
"memberNo": 2600001,
"memberStatus": "JOINED",
"joinedDateTime": "2025-02-02T23:44:53.024Z"
}
}