remagicaDocs home
API referenceWorkflows

Set a project's cover

PUT
/workflows/{workflowId}/cover

Needs a key withworkflows:write

Sets the image a project's card shows (Set as Cover): one of the workspace's images, by storage key. null goes back to the canvas preview. Not an edit of the document: its version stays.

Requires scope workflows:write.

Authorization

apiKey
headerx-api-key<token>

An API key of your workspace (rmg_…), created in the web app. It acts for that workspace, not for a person, and keeps working when its creator leaves.

Path Parameters

workflowId*string
Length1 <= length <= 128

Request Body

application/json
  1. body
key*|

Storage key of one of the workspace's images (an upload or a result's file) to show as the project's thumbnail; null goes back to the canvas preview.

Response Body

The cover's download URL, or null.

application/json
  1. response
coverUrl*|

A short-lived download URL of the cover, or null.

Example Request
curl -X PUT 'https://api.remagica.com/api/v1/workflows/cb35dcdb-5b3d-4f60-8e2a-1d9c6b4f7e05/cover' \  -H 'Content-Type: application/json' \  -d '{  "key": "generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png"}'
Example Response
{  "coverUrl": "https://files.remagica.com/generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.jpg"}