Logo of FrontifyDeveloper PortalArrow to the right
GraphQL Reference
Mutation

createAsset():CreateAsset

Create a new Asset. Requires basic:write scope to be accessible and Project permission level EDIT.

All mutations have exactly one input field called input with a unique input and return type. This is useful to write mutations with variables, so there is always one single variable per mutation. This makes it easier to use and reuse them.

Input fields of CreateAssetInput
projectId: ID
Deprecated, Removal: 2023-07-01

Library or Workspace Id. This value is ignored if parentId is set. This field will be removed. Use parentId instead.

fileId: ID!

File Id. Signed Id returned in uploadFile.

title: String!

Asset title or display name.

description: String = ""

Asset description.

externalId: ID

Asset external Id.

Add Asset copyright details.

tags: [TagInput]

List of tags to create with Asset

skipFileMetadata: Boolean = false

Skip file's EXIF metadata. When true, it will ignore all file metadata contents.

directory: [String]

An array of strings representing the directory, if a folder does not exist, it is created. Example: ["My Folder", "Sub-Folder"] will create the necessary folders if they do not yet exist and place the Asset in it. Important: Cannot be used in conjunction with parentId that is from a Folder.

parentId: ID

The parent Id, where the Asset should be located in. Should either be a Library, WorkspaceProject or Folder Id. Important: Cannot be used in conjunction with directory if the Id is from a Folder.

workflowStatus: String
Deprecated, Removal: 2022-07-01

Asset workflow status. Workflow logic will be automatically managed if not properly set. This field will be removed.

availability: DateTimeRangeInput

Asset will become available only during the interval.When undefined or null the Asset will be immediately and indefinitely available.

expiresAt: DateTime

Asset will expire once the defined date is reached.

author: String = ""

Represents the Author of the Asset. Example: Photographer Name

previewBackgroundColor: RgbaColorInput
Beta

BETA Background color of the Asset preview.

Fields of CreateAsset

The newly created Asset processing job response.