Saltar al contenido principal
POST
/
{slug}
/
files
/
request-upload
Iniciar upload: obtener signed URL
curl --request POST \
  --url https://app.1to1.ai/api/v1/public/{slug}/files/request-upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "invoice.pdf",
  "mime_type": "application/pdf",
  "size_bytes": 524288
}
'
{
  "file_uuid": "550e8400-e29b-41d4-a716-446655440000",
  "upload_url": "<string>",
  "upload_token": "<string>",
  "storage_path": "<string>",
  "expires_at": "2026-04-19T12:05:00.000Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.1to1ai.com/llms.txt

Use this file to discover all available pages before exploring further.

Autorizaciones

Authorization
string
header
requerido

API token emitido desde Settings → API Token del dashboard 1TO1 AI. Enviar en header Authorization: Bearer sk_1to1_...

Parámetros de ruta

slug
string
requerido

Slug del business, case-insensitive. Debe coincidir con el business del token.

Ejemplo:

"acme"

Cuerpo

application/json
filename
string
requerido

Nombre original del archivo. Se preserva para mostrar al receptor final.

Required string length: 1 - 255
Ejemplo:

"invoice.pdf"

mime_type
enum<string>
requerido

MIME type del archivo. Stickers (image/webp) no se soportan en la API v1 — WhatsApp los maneja como tipo de mensaje aparte.

Opciones disponibles:
image/jpeg,
image/png,
video/mp4,
video/3gpp,
audio/ogg,
application/pdf,
application/msword,
application/vnd.openxmlformats-officedocument.wordprocessingml.document,
application/vnd.ms-excel,
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
application/vnd.ms-powerpoint,
application/vnd.openxmlformats-officedocument.presentationml.presentation,
text/plain
Ejemplo:

"application/pdf"

size_bytes
integer
requerido

Tamaño declarado en bytes. Se re-valida en /confirm.

Rango requerido: 1 <= x <= 104857600
Ejemplo:

524288

Respuesta

Upload URL emitido. Continúa con PUT a upload_url y luego POST /files/confirm.

file_uuid
string<uuid>
requerido

UUID generado por el server. Se usa en /confirm y al adjuntar en mensajes.

Ejemplo:

"550e8400-e29b-41d4-a716-446655440000"

upload_url
string<uri>
requerido

Signed URL para hacer PUT con el binario directo a Supabase Storage. Expira en 5 minutos.

upload_token
string
requerido

Token firmado opcional si el cliente usa el SDK de Supabase en vez de un PUT raw.

storage_path
string
requerido

Path interno en el bucket. Informativo — el cliente solo debe usar upload_url.

expires_at
string<date-time>
requerido

Instante (UTC) en que upload_url deja de ser válido.

Ejemplo:

"2026-04-19T12:05:00.000Z"