Organization

Endpoints for retrieving your organization's details and credit balance.

Get Organization Details

Returns your organization's profile information and list of teams.

GET /organization

Request

curl -X GET "https://server.headshotpro.com/api/v2/organization" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "organization": {
    "uid": "org_abc123def456",
    "name": "Acme Corporation",
    "website": "https://acme.com",
    "teams": [
      {
        "id": "team_xyz789",
        "name": "Marketing"
      },
      {
        "id": "team_abc123",
        "name": "Engineering"
      }
    ]
  }
}

Response Fields

FieldTypeDescription
uidstringUnique organization identifier
namestringOrganization display name
websitestringOrganization website URL
teamsarrayList of teams in the organization
teams[].idstringTeam identifier
teams[].namestringTeam display name

Get Credit Balance

Returns your organization's current credit balance.

GET /organization/credits

Request

curl -X GET "https://server.headshotpro.com/api/v2/organization/credits" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "credits": 100
}

Response Fields

FieldTypeDescription
creditsintegerAvailable credits for headshot generation

Credit Usage

Credits are consumed when:

  • A team member uploads their photos and starts the AI training process
  • A whitelabel model completes onboarding

Credits are not consumed when:

  • Creating an invite (credit reserved, consumed on photo upload)
  • Retrieving photos or model details
  • Managing teams

Monitoring Credits

We recommend monitoring your credit balance programmatically to:

  • Alert when credits are low
  • Prevent invite failures due to insufficient credits
  • Track usage across teams