API ReferenceDocument Processing
Access Link
Generate a temporary access link for viewing a processed document.
POST
/api/v1/documents/{fileId}/access-linkGenerate 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
| Name | Type | In | Required | Description |
|---|---|---|---|---|
fileId | string | path | Yes | The file ID of the processed document. |
expiresInMinutes | number | body | No | How long the link remains valid. Maximum 1440 (24 hours).(default: 5) |
maxUses | number | null | body | No | Maximum 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
| Field | Type | Description |
|---|---|---|
accessUrl | string | The shareable URL for viewing the document |
expiresAt | string | ISO 8601 timestamp when the link expires |
maxUses | number | null | Maximum number of uses, or null for unlimited |
fileId | string | The file ID this link provides access to |