Management

Build custom admin panels and team management tools

Management APIs allow you to build custom admin panels, team management tools, and analytics dashboards using OAuth authentication.

  • Custom Admin Panels - Build tailored management interfaces for your users
  • Team Collaboration - Enable multi-user team features in your apps
  • Usage Analytics - Create custom dashboards for tracking usage and costs
  • Self-Service Portals - Let users manage their own accounts via your interface

Authentication

All Management APIs require OAuth authentication with appropriate scopes.

// Example: Get user's teams
const teams = await fetch('https://hypery.ai/api/teams', {
  headers: {
    'Authorization': `Bearer ${oauthAccessToken}`
  }
})

Management APIs are only accessible via OAuth. API keys cannot be used for these endpoints.

Available APIs

User & Profile Management

Manage user profiles, preferences, and avatars.

Endpoints:

  • GET /api/user/me - Get current user
  • PUT /api/user/profile - Update profile
  • GET /api/user/preferences - Get preferences
  • GET /api/user/avatar - Get avatar

Required Scopes: user:read, user:write

View complete User API reference →

API Key Management

Let users manage their API keys through your app.

Endpoints:

  • GET /api/user/api-keys - List API keys
  • POST /api/user/api-keys - Create API key
  • DELETE /api/user/api-keys/:id - Revoke API key

Required Scopes: apikeys:read, apikeys:write

Team Management

Create and manage teams, invite members, and control permissions.

Endpoints:

  • GET /api/teams - List teams
  • POST /api/teams - Create team
  • GET /api/teams/:id/members - List members
  • POST /api/teams/:id/invite - Invite member

Required Scopes: teams:read, teams:write, teams:admin

View complete Teams API reference →

App Management

Manage OAuth apps, credentials, and analytics.

Endpoints:

  • GET /api/apps - List apps
  • POST /api/apps - Create app
  • POST /api/apps/:id/regenerate-credentials - Regenerate secrets
  • GET /api/apps/:id/analytics - Get analytics

Required Scopes: apps:read, apps:write

View complete Apps API reference →

Billing & Usage

View credit balance, transactions, and usage analytics.

Endpoints:

  • GET /api/wallet/balance - Get credit balance
  • GET /api/wallet/transactions - Transaction history
  • POST /api/wallet/topup - Add credits
  • GET /api/analytics/:slug - Usage analytics

Required Scopes: billing:read, billing:write

Credit Grants

Sponsor credits for your app's users — recurring free allowances and one-time gifts, funded from your balance.

Endpoints:

  • GET /api/apps/:id/grants/rules - List sponsored-credit rules
  • POST /api/apps/:id/grants/rules - Create a rule
  • PATCH /api/apps/:id/grants/rules/:ruleId - Update a rule
  • DELETE /api/apps/:id/grants/rules/:ruleId - Delete a rule
  • POST /api/apps/:id/grants - Grant a user credits now
  • GET /api/apps/:id/grants - List issued grants (audit)
  • GET /api/apps/:id/grants/customers/:userId/balance - A user's balance

Required Scopes: read, write (app owner / billing admin only)

View complete Credit Grants API reference →

OAuth Scopes

Management APIs use a fine-grained permission system:

ScopeAccessDescription
user:readProfileRead user profile
user:writeProfileUpdate user profile
teams:readTeamsView teams
teams:writeTeamsManage teams
teams:adminTeamsFull team management
apps:readAppsView apps
apps:writeAppsManage apps
apikeys:readKeysList API keys
apikeys:writeKeysCreate/revoke keys
billing:readBillingView balance
billing:writeBillingAdd credits

View complete scopes reference →

Example: Custom Admin Panel

// Build a custom team management interface
async function MyAdminPanel({ accessToken }: { accessToken: string }) {
  // List teams
  const teamsResponse = await fetch('https://hypery.ai/api/teams', {
    headers: { 'Authorization': `Bearer ${accessToken}` }
  })
  const { data: teams } = await teamsResponse.json()
  
  // Create new team
  const createTeam = async (name: string) => {
    return fetch('https://hypery.ai/api/teams', {
      method: 'POST',
      headers: { 
        'Authorization': `Bearer ${accessToken}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        name,
        slug: name.toLowerCase().replace(/\s+/g, '-')
      })
    })
  }
  
  // Invite member
  const inviteMember = async (teamId: string, email: string) => {
    return fetch(`https://hypery.ai/api/teams/${teamId}/invite`, {
      method: 'POST',
      headers: { 
        'Authorization': `Bearer ${accessToken}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        email,
        role: 'member'
      })
    })
  }
  
  return (
    <div>
      {/* Your custom UI */}
    </div>
  )
}

Read the complete guide →

Next Steps