Organizations

Organizations

Organizations are the top-level grouping in almyty. Every resource — APIs, tools, gateways, agents, and LLM providers — belongs to an organization. Organizations enable multi-tenancy, team collaboration, and role-based access control.

Creating an Organization

An organization is automatically created during registration. Additional organizations can be created via the API:

curl -X POST https://api.almyty.com/organizations \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp",
    "description": "Main production organization"
  }'

Response

{
  "id": "org-uuid",
  "name": "Acme Corp",
  "description": "Main production organization",
  "createdAt": "2026-03-01T10:00:00Z"
}

Managing Members

List Members

curl https://api.almyty.com/organizations/{orgId}/members \
  -H "Authorization: Bearer $TOKEN"
{
  "members": [
    {
      "id": "user-uuid",
      "email": "admin@acme.com",
      "firstName": "Jane",
      "lastName": "Doe",
      "role": "admin",
      "joinedAt": "2026-03-01T10:00:00Z"
    }
  ]
}

Add a Member

curl -X POST https://api.almyty.com/organizations/{orgId}/members \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "developer@acme.com",
    "role": "member"
  }'

Update Member Role

curl -X PATCH https://api.almyty.com/organizations/{orgId}/members/{userId} \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "admin"
  }'

Remove a Member

curl -X DELETE https://api.almyty.com/organizations/{orgId}/members/{userId} \
  -H "Authorization: Bearer $TOKEN"

Roles

RolePermissions
ownerFull access, can delete organization, manage settings
adminManage members, APIs, tools, gateways, agents
memberCreate and manage own resources, invoke agents
viewerRead-only access to all resources

Permission Matrix

ActionOwnerAdminMemberViewer
View resourcesYesYesYesYes
Create resourcesYesYesYesNo
Edit own resourcesYesYesYesNo
Edit all resourcesYesYesNoNo
Manage membersYesYesNoNo
Delete organizationYesNoNoNo

Teams

Teams are sub-groups within an organization for more granular access control.

Create a Team

curl -X POST https://api.almyty.com/organizations/{orgId}/teams \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Backend Team",
    "description": "Backend API development"
  }'

Add Team Member

curl -X POST https://api.almyty.com/organizations/{orgId}/teams/{teamId}/members \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "user-uuid",
    "role": "member"
  }'

Team Roles

RoleDescription
leadCan manage team members and team settings
memberStandard team member

Switching Organizations

Users can belong to multiple organizations. The frontend stores the current organization in the app state. API requests are scoped to the organization associated with the JWT token.

To work with a specific organization's resources, use organization-scoped endpoints:

# List tools for a specific organization
curl https://api.almyty.com/organizations/{orgId}/tools \
  -H "Authorization: Bearer $TOKEN"

Deleting an Organization

Only the organization owner can delete an organization:

curl -X DELETE https://api.almyty.com/organizations/{orgId} \
  -H "Authorization: Bearer $TOKEN"

This permanently deletes the organization and all its resources (APIs, tools, gateways, agents, etc.). This action cannot be undone.