Daytona organizations API

The organizations API from Daytona — 30 operation(s) for organizations.

OpenAPI Specification

daytona-organizations-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Daytona admin organizations API
  description: Daytona AI platform API Docs
  version: '1.0'
  contact:
    name: Daytona Platforms Inc.
    url: https://www.daytona.io
    email: support@daytona.com
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://localhost:3000
tags:
- name: organizations
paths:
  /organizations/invitations:
    get:
      operationId: listOrganizationInvitationsForAuthenticatedUser
      parameters: []
      responses:
        '200':
          description: List of organization invitations
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrganizationInvitation'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: List organization invitations for authenticated user
      tags:
      - organizations
  /organizations/invitations/count:
    get:
      operationId: getOrganizationInvitationsCountForAuthenticatedUser
      parameters: []
      responses:
        '200':
          description: Count of organization invitations
          content:
            application/json:
              schema:
                type: number
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Get count of organization invitations for authenticated user
      tags:
      - organizations
  /organizations/invitations/{invitationId}/accept:
    post:
      operationId: acceptOrganizationInvitation
      parameters:
      - name: invitationId
        required: true
        in: path
        description: Invitation ID
        schema:
          type: string
      responses:
        '200':
          description: Organization invitation accepted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationInvitation'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Accept organization invitation
      tags:
      - organizations
  /organizations/invitations/{invitationId}/decline:
    post:
      operationId: declineOrganizationInvitation
      parameters:
      - name: invitationId
        required: true
        in: path
        description: Invitation ID
        schema:
          type: string
      responses:
        '200':
          description: Organization invitation declined successfully
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Decline organization invitation
      tags:
      - organizations
  /organizations:
    post:
      operationId: createOrganization
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganization'
      responses:
        '201':
          description: Organization created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Create organization
      tags:
      - organizations
    get:
      operationId: listOrganizations
      parameters: []
      responses:
        '200':
          description: List of organizations
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Organization'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: List organizations
      tags:
      - organizations
  /organizations/{organizationId}/default-region:
    patch:
      operationId: setOrganizationDefaultRegion
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationDefaultRegion'
      responses:
        '204':
          description: Default region set successfully
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Set default region for organization
      tags:
      - organizations
  /organizations/{organizationId}:
    get:
      operationId: getOrganization
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      responses:
        '200':
          description: Organization details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Get organization by ID
      tags:
      - organizations
    delete:
      operationId: deleteOrganization
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      responses:
        '204':
          description: Organization deleted successfully
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Delete organization
      tags:
      - organizations
  /organizations/{organizationId}/usage:
    get:
      operationId: getOrganizationUsageOverview
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      responses:
        '200':
          description: Current usage overview
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationUsageOverview'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Get organization current usage overview
      tags:
      - organizations
  /organizations/{organizationId}/quota:
    patch:
      operationId: updateOrganizationQuota
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationQuota'
      responses:
        '204':
          description: Organization quota updated successfully
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Update organization quota
      tags:
      - organizations
  /organizations/{organizationId}/quota/{regionId}:
    patch:
      operationId: updateOrganizationRegionQuota
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      - name: regionId
        required: true
        in: path
        description: ID of the region where the updated quota will be applied
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationRegionQuota'
      responses:
        '204':
          description: Region quota updated successfully
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Update organization region quota
      tags:
      - organizations
  /organizations/{organizationId}/leave:
    post:
      operationId: leaveOrganization
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      responses:
        '204':
          description: Organization left successfully
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Leave organization
      tags:
      - organizations
  /organizations/{organizationId}/suspend:
    post:
      operationId: suspendOrganization
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationSuspension'
      responses:
        '204':
          description: Organization suspended successfully
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Suspend organization
      tags:
      - organizations
  /organizations/{organizationId}/unsuspend:
    post:
      operationId: unsuspendOrganization
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      responses:
        '204':
          description: Organization unsuspended successfully
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Unsuspend organization
      tags:
      - organizations
  /organizations/otel-config/by-sandbox-auth-token/{authToken}:
    get:
      operationId: getOrganizationOtelConfigBySandboxAuthToken
      parameters:
      - name: authToken
        required: true
        in: path
        description: Sandbox Auth Token
        schema:
          type: string
      responses:
        '200':
          description: OTEL Config
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OtelConfig'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Get organization OTEL config by sandbox auth token
      tags:
      - organizations
  /organizations/{organizationId}/otel-config:
    get:
      operationId: getOrganizationOtelConfig
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      responses:
        '200':
          description: OTEL Config
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OtelConfig'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Get organization OTEL config by organization ID
      tags:
      - organizations
    put:
      operationId: updateOrganizationOtelConfig
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OtelConfig'
      responses:
        '204':
          description: OpenTelemetry configuration updated successfully
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Update organization OpenTelemetry configuration
      tags:
      - organizations
    delete:
      operationId: deleteOrganizationOtelConfig
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      responses:
        '204':
          description: OpenTelemetry configuration deleted successfully
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Delete organization OpenTelemetry configuration
      tags:
      - organizations
  /organizations/{organizationId}/sandbox-default-limited-network-egress:
    post:
      operationId: updateSandboxDefaultLimitedNetworkEgress
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationSandboxDefaultLimitedNetworkEgress'
      responses:
        '204':
          description: Sandbox default limited network egress updated successfully
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Update sandbox default limited network egress
      tags:
      - organizations
  /organizations/{organizationId}/experimental-config:
    put:
      operationId: updateExperimentalConfig
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      requestBody:
        required: false
        description: Experimental configuration as a JSON object. Set to null to clear the configuration.
        content:
          application/json:
            schema:
              additionalProperties: true
              example:
                otel:
                  endpoint: http://otel-collector:4317
                  headers:
                    api-key: XXX
      responses:
        '200':
          description: ''
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Update experimental configuration
      tags:
      - organizations
  /organizations/{organizationId}/roles:
    post:
      operationId: createOrganizationRole
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationRole'
      responses:
        '201':
          description: Organization role created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationRole'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Create organization role
      tags:
      - organizations
    get:
      operationId: listOrganizationRoles
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      responses:
        '200':
          description: List of organization roles
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrganizationRole'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: List organization roles
      tags:
      - organizations
  /organizations/{organizationId}/roles/{roleId}:
    put:
      operationId: updateOrganizationRole
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      - name: roleId
        required: true
        in: path
        description: Role ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationRole'
      responses:
        '200':
          description: Role updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationRole'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Update organization role
      tags:
      - organizations
    delete:
      operationId: deleteOrganizationRole
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      - name: roleId
        required: true
        in: path
        description: Role ID
        schema:
          type: string
      responses:
        '204':
          description: Organization role deleted successfully
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Delete organization role
      tags:
      - organizations
  /organizations/{organizationId}/users:
    get:
      operationId: listOrganizationMembers
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      responses:
        '200':
          description: List of organization members
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrganizationUser'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: List organization members
      tags:
      - organizations
  /organizations/{organizationId}/users/{userId}/access:
    post:
      operationId: updateAccessForOrganizationMember
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      - name: userId
        required: true
        in: path
        description: User ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationMemberAccess'
      responses:
        '200':
          description: Access updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationUser'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Update access for organization member
      tags:
      - organizations
  /organizations/{organizationId}/users/{userId}:
    delete:
      operationId: deleteOrganizationMember
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      - name: userId
        required: true
        in: path
        description: User ID
        schema:
          type: string
      responses:
        '204':
          description: User removed from organization successfully
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Delete organization member
      tags:
      - organizations
  /organizations/{organizationId}/invitations:
    post:
      operationId: createOrganizationInvitation
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationInvitation'
      responses:
        '201':
          description: Organization invitation created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationInvitation'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Create organization invitation
      tags:
      - organizations
    get:
      operationId: listOrganizationInvitations
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      responses:
        '200':
          description: List of pending organization invitations
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrganizationInvitation'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: List pending organization invitations
      tags:
      - organizations
  /organizations/{organizationId}/invitations/{invitationId}:
    put:
      operationId: updateOrganizationInvitation
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      - name: invitationId
        required: true
        in: path
        description: Invitation ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationInvitation'
      responses:
        '200':
          description: Organization invitation updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationInvitation'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Update organization invitation
      tags:
      - organizations
  /organizations/{organizationId}/invitations/{invitationId}/cancel:
    post:
      operationId: cancelOrganizationInvitation
      parameters:
      - name: organizationId
        required: true
        in: path
        description: Organization ID
        schema:
          type: string
      - name: invitationId
        required: true
        in: path
        description: Invitation ID
        schema:
          type: string
      responses:
        '204':
          description: Organization invitation cancelled successfully
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Cancel organization invitation
      tags:
      - organizations
  /regions:
    get:
      operationId: listAvailableRegions
      parameters:
      - name: X-Daytona-Organization-ID
        in: header
        description: Use with JWT to specify the organization ID
        required: false
        schema:
          type: string
      responses:
        '200':
          description: List of all available regions
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Region'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: List all available regions for the organization
      tags:
      - organizations
    post:
      operationId: createRegion
      parameters:
      - name: X-Daytona-Organization-ID
        in: header
        description: Use with JWT to specify the organization ID
        required: false
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRegion'
      responses:
        '201':
          description: The region has been successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRegionResponse'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Create a new region
      tags:
      - organizations
  /regions/{id}:
    get:
      operationId: getRegionById
      parameters:
      - name: X-Daytona-Organization-ID
        in: header
        description: Use with JWT to specify the organization ID
        required: false
        schema:
          type: string
      - name: id
        required: true
        in: path
        description: Region ID
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Region'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Get region by ID
      tags:
      - organizations
    delete:
      operationId: deleteRegion
      parameters:
      - name: X-Daytona-Organization-ID
        in: header
        description: Use with JWT to specify the organization ID
        required: false
        schema:
          type: string
      - name: id
        required: true
        in: path
        description: Region ID
        schema:
          type: string
      responses:
        '204':
          description: The region has been successfully deleted.
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Delete a region
      tags:
      - organizations
    patch:
      operationId: updateRegion
      parameters:
      - name: X-Daytona-Organization-ID
        in: header
        description: Use with JWT to specify the organization ID
        required: false
        schema:
          type: string
      - name: id
        required: true
        in: path
        description: Region ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateRegion'
      responses:
        '200':
          description: ''
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Update region configuration
      tags:
      - organizations
  /regions/{id}/regenerate-proxy-api-key:
    post:
      operationId: regenerateProxyApiKey
      parameters:
      - name: X-Daytona-Organization-ID
        in: header
        description: Use with JWT to specify the organization ID
        required: false
        schema:
          type: string
      - name: id
        required: true
        in: path
        description: Region ID
        schema:
          type: string
      responses:
        '200':
          description: The proxy API key has been successfully regenerated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegenerateApiKeyResponse'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Regenerate proxy API key for a region
      tags:
      - organizations
  /regions/{id}/regenerate-ssh-gateway-api-key:
    post:
      operationId: regenerateSshGatewayApiKey
      parameters:
      - name: X-Daytona-Organization-ID
        in: header
        description: Use with JWT to specify the organization ID
        required: false
        schema:
          type: string
      - name: id
        required: true
        in: path
        description: Region ID
        schema:
          type: string
      responses:
        '200':
          description: The SSH gateway API key has been successfully regenerated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegenerateApiKeyResponse'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Regenerate SSH gateway API key for a region
      tags:
      - organizations
  /regions/{id}/regenerate-snapshot-manager-credentials:
    post:
      operationId: regenerateSnapshotManagerCredentials
      parameters:
      - name: X-Daytona-Organization-ID
        in: header
        description: Use with JWT to specify the organization ID
        required: false
        schema:
          type: string
      - name: id
        required: true
        in: path
        description: Region ID
        schema:
          type: string
      responses:
        '200':
          description: The snapshot manager credentials have been successfully regenerated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SnapshotManagerCredentials'
      security:
      - bearer: []
      - oauth2:
        - openid
        - profile
        - email
      summary: Regenerate snapshot manager credentials for a region
      tags:
      - organizations
components:
  schemas:
    CreateOrganizationInvitation:
      type: object
      properties:
        email:
          type: string
          description: Email address of the invitee
          example: mail@example.com
        role:
          type: string
          description: Organization member role for the invitee
          enum:
          - owner
          - member
          default: member
        assignedRoleIds:
          description: Array of assigned role IDs for the invitee
          default:
          - 00000000-0000-0000-0000-000000000001
          type: array
          items:
            type: string
        expiresAt:
          format: date-time
          type: string
          description: Expiration date of the invitation
          example: '2021-12-31T23:59:59Z'
      required:
      - email
      - role
      - assignedRoleIds
    RegionUsageOverview:
      type: object
      properties:
        regionId:
          type: string
        totalCpuQuota:
          type: number
        currentCpuUsage:
          type: number
        totalMemoryQuota:
          type: number
        currentMemoryUsage:
          type: number
        totalDiskQuota:
          type: number
        currentDiskUsage:
          type: number
        maxCpuPerSandbox:
          type: number
          nullable: true
        maxMemoryPerSandbox:
          type: number
          nullable: true
        maxDiskPerSandbox:
          type: number
          nullable: true
        maxDiskPerNonEphemeralSandbox:
          type: number
          nullable: true
      required:
      - regionId
      - totalCpuQuota
      - currentCpuUsage
      - totalMemoryQuota
      - currentMemoryUsage
      - totalDiskQuota
      - currentDiskUsage
      - maxCpuPerSandbox
      - maxMemoryPerSandbox
      - maxDiskPerSandbox
      - maxDiskPerNonEphemeralSandbox
    OtelConfig:
      type: object
      properties:
        endpoint:
          type: string
          description: Endpoint
        headers:
          type: object
          description: Headers
          example:
            x-api-key: my-api-key
          nullable: true
          additionalProperties:
            type: string
      required:
      - endpoint
    UpdateRegion:
      type: object
      properties:
        proxyUrl:
          type: string
          description: Proxy URL for the region
          example: https://proxy.example.com
          nullable: true
        sshGatewayUrl:
          type: string
          description: SSH Gateway URL for the region
          example: ssh://ssh-gateway.example.com
          nullable: true
        snapshotManagerUrl:
          type: string
          description: Snapshot Manager URL for the region
          example: https://snapshot-manager.example.com
          nullable: true
    UpdateOrganizationInvitation:
      type: object
      properties:
        role:
          type: string
          description: Organization member role
          enum:
          - owner
          - member
        assignedRoleIds:
          description: Array of role IDs
          type: array
          items:
            type: string
        expiresAt:
          format: date-time
          type: string
          description: Expiration date of the invitation
          example: '2021-12-31T23:59:59Z'
      required:
      - role
      - assignedRoleIds
    RegionType:
      type: string
      enum:
      - shared
      - dedicated
      - custom
      description: The type of the region
    RegenerateApiKeyResponse:
      type: object
      properties:
        apiKey:
          typ

# --- truncated at 32 KB (49 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/daytona/refs/heads/main/openapi/daytona-organizations-api-openapi.yml