내용으로 건너뛰기

__CAPGO_KEEP_0__

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

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

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

회사 정보를 조회합니다. 파라미터가 제공되면 단일 조직을 반환합니다. 그렇지 않으면 모든 접근 가능한 조직을 반환합니다. orgId Query Parameters

  • orgId (optional): __CAPGO_KEEP_0__의 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. 역할: 팀원에게 적절한 역할을 할당하세요
  3. 이메일: 관리 이메일을 개인 이메일 변경 문제를 피하기 위해 그룹 이메일을 사용하세요
  4. 로고: 로고를 신뢰할 수 있는 CDN에 호스팅하고 HTTPS URL을 사용하세요