> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agents.labs.bandwidth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a workspace

> Create a workspace with a default group owned by your account.

Requires an OAuth bearer token. Supply a nonempty name. The response includes `tenant_id`, `group_id`, and name. The new group becomes the account’s selected workspace. Duplicate names and workspace ownership/membership limits return `409`. API keys are not accepted.


## OpenAPI

````yaml POST /api/v1/user/tenants
openapi: 3.1.0
info:
  title: Bandwidth Agent Builder API
  version: v1
  description: >-
    Manage agents, place calls, and retrieve conversation results in your
    workspace.
servers:
  - url: https://agents.labs.bandwidth.com
    description: Workspace API
security: []
paths:
  /api/v1/user/tenants:
    post:
      tags:
        - workspace-management
      summary: Create a workspace
      description: >-
        **Authorization:** Requires a Labs OAuth bearer token. API keys are not
        accepted. Resource ownership and operation-specific restrictions still
        apply.


        Create a workspace with a default group owned by your account.
      operationId: create_tenant_api_v1_user_tenants_post
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTenantRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceCreatedResponse'
          description: Successful Response
        '401':
          description: Missing, invalid, or expired credential.
        '403':
          description: >-
            The account lacks access to the workspace, resource, or required
            role.
        '404':
          description: Not found
        '409':
          description: >-
            Duplicate workspace name or workspace membership/ownership limit
            reached.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - LabsAuth: []
components:
  schemas:
    CreateTenantRequest:
      properties:
        name:
          title: Name
          type: string
      required:
        - name
      title: CreateTenantRequest
      type: object
    WorkspaceCreatedResponse:
      properties:
        group_id:
          title: Group Id
          type: integer
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        tenant_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tenant Id
      required:
        - group_id
      title: WorkspaceCreatedResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    LabsAuth:
      description: >-
        Bandwidth Labs OAuth access token. Uses the user's selected workspace;
        the workspace header is not required. Do not also send an API key.
        Bearer-only operations may additionally require the Labs `super_user`
        role.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.