단체
이 플러그인의 설치 단계와 전체 마크다운 가이드를 포함한 설정 명령어를 복사하세요.
Organizations are the top-level entities in Capgo. They allow you to group apps, team members, and resources under a single umbrella. Each organization can have multiple members with different roles and permissions.
__CAPGO_KEEP_0__
Section titled “공통 사용 사례”- __CAPGO_KEEP_0__를 위한 새로운 회사에 대한 조직을 생성합니다.
- __CAPGO_KEEP_0__의 설정을 관리합니다.
- __CAPGO_KEEP_0__의 정보를 업데이트합니다.
- __CAPGO_KEEP_0__의 세부 정보를 가져옵니다.
__CAPGO_KEEP_1__
Section titled “__CAPGO_KEEP_1__”__CAPGO_KEEP_2__
Section titled “__CAPGO_KEEP_2__”https://api.capgo.app/organization/
__CAPGO_KEEP_3__의 정보를 가져옵니다. __CAPGO_KEEP_4__이 매개 변수에 제공된 경우, 단일 조직을 반환합니다. 그렇지 않으면, 접근 가능한 모든 조직을 반환합니다. orgId __CAPGO_KEEP_4__ 매개 변수입니다.
__CAPGO_KEEP_5__
Section titled “Query Parameters”orgId(optional): __CAPGO_KEEP_0__의 ID를 지정하여 특정 조직을 검색합니다.
Response Type
Section titled “Response Type”interface Organization { id: string created_by: string created_at: string updated_at: string logo: string | null name: string management_email: string customer_id: string | null}Example Request
Section titled “Example Request”# Get all organizationscurl -H "x-api-key: YOUR_API_KEY" https://api.capgo.app/organization/
# Get specific organizationcurl -H "x-api-key: YOUR_API_KEY" https://api.capgo.app/organization/?orgId=org_123Example Response
Section titled “Example Response”{ "data": { "id": "org_123", "name": "My Company", "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "logo": "https://example.com/logo.png", "management_email": "admin@example.com", "customer_id": "cus_123" }}https://api.capgo.app/organization/
새로운 조직을 만들기
API 키를 사용할 때, 키는 글로벌 권한과 현재 조직 범위의 org.create 또는 org_admin 권한이 있어야 합니다. 이는 대상 조직이 아직 존재하지 않기 때문에 일반 조직 범위의 RBAC를 대상 조직에 대해 확인할 수 없기 때문입니다. org_super_admin __CAPGO_KEEP_0__ 요청이 성공하면 __CAPGO_KEEP_1__ 키를 자동으로 새로운 조직에 할당합니다.
When the request succeeds, Capgo automatically assigns the same API key as org_super_admin 주의
__CAPGO_KEEP_1__
__CAPGO_KEEP_1__를 클립보드에 복사합니다.interface OrganizationCreate { name: string email?: string estimatedMau?: number website?: string}__CAPGO_KEEP_2__
터미널 창curl -X POST \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "New Organization", "email": "admin@example.com", "website": "https://example.com" }' \ https://api.capgo.app/organization/예시 응답
__CAPGO_KEEP_4__{ "id": "org_456"}권한 오류
권한 오류 섹션API 키가 없으면 org.create, API은:
{ "error": "permission_denied"}PUT
PUT 섹션https://api.capgo.app/organization/
기존 조직을 업데이트합니다. 대상 조직에 관리자 권한이 필요합니다.
요청 본문
요청 본문 섹션interface OrganizationUpdate { orgId: string logo?: string name?: string management_email?: string}예시 요청
예시 요청 섹션curl -X PUT \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "orgId": "org_123", "name": "New Company Name", "management_email": "newemail@example.com" }' \ https://api.capgo.app/organization/예시 응답
예시 응답 섹션{ "status": "Organization updated", "data": { "id": "org_123", "name": "New Company Name", "management_email": "newemail@example.com" }}DELETE
DELETE 섹션https://api.capgo.app/organization/
기존 조직을 삭제합니다. 대상 조직에 대한 삭제 권한이 필요하며, 일반적으로 역할을 통해 얻을 수 있습니다. 이 작업은 irreversible하고 모든 관련 앱, 버전, 및 리소스를 삭제합니다. org_super_admin The
역할을 통해 얻을 수 있습니다. org.create 전역 권한이 조직 삭제를 허용하지 않습니다.
Query Parameters
Query Parameters 섹션orgId: 삭제할 조직의 ID
예제 요청
예제 요청 섹션curl -X DELETE \ -H "x-api-key: YOUR_API_KEY" \ https://api.capgo.app/organization/?orgId=org_123예제 응답
예제 응답 섹션{ "status": "ok"}오류 처리
에러 처리일반적인 오류 상황과 그에 대한 대응:
// Invalid API key{ "error": "Invalid API key", "status": "KO"}
// Missing required field{ "error": "Name is required", "status": "KO"}
// Insufficient permissions{ "error": "Admin role required", "status": "KO"}최선의 방법
최선의 방법 섹션- 이름: 조직에 대한 명확하고 설명적인 이름을 사용하십시오.
- 역할: 팀원에게 적절한 역할을 할당하십시오.
- 이메일: 관리 이메일을 개인 이메일 변경 문제를 피하기 위해 그룹 이메일을 사용하십시오.
- 로고:
조직에서 계속 진행하세요
조직에서 계속 진행하세요 섹션 제목만약에 조직 계획 대시보드와 API 운영을 위해 API 개요 API 개요에서 구현 세부 정보를 참조하세요 소개 소개에서 구현 세부 정보를 참조하세요 API 키 API 키에서 구현 세부 정보를 참조하세요 기기 기기 구현 세부 정보에 대해 패키지 패키지 구현 세부 정보에 대해