Limai Docs
API ReferenceDocument Processing

Access Link

Generate a temporary access link for viewing a processed document.

POST/api/v1/documents/{fileId}/access-link

Generate a temporary, shareable access link for viewing a processed document in the LimAI web interface. Useful for sharing document results with stakeholders who may not have API access.

Parameters

NameTypeInRequiredDescription
fileIdstringpathYesThe file ID of the processed document.
expiresInMinutesnumberbodyNoHow long the link remains valid. Maximum 1440 (24 hours).(default: 5)
maxUsesnumber | nullbodyNoMaximum number of times the link can be used. Set to null for unlimited.(default: 1)

Request

const response = await fetch(
`https://app.limai.io/api/v1/documents/${fileId}/access-link`,
{
  method: "POST",
  headers: {
    "Authorization": `Bearer ${API_TOKEN}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    expiresInMinutes: 60,
    maxUses: 5
  })
}
)
const { accessUrl, expiresAt } = await response.json()

Response

Response200
{
  "accessUrl": "https://app.limai.io/access/document?token=a1b2c3d4e5f6...",
  "expiresAt": "2024-01-15T11:30:00.000Z",
  "maxUses": 5,
  "fileId": "file_abc123def456"
}

Response Fields

FieldTypeDescription
accessUrlstringThe shareable URL for viewing the document
expiresAtstringISO 8601 timestamp when the link expires
maxUsesnumber | nullMaximum number of uses, or null for unlimited
fileIdstringThe file ID this link provides access to