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>**Note:** A group itself and files within it MUST belong to the same project.</Note> <Note>**Note:** Groups are immutable and the only way to add/remove a file to a group is to create a new one.</Note> <Note>**Note:** With [signed uploads](/docs/api/upload/authentication/#jwt-scope), the scope value of this endpoint is `/group/`. A request does not consume the token's operations limit.</Note>

Authentication

AuthorizationBearer
Signed uploads with a JSON Web Token ([RFC 7519](https://www.rfc-editor.org/rfc/rfc7519)), 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](https://uploadcare.com/docs/security/secure-uploads/) are enabled for the project. Signing, claims, scope and operation limits, and error responses are specified in [Authentication](https://uploadcare.com/docs/api/upload/authentication/#jwt). 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](https://uploadcare.com/docs/security/secure-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](https://uploadcare.com/docs/security/secure-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.