/documents/v1/link

Link files from Documents to other areas of SafetyCulture in a single request, such as linking files to assets or Heads Ups. When you update a linked file in Documents, SafetyCulture syncs the update everywhere the file is linked.

You can link up to 100 files per request. File linking does not replace access controls.

Requirements

📘

Supported link targets

Set domain to the feature you are linking to. The supported values come from LinkedFileDomain. We may add more domains over time.

Body Params
file_ids
array of strings

The ids of the files to be linked
To get the file_id, open the file in the SafetyCulture web app and copy the last part of the URL.
For example, in this link https://app.safetyculture.com/documents/document/765aa2e6-69cb-43b5-8ab4-48ab26e2a094,
the file ID is 765aa2e6-69cb-43b5-8ab4-48ab26e2a094.

file_ids
entity_ids
array of strings
required

The ids of the entities that the file(s) are being linked to
To get the entity_id, open the entity (e.g. asset) in the SafetyCulture web app and copy the last part of the URL.
For example, in this link https://app.safetyculture.com/assets/765aa2e6-69cb-43b5-8ab4-48ab26e2a094,
the entity ID is 765aa2e6-69cb-43b5-8ab4-48ab26e2a094.

entity_ids*
string
enum
required
Defaults to LINKED_FILE_DOMAIN_UNSPECIFIED

The domain of the entity that the file(s) are being linked to
If the entity is an asset, use DOMAIN_ASSET

Allowed:
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json