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

# Transfer organization ownership (owner only)

> The owner hands the organization to another member (by user id). The new owner gets the owner role and the previous owner becomes an admin. Emits member.role_updated for both users.



## OpenAPI

````yaml https://api.timbrix.mx/api/openapi.json post /organizations/{id}/transfer-ownership
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
  - name: request-logs
    description: API request log
paths:
  /organizations/{id}/transfer-ownership:
    post:
      tags:
        - organizations
      summary: Transfer organization ownership (owner only)
      description: >-
        The owner hands the organization to another member (by user id). The new
        owner gets the owner role and the previous owner becomes an admin. Emits
        member.role_updated for both users.
      operationId: OrganizationsController_transferOwnership
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferOwnershipDto'
      responses:
        '200':
          description: Ownership transferred. Returns the organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationResponseDto'
        '403':
          description: >-
            Only the owner can transfer, and a closed organization cannot be
            transferred.
        '404':
          description: The target user is not a member of the organization.
        '422':
          description: 'CANNOT_TRANSFER_TO_SELF: pick another member.'
      security:
        - bearer: []
components:
  schemas:
    TransferOwnershipDto:
      type: object
      properties:
        newOwnerUserId:
          type: string
          description: User id of the member who becomes the new owner
          example: 5b0d8f3e-7d1c-4a62-9a53-0d6f3f1a2b4c
      required:
        - newOwnerUserId
    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'
        closed_at:
          type: string
          nullable: true
          example: null
          description: >-
            TIM-160: when the organization was closed (read-only). Null if it is
            open.
        retained_until:
          type: string
          nullable: true
          example: null
          description: >-
            TIM-160: for a closed organization, the date until which its CFDI
            are retained and downloadable. Null if it is open.
        data_purge_at:
          type: string
          nullable: true
          example: null
          description: >-
            TIM-162: for a closed organization, the date on which its customers,
            products, webhooks, API keys, OAuth apps and invites are deleted (90
            days after closing). Invoices are kept. Null if it is open.
        data_purged_at:
          type: string
          nullable: true
          example: null
          description: >-
            TIM-162: when that data was deleted. Null if it has not been deleted
            yet.
      required:
        - id
        - slug
        - timezone
        - created_at
        - updated_at
        - is_production_ready
        - legal
        - customization
        - certificate
        - fiel
        - receipts
        - self_invoice
        - closed_at
        - retained_until
        - data_purge_at
        - data_purged_at
    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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.