__CAPGO_KEEP_0__
이 플러그인의 설치 단계와 전체 마크다운 가이드를 포함한 설정 명령어를 복사하세요.
Capgo의 최상위 엔터티는 조직입니다. 조직은 앱, 팀원 및 리소스를 단일 우산 아래에 그룹화할 수 있습니다. 각 조직은 다중 멤버와 다른 역할 및 권한을 가질 수 있습니다.
일반적인 사용 사례
Section titled “공통 사용 사례”- 회사에 새로운 조직을 만들기 위해
- 조직 설정 관리
- 조직 정보 업데이트
- 조직 상세 정보 조회
Endpoints
Section titled “Endpoints”https://api.capgo.app/organization/
회사 정보를 조회합니다. 파라미터가 제공되면 단일 조직을 반환합니다. 그렇지 않으면 모든 접근 가능한 조직을 반환합니다. orgId 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 "authorization: your-api-key" https://api.capgo.app/organization/
# Get specific organizationcurl -H "authorization: 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" }}POST
POST 섹션https://api.capgo.app/organization/
새로운 조직 만들기
요청 본문
요청 본문 섹션interface OrganizationCreate { name: string}예제 요청
예제 요청 섹션curl -X POST \ -H "authorization: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "name": "New Organization" }' \ https://api.capgo.app/organization/예제 응답
예제 응답 섹션{ "status": "Organization created", "id": "org_456"}PUT
PUT 섹션https://api.capgo.app/organization/
기존 조직을 업데이트합니다. 관리자 권한이 필요합니다.
요청 본문
요청 본문 섹션interface OrganizationUpdate { orgId: string logo?: string name?: string management_email?: string}예제 요청
예제 요청 섹션curl -X PUT \ -H "authorization: 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
Section titled “DELETE”https://api.capgo.app/organization/
기존 조직을 삭제합니다. 관리자 권한이 필요합니다. 이 작업은 irreversible 하며 모든 관련 앱, 버전, 및 리소스를 삭제합니다.
쿼리 매개변수
Section titled “쿼리 매개변수”orgId: 조직을 삭제할 ID
curl -X DELETE \ -H "authorization: your-api-key" \ https://api.capgo.app/organization/?orgId=org_123예시 응답
예시 응답 섹션{ "status": "Organization deleted", "id": "org_123"}오류 처리
오류 처리 섹션일반 오류 상황 및 응답:
// 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"}최선의 방법
최선의 방법 섹션- 이름 지정: 명확하고 설명적인 이름을 사용하여 조직
- 역할: 팀원에게 적절한 역할을 할당하세요
- 이메일: 관리 이메일을 개인 이메일 변경 문제를 피하기 위해 그룹 이메일을 사용하세요
- 로고: 로고를 신뢰할 수 있는 CDN에 호스팅하고 HTTPS URL을 사용하세요