Axuz Developers

POST /teams/{teamId}/files/share-links

Criar share-link (legacy, sem password)

  • Access: Signed in
  • Service: https://files-api.axuz.net

Accepted authentication

  • sessionCookie — Sessão plena Axuz (cookie de sessão da casa). Sessão restrita é 403 enrollment_required.
  • bearerSession — JWT de acesso da sessão em `Authorization: Bearer`.

Só o uploader do arquivo ou owner/admin (W-012 S-2).

Parameters

NameInTypeRequiredDescription
teamIdpathstringyes

Request body

application/json · Required

NameTypeRequiredDescription
file_idstring<uuid>yes
expires_in_daysintegerno
{
  "file_id": "00000000-0000-0000-0000-000000000000",
  "expires_in_days": 1
}

Responses

201

Criado

NameTypeRequiredDescription
idstring<uuid>yes
team_idstring<uuid> | nullno

NULL em drive pessoal.

file_idstring<uuid>yes
tokenstringyes

Opaco (32B base64url ≈ 43 chars) OU UUID legacy. Vazio quando token_redacted=true.

token_redactedbooleanno

W-012 S-2 — true quando a listagem omitiu o token por o caller não ser quem criou o link.

has_passwordbooleanyes
allow_downloadbooleanyes
access_countintegeryes
last_access_atstring<date-time> | nullno
expires_atstring<date-time> | nullno
created_bystring<uuid>yes
created_atstring<date-time>yes
revoked_atstring<date-time> | nullno

401

Sem credencial valida

NameTypeRequiredDescription
errorstringyes

403

Sem permissão (ABAC/RBAC)

NameTypeRequiredDescription
errorstringyes

Chave/slug do erro

messagestringno

429

Limite de requisições excedido.

NameTypeRequiredDescription
errorstringyes

500

Erro interno. Tente de novo com backoff; reporte o X-Request-Id.

NameTypeRequiredDescription
errorstringyes

Examples

"Try it" is turned off in this reference. Use the examples with your test credential.

curl

curl -sS -X POST 'https://files-api.axuz.net/teams/TEAM_ID/files/share-links' \
  -H "Authorization: Bearer $AXUZ_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"file_id":"00000000-0000-0000-0000-000000000000","expires_in_days":1}'

Node.js

const res = await fetch("https://files-api.axuz.net/teams/TEAM_ID/files/share-links", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.AXUZ_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "file_id": "00000000-0000-0000-0000-000000000000",
    "expires_in_days": 1
  }),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());

Python

import os
import requests

res = requests.request(
    "POST",
    "https://files-api.axuz.net/teams/TEAM_ID/files/share-links",
    headers={
        "Authorization": f"Bearer {os.environ['AXUZ_TOKEN']}",
    },
    json={
        "file_id": "00000000-0000-0000-0000-000000000000",
        "expires_in_days": 1,
    },
    timeout=30,
)
res.raise_for_status()
print(res.json())