Pick the Upload File Asset From Url action (under Assets).
Fill in the fields below, then reference the result from later steps as {{uploadFileAssetFromUrl.response.data}}.
Request
Path parameters
datasetstringrequired
Query parameters
titlestring
Optional title for the asset
descriptionstring
Optional description for the asset
labelstring
Optional freeform label for the asset.
tagstring
Optional request tag for the upload. Learn more in the [request tag documentation](https://www.sanity.io/docs/platform-management/reference-api-request-tags).
creditLinestring
The credit to people or organizations required by the supplier of the asset to be used when published.
sourceNamestring
The name of the source if the asset is from an external service. Requires `sourceId`.
sourceIdstring
The ID of the asset within the external source. Required when `sourceName` is set, and ignored without it.
sourceUrlstring
The URL of the asset within the external source. Ignored without `sourceName`.
Request body
Enter the body as JSON in the step's Body field.
urlstring (uri)required
Public or preauthorized HTTPS URL returning the asset bytes. URLs with embedded usernames or passwords are not supported.
filenamestring
Optional original filename, including the extension. Must not contain path separators or a null character.
json
{"url":"string","filename":"string"}
Response
Returns 200 with an object. Read it in later steps with {{uploadFileAssetFromUrl.response.data.<field>}}.
documentobject
json
{"document":{}}
Need more? See the Sanity guide for connection setup and behaviour shared by every action.