younifyd
Menu

Upload Image Asset

Upload an image asset

POST/images/{dataset}

Use it in a workflow

  1. Add a step and choose the Sanity connector.
  2. Pick the Upload Image Asset action (under Assets).
  3. Fill in the fields below, then reference the result from later steps as {{uploadImageAsset.response.data}}.

Request

Path parameters

datasetstringrequired

Query parameters

filenamestring

Filename for this file (optional)

titlestring

Optional title for the asset

descriptionstring

Optional description for the asset

metaarray<string>

Array of metadata to extract from asset

Default ["palette","lqip","blurhash","thumbhash"]

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`.

Response

Returns 200 with an object. Read it in later steps with {{uploadImageAsset.response.data.<field>}}.

documentobject
json
{
  "document": {}
}

Need more? See the Sanity guide for connection setup and behaviour shared by every action.