DAM Assets API¶
The DAM (Digital Asset Manager) assets API allows you to manage digital assets for your site, including images and files.
Base path: /api/1.3/dam/assets
Authentication is required on all endpoints via ?api_key=<key> query parameter or
Authorization header.
Listing assets¶
Returns a paginated list of assets for the site.
GET /api/1.3/dam/assets
Parameters¶
Name |
Type |
Default |
Description |
|---|---|---|---|
|
String |
Filter by asset type.
Choices:
all, admin, community.Non-admin API keys default to
admin when omitted. |
|
|
String |
|
Filter by file type.
Choices:
image, file, all. |
|
Integer |
Filter by trash status.
Choices:
0, 1.Ignored for non-admin keys (always
false). |
|
|
String |
Comma-separated list of tags to filter by. |
|
|
Integer |
Filter by creator user ID. |
|
|
String |
Filter assets created on this date. ISO 8601 format (e.g. |
|
|
String |
Full-text search across title, alt text, credit, source info, and filename. Minimum 3 characters. |
|
|
Integer |
Filter by file ID. |
|
|
Integer |
|
Pagination offset. |
|
Integer |
|
Number of results to return. Max |
|
String |
|
Sort field.
Choices:
created_ts, score.score only applies when search is provided. |
|
String |
|
Sort order.
Choices:
asc, desc.Ignored when
sort_by=score. |
|
String |
Comma-separated list of thumbnail sizes to include for image assets (e.g. |
Response¶
{
"total": 42,
"items": [<asset>, ...]
}
See Asset object for the asset object structure.
Getting an asset¶
Returns a single asset by ID.
GET /api/1.3/dam/assets/<id>
Parameters¶
Name |
Type |
Description |
|---|---|---|
|
String |
Comma-separated thumbnail sizes for image assets. |
Response¶
The response payload is an asset object. See Asset object.
Note
Non-admin API keys can retrieve assets of any type, but trashed assets are not accessible.
Creating an asset¶
Creates a new asset. Requires publish_post or manage_design permission on the site.
POST /api/1.3/dam/assets
Parameters¶
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Integer |
Yes |
File type.
Choices:
0 (image), 1 (file). |
|
Integer |
Yes |
ID of the existing image or file object. |
|
String |
No |
Asset title. |
|
String |
No |
Original filename. |
|
String |
No |
Accessibility alt text. |
|
String |
No |
Photo/media credit. |
|
String |
No |
Source information. |
|
Array of strings |
No |
Tags.
Tags prefixed with
* are admin-only and stripped for non-admin users. |
|
Object |
No |
Arbitrary site-specific metadata. |
Response¶
Returns the created asset object. See Asset object.
Returns 400 if the asset already exists (duplicate file_type + file_id).
Updating an asset¶
Updates an existing asset. Requires publish_post or manage_design permission.
file_type and file_id are ignored if provided.
PUT /api/1.3/dam/assets/<id>
Parameters¶
Name |
Type |
Description |
|---|---|---|
|
String |
Asset title. |
|
String |
Filename. |
|
String |
Alt text. |
|
String |
Credit. |
|
String |
Source info. |
|
Array of strings |
Tags. |
|
Boolean |
Move to / restore from trash. |
|
Object |
Site-specific metadata. |
Response¶
The same specification from Creating an asset section applies here.
Bulk operations¶
Performs the same operation on multiple assets in a single request.
POST /api/1.3/dam/assets?bulk=1
PUT /api/1.3/dam/assets?bulk=1
DELETE /api/1.3/dam/assets?bulk=1
Set the X-Http-Method-Override: PUT|POST|DELETE header to specify the method when using POST.
Request body¶
Array of operation objects:
[
{"file_id": 123, "data": {"image_title": "New title"}},
{"file_id": 456, "data": {"in_trash": true}}
]
Response¶
Map of file_id → result:
{
"123": {"status_code": 200, "data": {...}},
"456": {"status_code": 200, "data": {...}}
}
Asset object¶
Field |
Type |
Description |
|---|---|---|
|
Integer |
Asset ID. |
|
Integer |
Site ID. |
|
Integer |
Creator user ID. |
|
Integer |
File type.
Choices:
0 (image), 1 (file). |
|
String |
File type name.
Choices:
"image", "file". |
|
Integer |
ID of the underlying image or file. |
|
Boolean |
Whether the asset is in trash. |
|
String or null |
Asset title. |
|
String or null |
Original filename. |
|
String or null |
Alt text. |
|
String or null |
Credit. |
|
String or null |
Source info. |
|
Array of strings |
Tags.
Admin-only tags (prefixed
*) are hidden for non-admin keys. |
|
Object or null |
Site-specific metadata. |
|
Float |
Creation timestamp (Unix seconds). |
|
Float |
Last update timestamp (Unix seconds). |
|
String |
Author profile site title (if available). |
|
String |
Author profile site URI (if available). |
|
Object |
(Images only) Map of size → URL for requested |
|
String |
(Images only) Dimensions as |
|
String |
Shortcode string to embed this asset. |
|
String |
Rendered HTML for the asset. |
|
String |
Unique shortcode identifier. |
|
Object |
Shortcode parameters.
Includes
dam=1, expand=1, alt text, and filename. |