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

# Get a registered sub-tenant

> Retrieves a single registered sub-tenant by its registration ID. Accepts both public and secret keys.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/triglit/openapi.documented.yml get /v1/gateway/sub-tenants/{id}
openapi: 3.0.0
info:
  title: Triglit
  description: Documentação da API do Triglit
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /v1/gateway/sub-tenants/{id}:
    get:
      tags:
        - Sub-Tenants
      summary: Get a registered sub-tenant
      description: >-
        Retrieves a single registered sub-tenant by its registration ID. Accepts
        both public and secret keys.
      operationId: publicsubtenants_getSubTenant_v1
      parameters:
        - name: id
          required: true
          in: path
          description: Sub-tenant registration ID
          schema:
            example: st_abc123def456
            type: string
        - name: X-API-Key
          in: header
          description: Chave de API do tenant (publishable key ou secret key)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Sub-tenant found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubTenantResponseDto'
        '401':
          description: API key não fornecida, inválida ou não encontrada.
        '403':
          description: Tipo de chave não permitido para este endpoint.
        '404':
          description: Sub-tenant not found
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Triglit from 'triglit';


            const client = new Triglit({
              apiKey: 'My API Key',
            });


            const subTenant = await
            client.subTenants.retrieve('st_abc123def456');


            console.log(subTenant.id);
components:
  schemas:
    SubTenantResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Unique registration identifier
          example: st_abc123def456
        tenantId:
          type: string
          description: Tenant identifier
          example: tenant_123
        subTenantId:
          type: string
          description: The actual sub-tenant identifier used in workflows/runs/metrics
          example: production
        name:
          type: string
          description: Display name for the sub-tenant
          example: Production Environment
        description:
          type: string
          description: Optional description
          example: Main production environment for customer workflows
        isRegistered:
          type: boolean
          description: Whether this sub-tenant is registered (always true for this DTO)
          example: true
        createdAt:
          type: string
          description: Creation timestamp
          example: '2024-01-15T10:30:00.000Z'
        updatedAt:
          type: string
          description: Last update timestamp
          example: '2024-01-15T10:30:00.000Z'
      required:
        - id
        - tenantId
        - subTenantId
        - name
        - isRegistered
        - createdAt
        - updatedAt
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Chave de API do tenant (publishable key ou secret key)

````