Apps

Manage OAuth applications

Overview

The Apps API lets you build interfaces for managing OAuth apps, credentials, and settings.

Authentication: OAuth token
Required Scopes: apps:read, apps:write


List Apps

Get user's OAuth apps.

Endpoint: GET /api/apps

const response = await fetch('https://hypery.ai/api/apps', {
  headers: {
    'Authorization': `Bearer ${oauthToken}`
  }
})
 
const { data } = await response.json()
console.log(data.apps)

Response:

{
  "success": true,
  "data": {
    "apps": [
      {
        "id": "507f...",
        "name": "My App",
        "description": "App description",
        "oauth": {
          "clientId": "app_1699564800_abc123",
          "redirectUris": ["https://app.com/callback"],
          "scopes": ["ai:chat", "user:read"]
        },
        "status": "active",
        "totalInstalls": 42,
        "createdAt": "2025-11-01T10:00:00Z"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 20,
      "totalCount": 5,
      "totalPages": 1
    }
  }
}

Query Parameters

ParameterTypeDescription
pagenumberPage number (default: 1)
limitnumberResults per page (default: 20, max: 100)
teamIdstringFilter by team

Create App

Create a new OAuth application.

Endpoint: POST /api/apps

const response = await fetch('https://hypery.ai/api/apps', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${oauthToken}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'My App',
    description: 'App description',
    category: 'developer-tools',
    redirectUris: ['https://myapp.com/callback'],
    scopes: ['ai:chat', 'user:read']
  })
})
 
const { data } = await response.json()
console.log('Client ID:', data.app.oauth.clientId)

Input Parameters

ParameterTypeRequiredDescription
namestringYesApp name (max 100 chars)
descriptionstringNoApp description (max 500 chars)
categorystringYesApp category (see below)
redirectUrisarrayYesOAuth redirect URLs (at least one)
scopesarrayYesRequested scopes (at least one)
imagestringNoApp icon URL
websitestringNoApp website URL
teamSlugstringNoCreate for specific team

Categories:

  • productivity
  • entertainment
  • education
  • business
  • developer-tools
  • other

Available scopes:

  • read, write
  • ai:chat, ai:completions, ai:models, ai:images, ai:embeddings, ai:audio
  • billing:read, billing:charge

Full reference: OAuth scopes.


Get App

Get details of a specific app.

Endpoint: GET /api/apps/:id

const response = await fetch(
  `https://hypery.ai/api/apps/${appId}`,
  { headers: { 'Authorization': `Bearer ${oauthToken}` } }
)
 
const { app } = await response.json()

Regenerate Credentials

Generate new client secret (invalidates old one).

Endpoint: POST /api/apps/:id/regenerate-credentials

const response = await fetch(
  `https://hypery.ai/api/apps/${appId}/regenerate-credentials`,
  {
    method: 'POST',
    headers: { 'Authorization': `Bearer ${oauthToken}` }
  }
)
 
const { clientSecret } = await response.json()
console.log('New secret:', clientSecret)

This immediately invalidates the old client secret. All existing OAuth flows using the old secret will fail.


Update App

Modify app settings and configuration.

Endpoint: PUT /api/apps/:id

const response = await fetch(`https://hypery.ai/api/apps/${appId}`, {
  method: 'PUT',
  headers: {
    'Authorization': `Bearer ${oauthToken}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'Updated App Name',
    description: 'Updated description',
    oauth: {
      redirectUris: ['https://newapp.com/callback'],
      scopes: ['ai:chat', 'teams:read']
    }
  })
})
 
const { data } = await response.json()

Input Parameters

ParameterTypeRequiredDescription
namestringNoApp name
descriptionstringNoApp description
imagestringNoApp icon URL
websitestringNoApp website URL
categorystringNoApp category
oauth.redirectUrisarrayNoOAuth redirect URLs
oauth.scopesarrayNoRequested scopes
settings.webhookUrlstringNoWebhook URL
settings.allowedOriginsarrayNoCORS allowed origins

Upload App Icon

Update app icon/logo.

Endpoint: POST /api/apps/:id/icon

const formData = new FormData()
formData.append('image', fileInput.files[0])
 
const response = await fetch(
  `https://hypery.ai/api/apps/${appId}/icon`,
  {
    method: 'POST',
    headers: { 'Authorization': `Bearer ${oauthToken}` },
    body: formData
  }
)
 
const { imageUrl } = await response.json()

Required Role: Team owner or admin


Delete App

Delete an OAuth app permanently.

Endpoint: DELETE /api/apps/:id

await fetch(`https://hypery.ai/api/apps/${appId}`, {
  method: 'DELETE',
  headers: { 'Authorization': `Bearer ${oauthToken}` }
})

Error Responses

Invalid Category

{
  "success": false,
  "error": "Invalid app data",
  "details": [
    {
      "path": ["category"],
      "message": "Invalid enum value..."
    }
  ]
}

Status Code: 400

Missing Required Field

{
  "success": false,
  "error": "Invalid app data"
}

Status Code: 400


Next Steps