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

Scopes: any valid token reads; write to update the profile, preferences or avatar (email on /api/user/me needs read)

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

Scopes: none: Hypery browser session only. OAuth tokens can't manage API keys.

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

Scopes: any valid token lists teams; write creates or updates a team. Member management (invite, remove, change role) is Hypery browser-session only.

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

Scopes: any valid token reads; write creates, updates or deletes an app. Regenerating credentials is Hypery browser-session only.

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

Scopes: billing:read or billing:charge for the balance and transactions; any valid token for usage analytics. Top-up is not available to OAuth tokens.

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 the same scopes as every other Hypery API. Reads accept any valid token unless noted; the scopes that matter here are:

ScopeDescription
readBasic profile, including the user's email on /api/user/me
writeCreate and update teams, apps, profile, preferences, credit grants and plans
billing:readView balance, transactions and saved payment methods
billing:chargeCharge metered usage and start subscriptions; also reads balance and transactions

Credential and account-security routes (API keys, app credentials, team members, authorized apps, passwords) are Hypery browser-session only and can't be reached with an OAuth token, whatever its scopes.

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