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

# Datastore - File Upload

Sube un archivo directamente (vía `multipart/form-data`). El archivo se guarda en S3 y se encola para procesamiento automático.

### Ejemplo

```bash theme={null}
curl -X POST https://app.braviloai.com/api/external/datastores/file-upload/${datastoreId} \
-H "Authorization: Bearer ${API_KEY}" \
-F "file=@documento.xlsx"
```

> El procesamiento es asíncrono. El estado pasará a `running` y luego `success`/`error`.


## OpenAPI

````yaml POST /external/datastores/file-upload/{id}
openapi: 3.0.1
info:
  title: Bravilo AI.ai - API OpenAPI specifications
  description: ''
  termsOfService: http://braviloai.com/terms
  contact:
    email: support@braviloai.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://app.braviloai.com/api
security:
  - bearerAuth: []
tags:
  - name: agents
  - name: datastores
  - name: datasources
paths:
  /external/datastores/file-upload/{id}:
    post:
      tags:
        - datastores
      summary: Sube un archivo a un datastore (multipart/form-data)
      parameters:
        - in: path
          name: id
          schema:
            type: string
          required: true
          description: ID del datastore
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: Archivo subido y encolado para procesamiento
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Datasource'
        '400':
          description: Archivo inválido o demasiado grande
        '401':
          description: Unauthorized
      security:
        - bearerAuth: []
components:
  schemas:
    Datasource:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        name:
          type: string
        status:
          enum:
            - unsynched
            - pending
            - running
            - synched
            - error
            - usage_limit_reached
        groupId:
          type: string
        updatedAt:
          type: string
          format: date
        createdAt:
          type: string
          format: date
        lastSynch:
          type: string
          format: date
        config:
          type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````