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

# Upload CSD certificate (owner only)

> ⚠️ SECURITY: Only the organization OWNER can upload CSD certificates. Files are encrypted with AWS KMS and stored in S3.



## OpenAPI

````yaml https://api.timbrix.mx/api/openapi.json put /organizations/{id}/certificates
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/{id}/certificates:
    put:
      tags:
        - organizations
      summary: Upload CSD certificate (owner only)
      description: >-
        ⚠️ SECURITY: Only the organization OWNER can upload CSD certificates.
        Files are encrypted with AWS KMS and stored in S3.
      operationId: OrganizationsController_uploadCertificate
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadCertificatesDto'
      responses:
        '200':
          description: Certificate uploaded successfully. Returns certificate metadata.
        '400':
          description: >-
            Invalid certificate files or password. Check file format and try
            again.
        '401':
          description: Authentication required. Provide a valid bearer token.
        '403':
          description: Access denied. Only the organization owner can upload certificates.
        '404':
          description: Organization not found with the provided ID.
      security:
        - bearer: []
components:
  schemas:
    UploadCertificatesDto:
      type: object
      properties:
        password:
          type: string
          description: Certificate password
          example: mySecurePassword123
          minLength: 1
      required:
        - password
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````