1. file
Super Drive Contábil
  • auth
    • signin
      POST
    • forgot-password
      POST
    • change-password
      PATCH
    • generate-access-token
      POST
  • directory
    • create-directorie
      POST
    • list-all-directories
      GET
    • list-all-subdirectories-from-directory
      GET
    • list-files-in-directories
      GET
    • find-directorie-by-id
      GET
    • move-directory
      PATCH
    • delete-directory
      DELETE
    • change-directory
      PATCH
    • delete-directory
      DELETE
    • search-files-and-directories
      GET
    • move-directories-batch
      PATCH
    • delete-directories-batch
      DELETE
    • list-directory-name-suggestions
      GET
  • customers
    • create-customer
    • find-customer-by-id
    • list-all-customers
    • change-customer
    • delete-customer
    • cancel-delete-customer
    • permanent-delete-customer
    • import-customers
  • department
    • create-department
    • find-department-by-id
    • list-all-departments
    • list-users-in-deparment
    • change-department
    • delete-department
  • contacts
    • create-contact
    • list-all-contacts
    • list-files-by-contact
    • list-contact-files-by-external-id
    • send-file-to-trash
    • restore-file-to-trash
    • delete-file-from-contact
    • send-many-files-to-trash
    • restore-many-files-to-trash
    • delete-many-files-from-contact
    • restore-file-from-trash
    • upload-file-from-contact
  • users
    • create-user
    • list-all-users
    • find-user-by-id
    • change-user
    • reset-user-password
    • delete-user
  • organization-channels
    • create-organization-channel
    • connected-organization-channel
    • disconnect-organization-channel
    • change-organization-channel
    • list-all-organization-channels
  • automations
    • delete-automation
    • upload-file-from-desktop
    • create-sharing-automation
    • create-automated-task-completion
    • create-automation
    • create-automation-ai
    • change-automation
    • list-all-automations
  • file
    • share-file
      POST
    • find-file-by-id
      GET
    • change-file
      PATCH
    • list-all-files
      GET
    • delete-file
      DELETE
    • delete-many-files
      DELETE
    • move-file
      PATCH
    • move-many-files
      PATCH
    • generate-file-upload-urls
      POST
    • storage-events
      POST
  • zappy
    • list-sections
    • list-connections
  • customer-portal
    • directories
      • list-directories-from-root
      • upload-file
      • list-all-subdirectories-from-directory
      • list-files-in-directory
      • list-files-from-root-directory
    • file
      • list-all-files
    • auth
      • signin
      • forgot-password-customer
      • change-password-customer
      • refresh-access-token
    • customer
      • find-customer-by-id
      • search-resources
    • change-request
      • create-change-request
    • task
      • list-all-task
      • find-task-by-id
      • upload-attachments
    • process
      • find-process-by-id
      • list-all-process
      • upload-file-by-activity
    • overview
      • list-in-progress-process
      • list-pending
  • task-templates
    • delete-task-template
    • create-task-template
    • change-task-template
    • find-task-template-by-id
    • list-all-task-template
  • task
    • delete-task
    • create-task
    • create-task-bacth
    • change-task
    • find-task-by-id
    • list-all-task
  • chat plataforma
    • list-sectors
    • list-connections
  • process-model
    • delete-process-model
    • create-process-model
    • change-process-model
    • list-all-process-model
    • find-process-model -by-id
  • process
    • delete-process
    • create-process
    • create-process-comments
    • list-comments-by-process
    • change-process-stage
    • change-process-activity
    • cancel-process
    • complete-process
    • generate-link-process-detail
    • access-by-link
    • share-process
    • find-process-by-id
    • list-all-process
    • upload-file-by-process-comment
    • upload-file-by-activity
    • upload-activity-file-by-customer
  • directory-structure-model
    • create-directory-structure-model
    • change-directory-structure-model
    • delete-directory-structure-model
    • list-all-directory-structure-model
    • find-directory-structure-model -by-id
  • api-keys
    • create-api-key
    • change-api-key
    • list-all-api-keys
  • dashboard
    • file-storage-overview
    • channel-file-overview
    • summary-overview
  • tax
    • simples-nacional
      • Calculate Declaration
      • Correct Declaration
      • Transmit Declaration
      • Rectify Declaration
      • generate-das
      • Declarations Overview
      • List Declarations
      • Find Declaration By Id
      • share-das
      • generate-das-link
      • sync-declaration
      • List Declarations By Customer
    • mailbox
      • List Mailbox Messages
      • Find Mailbox Message By Id
    • mei
      • Generate DAS
      • List DAS
      • Find DAS By Id
      • Overview
      • Generate link
      • share-mei-das
      • List DAS By Customer
  • Schemas
    • Signin
  1. file

generate-file-upload-urls

Developing
POST
https://api.superdrivecontabil.com.br/v1/files/direct-uploads
Gera URLs presignadas para upload direto no storage (R2). O arquivo não passa pela API. Até 50 MB retorna um PUT único (type=single); acima disso retorna multipart (type=multipart) com uma URL por parte (partSize bytes cada, última pode ser menor). Limites: 20 arquivos por requisição, 300 MB por arquivo. O File só é criado no confirm. Guarde o uploadToken de cada arquivo: ele é exigido em POST /v1/files/confirm. URLs single expiram em 15 min; multipart em 2 h.

Request

Header Params

Body Params application/json

Example
Um arquivo pequeno e um grande
{
  "directoryId": "019c6808-7d7f-76cb-9e1d-ee89e2ed633d",
  "files": [
    {
      "fileName": "contrato.pdf",
      "mimeType": "application/pdf",
      "size": 1048576
    },
    {
      "fileName": "contrato.zip",
      "mimeType": "application/x-zip-compressed",
      "size": 1048576
    }
  ]
}

Responses

🟢202Success
application/json
Bodyapplication/json

Example
{
  "message": "URLs de upload geradas com sucesso",
  "body": [
    {
      "fileId": "01a01a89-f9f0-71ff-8cc8-53b97aa91566",
      "fileName": "contrato.pdf",
      "upload": {
        "type": "single",
        "url": "https://<account>.r2.cloudflarestorage.com/bucket/org/pending/01a01a89.pdf?X-Amz-...",
        "headers": {
          "Content-Type": "application/pdf"
        }
      },
      "uploadToken": "eyJhbGciOi...",
      "expiresAt": "2026-10-16T15:20:00.000Z"
    },
    {
      "fileId": "01a01a89-f9f0-71ff-8cc8-53b97aa91567",
      "fileName": "video.mp4",
      "upload": {
        "type": "multipart",
        "partSize": 16777216,
        "parts": [
          {
            "partNumber": 1,
            "url": "https://..."
          },
          {
            "partNumber": 2,
            "url": "https://..."
          }
        ]
      },
      "uploadToken": "eyJhbGciOi...",
      "expiresAt": "2026-10-16T17:05:00.000Z"
    }
  ]
}
🟠401Unauthorized
🟠403Storage do plano esgotado
🟠404Diretório não encontrado
🟠422Validação
Modified at 2026-11-25 20:34:27
Previous
move-many-files
Next
storage-events