내용으로 건너뛰기

__CAPGO_KEEP_0__

조직은 Capgo의 최상위 엔터티입니다. 조직은 앱, 팀원 및 리소스를 단일 우산 아래에 그룹화할 수 있습니다. 각 조직은 다중 멤버와 다른 역할 및 권한을 가질 수 있습니다.

일반 사용 사례

일반 사용 사례
  • 회사에 새로운 조직을 만들기
  • 조직 설정 관리
  • 조직 정보 업데이트
  • 조직 상세 정보 조회

엔드포인트

엔드포인트

GET

GET

https://api.capgo.app/organization/

__CAPGO_KEEP_0__이 제공되면 단일 조직을 반환합니다. 그렇지 않으면 접근 가능한 모든 조직을 반환합니다. orgId __CAPGO_KEEP_0__이 제공되면 단일 조직을 반환합니다. 그렇지 않으면 접근 가능한 모든 조직을 반환합니다.

Query Parameters

Query Parameters 섹션
  • orgId (선택 사항): 특정 조직의 ID를 검색하기 위해
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
}
터미널 창
# Get all organizations
curl -H "authorization: your-api-key" https://api.capgo.app/organization/
# Get specific organization
curl -H "authorization: your-api-key" https://api.capgo.app/organization/?orgId=org_123
{
"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/

새로운 조직 만들기

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"
}

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"
}
}

https://api.capgo.app/organization/

기존 조직 삭제. 관리자 권한이 필요합니다. 이 작업은 irreversible 하며 모든 관련 앱, 버전, 및 리소스를 삭제합니다.

쿼리 매개변수

쿼리 매개변수 섹션
  • 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"
}
  1. 최선의 관행: 명확하고 설명적인 이름을 사용하여 조직을 명명하십시오
  2. 역할: 팀원에게 적절한 역할을 assign 하세요
  3. 이메일: 관리 이메일을 group 이메일로 사용하여 개인 이메일 변경과 관련된 문제를 피하세요
  4. 로고: 로고를 신뢰할 수 있는 CDN에 호스팅하고 HTTPS URL을 사용하세요

만약에 Organizations to plan dashboard and API operations, connect it with 대시보드와 API 운영을 계획하고 있다면 API Overview와 연결하세요 API 개요에 대한 구현 세부 정보를 위해 소개 __CAPGO_KEEP_0__ 키에 대한 구현 세부 정보를 위해 API 키 API 키에 대한 구현 세부 정보를 위해 장치 __CAPGO_KEEP_0__에 대한 구현 세부 정보를 위해 __CAPGO_KEEP_0__ __CAPGO_KEEP_0__에 대한 구현 세부 정보를 위해