Skip to navigation

Create a file group

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.
Note: With signed uploads, the scope value of this endpoint is /group/. A request does not consume the token’s operations limit.

Authentication

AuthorizationBearer

Signed uploads with a JSON Web Token (RFC 7519), generated on your backend with the project Secret key and sent in the Authorization header:

Authorization: Bearer <jwt>

The token is checked only when signed uploads are enabled for the project. Signing, claims, scope and operation limits, and error responses are specified in Authentication. The scope value of each endpoint, and how many operations a request spends, is listed in the endpoint description.

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.

expireintegerOptional

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

The group was created successfully.
idstringOptional
Group's unique ID.
datetime_createddatetimeOptional

ISO-8601 date and time when the group was created.

files_countintegerOptional
Number of the files in the group.
cdn_urlstringOptionalformat: "uri"
Group's CDN URL.
urlstringOptionalformat: "uri"

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

fileslist of any or nullOptional
The list of files in the group. An array may contain null values if a file has been removed.
datetime_storeddatetime or nullOptionalDeprecated
Deprecated. This field will be removed in a future version of the Upload API.