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

# Create a new tenant for a user (v2)



## OpenAPI

````yaml products/didx-me/api-reference/v1/me-wallet.json post /v2/tenants/{userId}
openapi: 3.0.0
info:
  version: 1.0.0
  title: Me Wallet API
  description: >2-

          
    OpenAPI documentation for Me Wallet API

          
    Following JSON:API spec https://jsonapi.org/format/ approach to response
    payload format.


    **v1 endpoints are deprecated.** See the [Migration Guide (v1 to
    v2)](migration-guide) for details.

          
     - [JSON - OpenAPI Specification](/me-wallet/api/openapi.json)
servers:
  - url: https://test.didxtech.com/me-wallet/api
security:
  - bearerAuth: []
tags:
  - name: users
    description: User info
  - name: tenants
    description: Tenant management
  - name: credentials
    description: User credential management
  - name: presentations
    description: Presentation management
  - name: org-credentials
    description: Organization endpoints — credential issuance
  - name: org-presentations
    description: Organization endpoints — presentation requests
paths:
  /v2/tenants/{userId}:
    post:
      tags:
        - tenants
      summary: Create a new tenant for a user.
      parameters:
        - schema:
            type: string
          required: true
          name: userId
          in: path
      responses:
        '201':
          description: Tenant created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantV2ApiResponse'
components:
  schemas:
    TenantV2ApiResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
            userId:
              type: string
            rootAgentName:
              type: string
          required:
            - id
            - userId
            - rootAgentName
        links:
          $ref: '#/components/schemas/ApiLinks'
        meta:
          $ref: '#/components/schemas/ApiMeta'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiError'
      required:
        - data
    ApiLinks:
      type: object
      properties:
        self:
          type: string
          format: uri
        first:
          type: string
          format: uri
        last:
          type: string
          format: uri
        prev:
          type: string
          format: uri
        next:
          type: string
          format: uri
        related:
          type: string
          format: uri
    ApiMeta:
      type: object
      additionalProperties:
        nullable: true
    ApiError:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              type: string
            parameter:
              type: string
        meta:
          type: object
          additionalProperties:
            nullable: true
      required:
        - detail
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````