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

# create-tenant

> Create a tenant in the current workspace.



## OpenAPI

````yaml /api-reference/membrane-api.json post /tenants
openapi: 3.0.0
info:
  title: Membrane API
  description: API documentation for Membrane Engine
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getmembrane.com
security:
  - bearer: []
tags: []
paths:
  /tenants:
    post:
      summary: create-tenant
      description: Create a tenant in the current workspace.
      operationId: createTenant
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                key:
                  type: string
                fields: {}
                credentials: {}
                aiCreditsRolling30DayLimit:
                  nullable: true
                  type: number
                  minimum: 0
                isTest:
                  description: >-
                    [INTERNAL] Whether this tenant is a workspace member/test
                    tenant.
                  type: boolean
                isReadOnly:
                  description: '[INTERNAL] Workspace-role-derived read-only capability flag.'
                  type: boolean
                kind:
                  description: '[INTERNAL] Tenant principal kind.'
                  type: string
                  enum:
                    - member
                    - operator
                    - virtual
              required:
                - name
              additionalProperties: false
      responses:
        '200':
          description: Create a tenant in the current workspace.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  meta:
                    type: object
                    additionalProperties: {}
                  key:
                    type: string
                  kind:
                    type: string
                    enum:
                      - member
                      - operator
                      - virtual
                  isReadOnly:
                    type: boolean
                  fields:
                    type: object
                    additionalProperties: {}
                  credentials: {}
                  lastActiveAt:
                    type: string
                  isTest:
                    type: boolean
                  isBillable:
                    type: boolean
                  isActive:
                    type: boolean
                  aiCreditsRolling30DayLimit:
                    nullable: true
                    type: number
                    minimum: 0
                  createdAt:
                    type: string
                  archivedAt:
                    type: string
                required:
                  - id
                  - name
                additionalProperties: false
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````