Upload assets with metadata
Put files into the media library with a folder, tags and values in your workspace's own fields, such as a product number or a usage right. Designs can then use them, and people find them by those values.
You need the values from Before you start.
1. Look up your fields and tags
Custom fields are defined once per workspace, under Settings → Custom Fields. Read their IDs and types:
curl "https://app.heycreo.io/api/organizations/$ORGANIZATION_ID/asset-fields" \
-H "Authorization: Bearer $HEYCREO_API_KEY" \
| jq '.[] | {id, label, type, options: [.options[]? | {id, label}]}'
Tags are referenced by ID as well:
curl "https://app.heycreo.io/api/organizations/$ORGANIZATION_ID/tags" \
-H "Authorization: Bearer $HEYCREO_API_KEY" | jq '.[] | {id, name}'
2. Upload a file with its metadata
curl "https://app.heycreo.io/api/organizations/$ORGANIZATION_ID/assets/upload" \
-H "Authorization: Bearer $HEYCREO_API_KEY" \
-F "file=@sneaker-red.jpg" \
-F "ensureCollection=Product photos" \
-F 'tagIds=["TAG_ID"]' \
-F 'customFields={
"SKU_FIELD_ID": { "type": "text", "value": "SN-4711-RED" },
"RIGHTS_FIELD_ID": { "type": "date", "value": "2027-12-31" },
"CHANNEL_FIELD_ID": { "type": "multiselect", "optionIds": ["WEB_OPTION_ID", "PRINT_OPTION_ID"] }
}' | jq '{id, name, collectionId}'
| Form field | |
|---|---|
file | Required. Images (JPEG, PNG, GIF, WebP, SVG), audio (MP3, WAV, OGG, M4A, AAC) or video (MP4, MOV, AVI, WebM, MKV), up to 1 GB. |
collectionId | The folder to put the file in. |
ensureCollection | A folder name instead: heycreo uses the folder of that name and creates it if it does not exist. |
tagIds | A JSON array of tag IDs. |
customFields | A JSON object: field ID → value. |
declareAiContent | true marks the file as AI-generated. |
Each value names its field's type:
| Field type | Value |
|---|---|
| Text | { "type": "text", "value": "…" } |
| Number | { "type": "number", "value": 42 } |
| Yes/no | { "type": "boolean", "value": true } |
| Date | { "type": "date", "value": "2027-12-31" } |
| Select | { "type": "select", "optionId": "…" } |
| Multiselect | { "type": "multiselect", "optionIds": ["…", "…"] } |
Tags and field values are applied after the file is stored. A wrong ID or a value of the wrong type does not fail the upload: the file is there, without that value. Read the asset back to check, or set the values in a second request (step 3), which reports such errors.
curl "https://app.heycreo.io/api/organizations/$ORGANIZATION_ID/assets/$ASSET_ID" \
-H "Authorization: Bearer $HEYCREO_API_KEY" | jq '{tags, customFields}'
Up to 120 uploads per minute are accepted. For larger imports, pause when you receive 429.