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

# Get Organization

> Retrieves organization details with normalized structure. User must be a member (owner, admin, or member) to access.

Retrieves organization details by ID.

## Authentication

This endpoint requires authentication via Bearer token:

* **Authorization**: `Bearer <token>`

## Permissions

User must be a **member** of the organization (owner, admin, or member role).

## Path Parameters

| Parameter | Type   | Required | Description       |
| --------- | ------ | -------- | ----------------- |
| `id`      | string | Yes      | Organization UUID |

## Response Fields

The response includes:

| Field                | Type   | Description                               |
| -------------------- | ------ | ----------------------------------------- |
| `id`                 | string | Organization UUID                         |
| `name`               | string | Organization name                         |
| `slug`               | string | URL-friendly identifier                   |
| `logo`               | string | Logo URL (if set)                         |
| `plan`               | string | Subscription plan (free, pro, enterprise) |
| `ownerId`            | string | Owner user UUID                           |
| `stripeCustomerId`   | string | Stripe customer ID (if exists)            |
| `subscriptionStatus` | string | Current subscription status               |
| `createdAt`          | string | ISO 8601 timestamp                        |
| `updatedAt`          | string | ISO 8601 timestamp                        |

## Example Request

```bash theme={null}
curl -X GET http://localhost:3001/api/organizations/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer <your_token>"
```

## Example Response

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Acme Corp",
  "slug": "acme-corp",
  "logo": "https://example.com/logo.png",
  "plan": "pro",
  "ownerId": "123e4567-e89b-12d3-a456-426614174000",
  "stripeCustomerId": "cus_ABC123",
  "subscriptionStatus": "active",
  "subscriptionPeriodEnd": "2026-01-26T10:00:00Z",
  "createdAt": "2025-01-26T10:00:00Z",
  "updatedAt": "2025-12-26T10:00:00Z"
}
```

## Common Errors

### 404 Not Found

The organization with the specified ID does not exist.

```json theme={null}
{
  "statusCode": 404,
  "message": "Organization not found"
}
```

### 403 Forbidden

User is not a member of the organization.

```json theme={null}
{
  "statusCode": 403,
  "message": "Access denied. User is not a member of this organization"
}
```

## Use Cases

* Display organization details in dashboard
* Verify organization membership before allowing access
* Show organization settings to users
* Check subscription status and plan
* Display organization branding (logo, name)


## OpenAPI

````yaml GET /organizations/{id}
openapi: 3.1.0
info:
  title: Timbrix API
  description: >-
    REST API with OAuth2 server for managing organizations, members, and
    webhooks
  version: '1.0'
  contact: {}
servers:
  - url: http://sandbox.mintlify.com
    description: Sandbox environment
  - url: http://localhost:3001/api
    description: Local development
security: []
tags:
  - name: organizations
    description: Organization management endpoints
  - name: oauth
    description: OAuth2 authentication and authorization
  - name: webhooks
    description: Webhook configuration and delivery
  - name: users
    description: User information endpoints
  - name: api-keys
    description: API Keys management and validation
paths:
  /organizations/{id}:
    get:
      tags:
        - organizations
      summary: Get organization by ID
      description: >-
        Retrieves organization details with normalized structure. User must be a
        member (owner, admin, or member) to access.
      operationId: OrganizationsController_getById
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: Organization retrieved successfully with details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationResponseDto'
        '401':
          description: Authentication required. Provide a valid bearer token.
        '403':
          description: Access denied. User is not a member of this organization.
        '404':
          description: Organization not found with the provided ID.
      security:
        - bearer: []
components:
  schemas:
    OrganizationResponseDto:
      type: object
      properties:
        id:
          type: string
          example: 5a2a307be93a2f00129ea035
        slug:
          type: string
          example: mi-empresa
        logo_url:
          type: string
          example: https://storage.example.com/organization/logo.jpg
        timezone:
          type: string
          example: America/Mexico_City
        created_at:
          type: string
          example: '2017-05-05T20:55:33.468Z'
        updated_at:
          type: string
          example: '2017-05-05T20:55:33.468Z'
        is_production_ready:
          type: boolean
          example: true
        pending_steps:
          type: array
          items:
            $ref: '#/components/schemas/PendingStepDto'
        legal:
          $ref: '#/components/schemas/LegalDto'
        customization:
          $ref: '#/components/schemas/CustomizationDto'
        certificate:
          $ref: '#/components/schemas/CertificateDto'
        fiel:
          $ref: '#/components/schemas/FielDto'
        receipts:
          $ref: '#/components/schemas/ReceiptsDto'
        self_invoice:
          $ref: '#/components/schemas/SelfInvoiceDto'
      required:
        - id
        - slug
        - timezone
        - created_at
        - updated_at
        - is_production_ready
        - legal
        - customization
        - certificate
        - fiel
        - receipts
        - self_invoice
    PendingStepDto:
      type: object
      properties:
        type:
          type: string
          example: legal
        description:
          type: string
          example: Complete legal information
      required:
        - type
        - description
    LegalDto:
      type: object
      properties:
        name:
          type: string
          example: Mi Empresa
        legal_name:
          type: string
          example: Mi Empresa SA de CV
        tax_system:
          type: string
          example: '601'
        website:
          type: string
          example: https://miempresa.com
        phone:
          type: string
          example: +52 555 123 4567
        rfc:
          type: string
          example: EKU9003173C9
        zip:
          type: string
          example: '86500'
        address:
          $ref: '#/components/schemas/AddressDto'
    CustomizationDto:
      type: object
      properties:
        has_logo:
          type: boolean
          example: true
        color:
          type: string
          example: BADA55
        next_folio_number:
          type: number
          example: 123
        next_folio_number_test:
          type: number
          example: 123
        pdf_extra:
          $ref: '#/components/schemas/PdfExtraOptionsDto'
      required:
        - has_logo
    CertificateDto:
      type: object
      properties:
        has_certificate:
          type: boolean
          example: true
        updated_at:
          type: string
          example: '2023-05-05T20:55:33.468Z'
        expires_at:
          type: string
          example: '2025-05-05T20:55:33.468Z'
        serial_number:
          type: string
          example: '30001000000300000101'
      required:
        - has_certificate
    FielDto:
      type: object
      properties:
        has_fiel:
          type: boolean
          example: true
        updated_at:
          type: string
          example: '2023-05-05T20:55:33.468Z'
        expires_at:
          type: string
          example: '2025-05-05T20:55:33.468Z'
        serial_number:
          type: string
          example: '30001000000300000101'
      required:
        - has_fiel
    ReceiptsDto:
      type: object
      properties:
        periodicity:
          type: string
          example: day
          enum:
            - day
            - week
            - month
        duration_days:
          type: number
          example: 7
        next_folio_number:
          type: number
          example: 123
        next_folio_number_test:
          type: number
          example: 123
    SelfInvoiceDto:
      type: object
      properties:
        allowed_cfdi_uses:
          example:
            - G01
            - G03
          type: array
          items:
            type: string
        apply_resico_isr:
          type: boolean
          example: true
        support_email:
          type: string
          example: soporte@miempresa.com
        support_email_verified:
          type: boolean
          example: true
    AddressDto:
      type: object
      properties:
        street:
          type: string
          example: Blvd. Atardecer
        exterior:
          type: string
          example: '142'
        interior:
          type: string
          example: '4'
        neighborhood:
          type: string
          example: Centro
        city:
          type: string
          example: Huatabampo
        municipality:
          type: string
          example: Huatabampo
        zip:
          type: string
          example: '86500'
        state:
          type: string
          example: Sonora
    PdfExtraOptionsDto:
      type: object
      properties:
        codes:
          type: boolean
          example: true
        address_codes:
          type: boolean
          example: true
        product_key:
          type: boolean
          example: true
        round_unit_price:
          type: boolean
          example: false
        tax_breakdown:
          type: boolean
          example: true
        ieps_breakdown:
          type: boolean
          example: true
        render_carta_porte:
          type: boolean
          example: false
        repeat_signature:
          type: boolean
          example: false
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````