Create a file group

POST

Create a file group from a set of already uploaded files.

The most common use case for creating a file group is when a user uploads multiple files at once and then wants to display them together.

Note: A group itself and files within it MUST belong to the same project.

Note: Groups are immutable and the only way to add/remove a file to a group is to create a new one.

Request

This endpoint expects a multipart form.
pub_keystringRequired
Public key identifying an Uploadcare project your uploads will go to.
files[]list of stringsRequired
Set of files you want to add to the group. Each element can be a file UUID with or without the applied image processing operations.
signaturestringOptional

signature must be sent along with your upload request if you would like to use signed uploads. The signature should be generated on your backend. Note: the process requires knowledge of your Uploadcare Project’s Secret key. See signed uploads for details.

expiredoubleOptional

expire must be sent along with your upload request if you would like to use signed uploads. The parameter defines the time during which your signature is valid. It’s a UNIX timestamp. See signed uploads for details.

Response

This endpoint returns an object.
idstringOptional
Group's unique ID.
datetime_createddatetimeOptional
ISO-8601 date and time when the group was created.
files_countdoubleOptional
Number of the files in the group.
cdn_urlstringOptional
Group's CDN URL.
urlstringOptional

Group’s API resource URL. See the REST API documentation for details.

fileslist of anyOptional
The list of files in the group. An array may contain null values if a file has been removed.
datetime_storeddatetimeOptionalDeprecated
ISO-8601 date and time when the group was marked as stored.

Errors