Skip to main content

Create Organization

POST /organizations

Request Body

{
  "name": "ACME Corp",
  "settings": {
    "require_two_approvals": true
  }
}

Response

{
  "id": 1,
  "name": "ACME Corp",
  "settings": {
    "require_two_approvals": true
  },
  "created_at": "2024-01-01T12:00:00Z"
}

Get Organization

GET /organizations/{org_id}

Response

{
  "id": 1,
  "name": "ACME Corp",
  "settings": {
    "require_two_approvals": true
  },
  "created_at": "2024-01-01T12:00:00Z"
}

Example

import httpx

async with httpx.AsyncClient() as client:
    # Create organization
    response = await client.post(
        "https://api.humancheck.dev/reviews",
        headers={
            "Authorization": "Bearer your-api-key-here",
            "Content-Type": "application/json"
        },
        json={
            "name": "ACME Corp",
            "settings": {
                "require_two_approvals": True
            }
        }
    )
    org = response.json()
    
    # Get organization
    response = await client.get(
        f"https://api.humancheck.dev/organizations/{org['id']}"
    )
    org = response.json()