Skip to Content

Get file by ID

You're viewing API version 2026-09, which is deprecated and stops working on October 1, 2027. To move your integration, see Upgrading to 2026-10.
GET
/api/v1/files/{id}

Retrieve file information and access URL.

URL Generation:

  • For PRIVATE files: Returns a fresh signed URL (valid for 15 minutes)
  • For PUBLIC files: Returns the permanent CloudFront URL

Response includes:

  • File metadata (filename, size, MIME type)
  • Visibility setting
  • Access URL
  • Upload information

Authorization

headerAuthorizationBearer <token>

Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.

Path Parameters

id*string

Header Parameters

authorization*string

Bearer token for API authentication

Response Body

File information with access URL

application/json
  1. response

File information with access URL

id*string

Unique file identifier

filename*string

Original filename

mimeType*string

MIME type of the file

size*number

File size in bytes

visibility*string

File visibility

Value in"PRIVATE""PUBLIC"
url*string

URL to access the file (signed URL for private, direct URL for public)

Formaturi
createdAt*string

Date and time when file was uploaded

Formatdate-time
updatedAt*string

Date and time when file was last updated

Formatdate-time
uploadedBy*

User who uploaded the file

Example Request
curl -X GET 'https://app.sajn.se/api/v1/files/string' \  -H 'authorization: string'
Example Response
{  "id": "string",  "filename": "string",  "mimeType": "string",  "size": 0,  "visibility": "PRIVATE",  "url": "http://example.com",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "uploadedBy": {    "id": "string",    "firstName": "string",    "lastName": "string",    "email": "string"  }}

Was this page helpful?