Share Links

/assets/:assetId/share-links/:shareLinkId

Changed on

Change the settings of one of an asset's share links.

Any field not listed in the request body is ignored. Only the settings you send change. Everything else on the link, including its password, stays as it is. Send password: null or expiresAt: null to remove them.

password, expiresAt, requireAccount, comments and customFields depend on your workspace's plan; see the request body for what returns 422.

Returns 403 if the link lets visitors do something you can't do yourself, even when you only change active.

On a link pinned to a version, showAllVersions keeps the link pinned to the same version and changes only whether visitors can browse the asset's other versions.

Returns an empty body on success. Use GET /v1/assets/{assetId}/share-links to read the link's settings.

Requires the share_links.write and assets.read OAuth scopes.

patch/v1/assets/{assetId}/share-links/{shareLinkId}

Request

Request body

activeboolean

Whether the link works. A disabled link keeps its settings and can be enabled again.

allowDownloadboolean

Whether visitors can download the original files

passwordstring nullable

Password visitors must enter to open the link. null removes it. Never returned; read hasPassword instead.

expiresAtstring date-time nullable

When the link stops working. Must be in the future. null removes the expiration.

requireAccountboolean

Whether visitors must sign in to Air to open the link

comments'hidden' | 'read_only' | 'allowed'

What visitors can do with comments. allowed lets them add comments, which writes to your workspace.

customFields'hidden' | 'read_only' | 'editable'

What visitors can do with custom field values. editable lets them change values, which writes to your workspace.

showAllVersionsboolean

Whether visitors can browse the asset's other versions

Response

Share link updated successfully

Changes