Files

Generate signed URL

Changed on

Generate a signed URL for a specific file in your HubSpot account. This endpoint allows you to specify the size of the file, the expiration time for the URL, and whether the image should be upscaled. It is useful for securely sharing files with a limited lifespan.

get/files/2026-09/files/{fileId}/signed-url

Request

  • Base URL
    https://api.hubapi.com
  • URL
    https://api.hubapi.com/files/2026-09/files/{fileId}/signed-url
  • Auth
    OAuth 2
    Authorization code: https://app.hubspot.com/oauth/authorize
    Token URL: https://api.hubapi.com/oauth/v1/token scopes: files.ui_hidden.read

Path parameters

fileIdstring required

The unique identifier of the file for which to generate a signed URL.

Query parameters

expirationSecondsinteger

The duration in seconds for which the signed URL will remain valid.

size'icon' | 'medium' | 'preview' | 'thumb'

The desired size of the file. Valid values are 'thumb', 'icon', 'medium', and 'preview'.

upscaleboolean

A boolean indicating whether the image should be upscaled if necessary.

Response

successful operation

expiresAtstring date-time required

The date and time when the URL expires, in ISO 8601 format.

extensionstring

The file extension of the file.

heightinteger

The height of the file in pixels.

namestring

The name of the file.

sizeinteger

The size of the file in bytes.

typestring

The type of the file.

urlstring required

The signed URL string that provides access to the file.

widthinteger

The width of the file in pixels.

Changes

    • info

      api tag Files added

    • info

      api tag Basic removed

    • info

      the security scope files.ui_hidden.read was added to the endpoint's security scheme oauth2

    • info

      the security scope files.read was removed from the endpoint's security scheme oauth2