> ## 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.

# Create a new organization

> Creates a new organization with the authenticated user as the owner. All authenticated users can create organizations.



## OpenAPI

````yaml https://api.timbrix.mx/api/openapi.json post /organizations
openapi: 3.0.0
info:
  title: Timbrix API
  description: >-
    API de facturación electrónica CFDI 4.0 para México, con servidor OAuth2
    para gestionar organizaciones, miembros y webhooks. Compatible con agentes
    de IA — ver la extensión `x-ai-agent-friendly` en la raíz de esta spec.


    REST API with OAuth2 server for managing organizations, members, and
    webhooks.
  version: '1.0'
  contact: {}
servers: []
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:
    post:
      tags:
        - organizations
      summary: Create a new organization
      description: >-
        Creates a new organization with the authenticated user as the owner. All
        authenticated users can create organizations.
      operationId: OrganizationsController_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationDto'
      responses:
        '201':
          description: >-
            Organization created successfully. The user becomes the organization
            owner.
        '400':
          description: Invalid input data. Check the validation errors in the response.
        '401':
          description: Authentication required. Provide a valid bearer token.
        '409':
          description: Organization slug already exists. Choose a different slug.
      security:
        - bearer: []
components:
  schemas:
    CreateOrganizationDto:
      type: object
      properties:
        name:
          type: string
          description: Organization name
          example: Acme Corporation
          minLength: 1
          maxLength: 100
        slug:
          type: string
          description: Organization URL slug
          example: acme-corp
          pattern: ^[a-z0-9-]+$
          minLength: 1
          maxLength: 100
        logo:
          type: string
          description: Organization logo URL
          example: https://example.com/logo.png
      required:
        - name
        - slug
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````