Assets

Retrieves an asset by ID, including a signed URL for downloading the file.

Use this endpoint when you have an asset ID and need the asset's current metadata or a new download URL. For example, invoice responses include attached assets in attachmentAssets; pass an attachment's id to this endpoint to retrieve its metadata and a new download URL.

get/assets/{id}

Request

  • Base URL
    https://sandbox.sequencehq.com/api
  • URL
    https://sandbox.sequencehq.com/api/assets/{id}
  • Auth
    none declared. Required headers: Authorization

Path parameters

idstring required

Asset ID

Headers

Authorizationstring required

Your API credentials. Eg. Basic {credentials}.

Sequence-Version'2024-07-30'

Use this header to select an API version

Response

OK

idstring required

Unique ID for this asset.

createdBystring required

The ID of the asset creator. A Sequence user id or API key id, as identified by createdByType.

createdByType'SEQUENCE_USER' | 'API_CLIENT' required
type'IMAGE' | 'DOCUMENT' | 'BINARY' required
format'JPEG' | 'JPG' | 'PNG' | 'PDF' | 'CSV' | 'TXT' | 'RTF' | 'MD' | 'XLS' | 'XLSX' | 'XLSM' | 'DOC' | 'DOCX' | 'ZIP' | 'ODT' | 'ODS' required
fileNamestring required

Original filename provided when the asset was uploaded.

fileSizeBytesinteger required

Size of the stored file, in bytes. This may differ from the size of the uploaded file.

urlstring required

Signed URL for downloading the file. The URL expires one week after it is generated. Call Get an asset when you need a new URL.

createdAtstring required

The time at which this asset was created. Formatted as an ISO 8601 timestamp.

Example response

{
  "id": "e007e884-5100-4183-8355-4771865cb4dd",
  "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b",
  "createdByType": "SEQUENCE_USER",
  "type": "IMAGE",
  "format": "PNG",
  "fileName": "my-image.png",
  "fileSizeBytes": 12345,
  "url": "https://assets.sequencehq.com/1986c663-9ee9-4811-bfbf-57d2ad666096/images/e007e884-5100-4183-8355-4771865cb4dd.png?token=grhc3VtaoNLAifDBFXWYLHcNnK3XJHzFjZ4iMf78Ozg&expires=604800",
  "createdAt": "2023-11-27T12:00:00Z"
}

Changes