Preparar upload
curl --request POST \
--url https://api.lazydata.com.br/v1/storage/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"parent_id": "<string>"
}
'import requests
url = "https://api.lazydata.com.br/v1/storage/uploads"
payload = {
"name": "<string>",
"parent_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', parent_id: '<string>'})
};
fetch('https://api.lazydata.com.br/v1/storage/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lazydata.com.br/v1/storage/uploads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'parent_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lazydata.com.br/v1/storage/uploads"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"parent_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lazydata.com.br/v1/storage/uploads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"parent_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lazydata.com.br/v1/storage/uploads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"parent_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Assinatura de upload gerada.",
"result": {
"upload_url": "https://upload.lazydata.com.br/storage",
"signature": "<assinatura_de_upload>",
"signature_expires_at": "2026-06-22T14:00:00+00:00",
"max_size": 1073741824,
"file": {
"id": "9fcb573b-7f62-4774-978b-07e89dfef5f2",
"type": "file",
"name": "contrato.pdf",
"parent_id": null,
"extension": "pdf",
"content_type": null,
"size": 0,
"status": "waiting_upload",
"uploaded_at": null,
"created_at": "2026-06-22T11:59:40+00:00",
"updated_at": "2026-06-22T11:59:40+00:00"
}
}
}
{
"code": 400,
"message": "Nome do arquivo inválido."
}
{
"code": 403,
"message": "Limite de armazenamento excedido."
}
{
"code": 404,
"message": "Pasta não localizada."
}
{
"code": 409,
"message": "Já existe um arquivo com este nome nesta pasta."
}
Armazenamento
Preparar upload
Gere uma assinatura temporária para enviar um arquivo ao armazenamento.
POST
https://api.lazydata.com.br/
/
v1
/
storage
/
uploads
Preparar upload
curl --request POST \
--url https://api.lazydata.com.br/v1/storage/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"parent_id": "<string>"
}
'import requests
url = "https://api.lazydata.com.br/v1/storage/uploads"
payload = {
"name": "<string>",
"parent_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', parent_id: '<string>'})
};
fetch('https://api.lazydata.com.br/v1/storage/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lazydata.com.br/v1/storage/uploads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'parent_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lazydata.com.br/v1/storage/uploads"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"parent_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lazydata.com.br/v1/storage/uploads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"parent_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lazydata.com.br/v1/storage/uploads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"parent_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Assinatura de upload gerada.",
"result": {
"upload_url": "https://upload.lazydata.com.br/storage",
"signature": "<assinatura_de_upload>",
"signature_expires_at": "2026-06-22T14:00:00+00:00",
"max_size": 1073741824,
"file": {
"id": "9fcb573b-7f62-4774-978b-07e89dfef5f2",
"type": "file",
"name": "contrato.pdf",
"parent_id": null,
"extension": "pdf",
"content_type": null,
"size": 0,
"status": "waiting_upload",
"uploaded_at": null,
"created_at": "2026-06-22T11:59:40+00:00",
"updated_at": "2026-06-22T11:59:40+00:00"
}
}
}
{
"code": 400,
"message": "Nome do arquivo inválido."
}
{
"code": 403,
"message": "Limite de armazenamento excedido."
}
{
"code": 404,
"message": "Pasta não localizada."
}
{
"code": 409,
"message": "Já existe um arquivo com este nome nesta pasta."
}
Cria o registro inicial do arquivo e retorna uma assinatura temporária para envio ao serviço de upload.
Depois desta chamada, envie o arquivo para
upload_url usando o header X-LazyData-Upload-Signature.
{
"code": 200,
"message": "Assinatura de upload gerada.",
"result": {
"upload_url": "https://upload.lazydata.com.br/storage",
"signature": "<assinatura_de_upload>",
"signature_expires_at": "2026-06-22T14:00:00+00:00",
"max_size": 1073741824,
"file": {
"id": "9fcb573b-7f62-4774-978b-07e89dfef5f2",
"type": "file",
"name": "contrato.pdf",
"parent_id": null,
"extension": "pdf",
"content_type": null,
"size": 0,
"status": "waiting_upload",
"uploaded_at": null,
"created_at": "2026-06-22T11:59:40+00:00",
"updated_at": "2026-06-22T11:59:40+00:00"
}
}
}
{
"code": 400,
"message": "Nome do arquivo inválido."
}
{
"code": 403,
"message": "Limite de armazenamento excedido."
}
{
"code": 404,
"message": "Pasta não localizada."
}
{
"code": 409,
"message": "Já existe um arquivo com este nome nesta pasta."
}
Corpo da requisição
string
required
Nome do arquivo que será enviado.
string
ID da pasta de destino. Use
null para enviar para a raiz.Exemplo de corpo
{
"name": "contrato.pdf",
"parent_id": null
}
Resposta
| Campo | Tipo | Descrição |
|---|---|---|
upload_url | string | URL do serviço de upload. |
signature | string | Assinatura temporária usada no header de upload. |
signature_expires_at | string | Data de expiração da assinatura. |
max_size | integer | Tamanho máximo permitido em bytes. |
file | object | Registro inicial do arquivo. |
Próximo passo
Enviar arquivo
Envie o arquivo para
https://upload.lazydata.com.br/storage usando a assinatura retornada.⌘I

