Teams
Create and manage teams via OAuth
Overview
The Teams API lets you create teams, invite members, and manage team settings through OAuth.
Authentication: OAuth token
Required Scopes: teams:read, teams:write, teams:admin
List Teams
Get all teams the user belongs to.
Endpoint: GET /api/teams
const response = await fetch('https://hypery.ai/api/teams', {
headers: {
'Authorization': `Bearer ${oauthToken}`
}
})
const { teams } = await response.json()
console.log(teams)response = requests.get(
'https://hypery.ai/api/teams',
headers={'Authorization': f'Bearer {oauth_token}'}
)
data = response.json()
print(data['teams'])curl https://hypery.ai/api/teams \
-H "Authorization: Bearer OAUTH_TOKEN"Response:
{
"success": true,
"teams": [
{
"id": "507f1f77bcf86cd799439011",
"name": "Engineering",
"slug": "engineering",
"description": "Engineering team",
"image": null,
"role": "owner",
"memberCount": 5,
"createdAt": "2025-11-01T10:00:00Z",
"stats": {
"totalApps": 3,
"totalCredits": 1000,
"monthlyUsage": 250
}
}
]
}Output Fields
Create Team
Create a new team.
Endpoint: POST /api/teams
const response = await fetch('https://hypery.ai/api/teams', {
method: 'POST',
headers: {
'Authorization': `Bearer ${oauthToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Engineering',
description: 'Our engineering team'
})
})
const { team } = await response.json()
console.log('Created:', team.id)response = requests.post(
'https://hypery.ai/api/teams',
headers={'Authorization': f'Bearer {oauth_token}'},
json={
'name': 'Engineering',
'description': 'Our engineering team'
}
)
data = response.json()
print('Created:', data['team']['id'])curl -X POST https://hypery.ai/api/teams \
-H "Authorization: Bearer OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Engineering",
"description": "Our engineering team"
}'Input Parameters
Response:
{
"success": true,
"team": {
"id": "507f...",
"name": "Engineering",
"slug": "engineering",
"role": "owner",
"memberCount": 1
}
}Get Team Details
Get information about a specific team.
Endpoint: GET /api/teams/:id
const response = await fetch(
`https://hypery.ai/api/teams/${teamId}`,
{ headers: { 'Authorization': `Bearer ${oauthToken}` } }
)
const { team } = await response.json()response = requests.get(
f'https://hypery.ai/api/teams/{team_id}',
headers={'Authorization': f'Bearer {oauth_token}'}
)
team = response.json()['team']curl https://hypery.ai/api/teams/TEAM_ID \
-H "Authorization: Bearer OAUTH_TOKEN"List Team Members
Get all members of a team.
Endpoint: GET /api/teams/:id/members
const response = await fetch(
`https://hypery.ai/api/teams/${teamId}/members`,
{ headers: { 'Authorization': `Bearer ${oauthToken}` } }
)
const { members } = await response.json()response = requests.get(
f'https://hypery.ai/api/teams/{team_id}/members',
headers={'Authorization': f'Bearer {oauth_token}'}
)
members = response.json()['members']curl https://hypery.ai/api/teams/TEAM_ID/members \
-H "Authorization: Bearer OAUTH_TOKEN"Invite Member
Invite someone to join a team.
Endpoint: POST /api/teams/:id/invite
const response = await fetch(
`https://hypery.ai/api/teams/${teamId}/invite`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${oauthToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: 'engineer@company.com',
role: 'member'
})
}
)
const result = await response.json()response = requests.post(
f'https://hypery.ai/api/teams/{team_id}/invite',
headers={'Authorization': f'Bearer {oauth_token}'},
json={
'email': 'engineer@company.com',
'role': 'member'
}
)curl -X POST https://hypery.ai/api/teams/TEAM_ID/invite \
-H "Authorization: Bearer OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "engineer@company.com",
"role": "member"
}'Input Parameters
Update Member Role
Change a member's role.
Endpoint: PUT /api/teams/:id/members/:memberId
await fetch(
`https://hypery.ai/api/teams/${teamId}/members/${memberId}`,
{
method: 'PUT',
headers: {
'Authorization': `Bearer ${oauthToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
role: 'admin'
})
}
)requests.put(
f'https://hypery.ai/api/teams/{team_id}/members/{member_id}',
headers={'Authorization': f'Bearer {oauth_token}'},
json={'role': 'admin'}
)curl -X PUT https://hypery.ai/api/teams/TEAM_ID/members/MEMBER_ID \
-H "Authorization: Bearer OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"role": "admin"}'Input Parameters
Remove Member
Remove a member from a team.
Endpoint: DELETE /api/teams/:id/members/:memberId
await fetch(
`https://hypery.ai/api/teams/${teamId}/members/${memberId}`,
{
method: 'DELETE',
headers: { 'Authorization': `Bearer ${oauthToken}` }
}
)requests.delete(
f'https://hypery.ai/api/teams/{team_id}/members/{member_id}',
headers={'Authorization': f'Bearer {oauth_token}'}
)curl -X DELETE https://hypery.ai/api/teams/TEAM_ID/members/MEMBER_ID \
-H "Authorization: Bearer OAUTH_TOKEN"Upload Team Icon
Update team icon/avatar.
Endpoint: POST /api/teams/:id/icon
const formData = new FormData()
formData.append('image', fileInput.files[0])
const response = await fetch(
`https://hypery.ai/api/teams/${teamId}/icon`,
{
method: 'POST',
headers: { 'Authorization': `Bearer ${oauthToken}` },
body: formData
}
)
const { imageUrl } = await response.json()
console.log('Team icon:', imageUrl)files = {'image': open('team-icon.png', 'rb')}
response = requests.post(
f'https://hypery.ai/api/teams/{team_id}/icon',
headers={'Authorization': f'Bearer {oauth_token}'},
files=files
)curl -X POST https://hypery.ai/api/teams/TEAM_ID/icon \
-H "Authorization: Bearer OAUTH_TOKEN" \
-F "image=@team-icon.png"Required Role: Owner or Admin
Leave Team
Leave a team you're a member of.
Endpoint: POST /api/teams/:id/leave
await fetch(`https://hypery.ai/api/teams/${teamId}/leave`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${oauthToken}`
}
})requests.post(
f'https://hypery.ai/api/teams/{team_id}/leave',
headers={'Authorization': f'Bearer {oauth_token}'}
)curl -X POST https://hypery.ai/api/teams/TEAM_ID/leave \
-H "Authorization: Bearer OAUTH_TOKEN"Owners cannot leave their team. Transfer ownership first or delete the team.
Update Team Profile
Modify team name, description, or slug.
Endpoint: PUT /api/teams/:id
const response = await fetch(`https://hypery.ai/api/teams/${teamId}`, {
method: 'PUT',
headers: {
'Authorization': `Bearer ${oauthToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'New Team Name',
slug: 'new-team-slug',
description: 'Updated description'
})
})requests.put(
f'https://hypery.ai/api/teams/{team_id}',
headers={'Authorization': f'Bearer {oauth_token}'},
json={
'name': 'New Team Name',
'slug': 'new-team-slug',
'description': 'Updated description'
}
)curl -X PUT https://hypery.ai/api/teams/TEAM_ID \
-H "Authorization: Bearer OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "New Team Name", "slug": "new-team-slug"}'Input Parameters
For personal teams, updating the slug also updates the user's username automatically.
Delete Team
Permanently delete a team.
Endpoint: DELETE /api/teams/:id
await fetch(`https://hypery.ai/api/teams/${teamId}`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${oauthToken}`
}
})requests.delete(
f'https://hypery.ai/api/teams/{team_id}',
headers={'Authorization': f'Bearer {oauth_token}'}
)curl -X DELETE https://hypery.ai/api/teams/TEAM_ID \
-H "Authorization: Bearer OAUTH_TOKEN"