younifyd
Menu

Update Asset

Create an asset

PUT/spaces/{spaceId}/environments/{environmentId}/assets/{resourceId}

Use it in a workflow

  1. Add a step and choose the Contentful connector.
  2. Pick the Update Asset action (under Contentful Content Management API).
  3. Fill in the fields below, then reference the result from later steps as {{updateAsset.response.data}}.

Request

Path parameters

spaceIdstringrequired

ID of the space

environmentIdstringrequired

ID of the environment

resourceIdstringrequired

ID of the resource

Headers

X-Contentful-Versioninteger (int64)required

The version of the locale to update.

Request body

Enter the body as JSON in the step's Body field.

fieldsobject
descriptionobjectrequired

Asset description by locale

fileanyrequired
titleobjectrequired

Asset title by locale

json
{
  "fields": {
    "description": {},
    "file": null,
    "title": {}
  }
}

Response

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

fieldsobject
descriptionobjectrequired

Asset description by locale

fileobjectrequired

Asset file details by locale

titleobjectrequired

Asset title by locale

sysobject
json
{
  "fields": {
    "description": {},
    "file": {},
    "title": {}
  },
  "sys": {}
}

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