Rename or move an asset
Changes its name or folder. Its file and URL stay as they are.
Changes its name or folder. Its file and URL stay as they are.
apiKey writeAuthorizationBearer <token>A workspace API key (pf_…), created under Developers → API keys.
Scope: write
id*stringuuididempotency-key?stringRun this write once: a retry with the same key gets the first answer (24 hours).
1 <= length <= 255application/json- body
name?string1 <= length <= 200folderId?|uuidOK
application/json- response
id*stringThe asset’s id
uuidname*stringWhat people call it, e.g. Black Friday hero
folder*|The folder it’s in; null at the top level
kind*string"image""font"contentType*stringThe file’s type, from its bytes
"image/png""image/jpeg""image/gif""font/woff2""font/woff""font/ttf""font/otf"filename*stringThe file’s name in its URL
bytes*integerThe file’s size in bytes
width*|An image’s width in pixels
height*|An image’s height in pixels
status*stringUploading until its bytes are in and checked; then ready to use
"uploading""ready"url*|Where it’s public, once ready; never changes, and keeps working once archived
uriuploadedBy*The person or API key that uploaded it
createdAt*stringdate-timeupdatedAt*stringdate-timearchivedAt*|When it was deleted from the library; its file and URL stay, so emails that show it keep working
date-timecurl -X PATCH 'https://api.postforge.dev/v1/assets/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "folder": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "kind": "image", "contentType": "image/png", "filename": "string", "bytes": 0, "width": 0, "height": 0, "status": "uploading", "url": "http://example.com", "uploadedBy": { "type": "user", "id": "string", "name": "string" }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "archivedAt": "2019-08-24T14:15:22Z"}