Apps

Manage OAuth applications

Overview

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

Authentication: OAuth token
Scopes: any valid token can list and read apps; creating, updating or deleting an app, and uploading its icon, need write. Regenerating credentials, transferring an app and changing its status are Hypery browser-session only. See OAuth scopes.


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", "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', '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
brandColorstringNoHex brand color for hosted sign-in/consent pages (e.g. #6C47FF)
websitestringNoApp website URL
termsOfServicestringNoTerms of service URL
privacyPolicystringNoPrivacy policy 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
  • config:store

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 { data } = await response.json()
console.log(data.app)

Example response:

{
  "success": true,
  "data": {
    "app": {
      "id": "507f...",
      "name": "My App",
      "description": "App description",
      "image": "https://cdn.example.com/icon.png",
      "brandColor": "#6C47FF",
      "website": "https://myapp.com",
      "termsOfService": "https://myapp.com/terms",
      "privacyPolicy": "https://myapp.com/privacy",
      "category": "developer-tools",
      "tags": ["ai"],
      "status": "draft",
      "isPublic": false,
      "oauth": {
        "clientId": "app_1699564800_abc123",
        "redirectUris": ["https://myapp.com/callback"],
        "scopes": ["ai:chat", "read"]
      },
      "settings": {
        "webhookUrl": "https://myapp.com/webhooks",
        "allowedOrigins": ["https://myapp.com"],
        "rateLimits": {
          "requestsPerMinute": 60,
          "requestsPerHour": 1000,
          "requestsPerDay": 10000
        }
      }
    }
  }
}

Output Parameters

FieldTypeDescription
brandColorstringHex color used on hosted OAuth login/consent screens
websitestringPublic website URL (stored as url in the database)
termsOfServicestringTerms of service URL
privacyPolicystringPrivacy policy URL
settings.rateLimitsobjectPer-minute / hour / day request caps

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',
    brandColor: '#6C47FF',
    website: 'https://myapp.com',
    oauth: {
      redirectUris: ['https://newapp.com/callback'],
      scopes: ['ai:chat', 'read']
    },
    settings: {
      rateLimits: {
        requestsPerMinute: 60,
        requestsPerHour: 1000,
        requestsPerDay: 10000
      }
    }
  })
})
 
const { data } = await response.json()

Input Parameters

ParameterTypeRequiredDescription
namestringNoApp name
descriptionstringNoApp description
imagestringNoApp icon URL
brandColorstringNoHex brand color (e.g. #6C47FF); empty string clears it
websitestringNoApp website URL
termsOfServicestringNoTerms of service URL
privacyPolicystringNoPrivacy policy URL
categorystringNoApp category
oauth.redirectUrisarrayNoOAuth redirect URLs
oauth.scopesarrayNoRequested scopes
oauth.deviceFlowbooleanNoEnable or disable the device flow. Not accepted from an OAuth access token (403); use a Hypery session or API key.
settings.webhookUrlstringNoWebhook URL
settings.allowedOriginsarrayNoCORS allowed origins
settings.rateLimitsobjectNorequestsPerMinute / requestsPerHour / requestsPerDay

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