Download OpenAPI specification:
Dropzones provide a super simple and secure way to store files in the cloud from within your own app, website or service. No need to deal with complex file management systems, buckets or complicated APIs. Just create a dropzone, upload files and manage them with ease. Please note that by using this API you agree to the Terms of Service and Privacy Policy.
Are you a JS developer? Check out our JavaScript SDK.
If a file or the dropzone it belongs to has been marked as public (i.e. "anyone" has "file.download" or "dropzone.download" permissions), it can be downloaded by anyone without authentication, using the following URL format:
https://www.collect-files.com/cdn/{fileId}/download
"dropzone.own"
"file.own"
status | string |
object |
{- "status": "success",
- "data": {
- "_id": "string",
- "tier": "string",
- "hidden": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "code": "string",
- "maxDuration": 0,
- "maxSize": 0,
- "maxFileSize": 0,
- "usedSpace": 0,
- "deleteTime": 0,
- "uploadUrl": "string",
- "maxSizeGb": 1,
- "maxDurationDays": 90
}
}
_id | string The ID of the file. |
size | integer The size of the file in bytes. |
type | string The MIME type of the file. |
name | string The name of the file. |
object |
{- "_id": "string",
- "size": 0,
- "type": "string",
- "name": "string",
- "meta": {
- "dropZoneCode": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dropZoneId": "string",
- "s3Status": "string"
}
}
name | string The name of the file that failed to upload. |
error | string The error message explaining why the file failed to upload. |
{- "name": "string",
- "error": "string"
}
Creates a new API key for the user. The API key will be used to authenticate requests to the Dropzone API.
The used API key for this request must have the permission apikey.create
and is intended for
developers to create new API keys for their users.
You can get an API key with apikey.create
permission right here.
{- "status": "success",
- "data": {
- "_id": "string",
- "key": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "lastUsedAt": "2019-08-24T14:15:22Z",
- "currentGbMonths": 1,
- "publicId": "string",
- "permissions": [
- "string"
]
}
}
Retrieves the details of the current API key being used for authentication.
{- "status": "success",
- "data": {
- "_id": "string",
- "key": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "lastUsedAt": "2019-08-24T14:15:22Z",
- "currentGbMonths": 1,
- "publicId": "string",
- "permissions": [
- "string"
]
}
}
Transfers GB-Months from the used API key to another API key. The targeted API key must have
the permission apikey.own
, the API used for authentication of this request must have the permission apikey.create
.
publicId required | string The public ID of the API key to transfer GB-Months to. |
gbMonths | number >= 0.01 The amount of GB-Months to transfer. Must be greater than 0. |
{- "gbMonths": 0.1
}
{- "status": "success",
- "data": {
- "toNewBalance": 0.1,
- "fromNewBalance": 0.9
}
}
Creates a new dropzone with the specified parameters. The API key will be set as the owner of the dropzone and will be charged for the storage size and duration of the dropzone. The dropzone will be created with the specified size in GB and duration in days.
gb | number [ 0.1 .. 4 ] The storage size in GB. |
days | number [ 30 .. 365 ] The number of days the dropzone will be active. |
name | string [ 1 .. 256 ] characters The name of the dropzone. If not provided, a random name will be generated. If provided and the api key already owns an existing dropzone with the same name, the dropzone will be fetched, and we'll try to update it with the new parameters. If the dropzone with the same name does not exist, a new dropzone will be created with the specified parameters. |
{- "gb": 1,
- "days": 90,
- "name": "My Dropzone"
}
{- "status": "success",
- "data": {
- "_id": "string",
- "tier": "string",
- "hidden": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "code": "string",
- "maxDuration": 0,
- "maxSize": 0,
- "maxFileSize": 0,
- "usedSpace": 0,
- "deleteTime": 0,
- "uploadUrl": "string",
- "maxSizeGb": 1,
- "maxDurationDays": 90
}
}
Updates the specified dropzone with new parameters. The used API key must be the owner of the dropzone and will be charged for the storage size and duration of the dropzone.
If the new size or duration is greater than the current size or duration, the dropzone will be extended accordingly. This operation consumes exactly the new amount of GB-Months you want to extend the dropzone with.
gb | number [ 0.1 .. 4 ] The new storage size in GB. Must be greater than the current size. |
days | number [ 30 .. 365 ] The number of days the dropzone will be active. Must be greater than the current duration. |
{- "gb": 1,
- "days": 90
}
{- "status": "success",
- "data": {
- "_id": "string",
- "tier": "string",
- "hidden": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "code": "string",
- "maxDuration": 0,
- "maxSize": 0,
- "maxFileSize": 0,
- "usedSpace": 0,
- "deleteTime": 0,
- "uploadUrl": "string",
- "maxSizeGb": 1,
- "maxDurationDays": 90
}
}
Retrieves details of a specific dropzone.
The used API key must at least have the permission dropzone.get
to access this endpoint.
dropzoneId required | string The ID of the dropzone to retrieve. |
{- "status": "success",
- "data": {
- "_id": "string",
- "tier": "string",
- "hidden": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "code": "string",
- "maxDuration": 0,
- "maxSize": 0,
- "maxFileSize": 0,
- "usedSpace": 0,
- "deleteTime": 0,
- "uploadUrl": "string",
- "maxSizeGb": 1,
- "maxDurationDays": 90
}
}
Retrieves the permissions of the specified dropzone. The used API key must have the permission dropzone.get
to access this endpoint.
This endpoint is useful to check which permissions are available for the dropzone.
dropzoneId required | string The ID of the dropzone to retrieve permissions for. |
{- "status": "success",
- "data": [
- {
- "publicId": "fh5AHGBzkZzvt4DET",
- "type": "apiKey",
- "permissions": [
- "dropzone.download"
]
}
]
}
Grants permissions to the specified dropzone. The used API key must have the permission dropzone.grant
to access this endpoint.
This endpoint is useful to grant permissions to other users or API keys for the dropzone.
dropzoneId required | string The ID of the dropzone to grant permissions for. |
apiKey | string The Id or "anyone" to grant permissions to. |
permissions | Array of strings (DropzonePermissions) Items Enum: "dropzone.own" "dropzone.list" "dropzone.update" "dropzone.get" "dropzone.zip" "dropzone.grant" "dropzone.upload" "dropzone.download" The list of permissions to grant to the user. |
{- "apiKey": "string",
- "permissions": [
- "dropzone.upload",
- "dropzone.download"
]
}
{- "status": "success",
- "data": [
- {
- "publicId": "fh5AHGBzkZzvt4DET",
- "type": "apiKey",
- "permissions": [
- "dropzone.download"
]
}
]
}
Revokes permissions from the specified dropzone. The used API key must have the permission dropzone.grant
to access this endpoint.
This endpoint is useful to revoke permissions from other users or API keys for the dropzone.
Only exception is: if the dropzone is public ("anyone" has "dropzone.own" permission), then permissions cannot be revoked.
dropzoneId required | string The ID of the dropzone to revoke permissions from. |
publicId | string The public ID of the apikey or "anyone" to revoke permissions from. |
permissions | Array of strings The list of permissions to revoke from the user. |
{- "publicId": "string",
- "permissions": [
- "dropzone.upload",
- "dropzone.download"
]
}
{- "status": "success",
- "data": [
- {
- "publicId": "fh5AHGBzkZzvt4DET",
- "type": "apiKey",
- "permissions": [
- "dropzone.download"
]
}
]
}
Retrieves the permissions of the specified dropzone. The used API key must have the permission dropzone.get
to access this endpoint.
This endpoint is useful to check which permissions are available for the dropzone.
dropzoneId required | string The ID of the dropzone to retrieve permissions for. |
{- "status": "success",
- "data": [
- {
- "publicId": "fh5AHGBzkZzvt4DET",
- "type": "apiKey",
- "permissions": [
- "dropzone.download"
]
}
]
}
Grants permissions to the specified dropzone. The used API key must have the permission dropzone.grant
to access this endpoint.
This endpoint is useful to grant permissions to other users or API keys for the dropzone.
dropzoneId required | string The ID of the dropzone to grant permissions for. |
apiKey | string The Id or "anyone" to grant permissions to. |
permissions | Array of strings (DropzonePermissions) Items Enum: "dropzone.own" "dropzone.list" "dropzone.update" "dropzone.get" "dropzone.zip" "dropzone.grant" "dropzone.upload" "dropzone.download" The list of permissions to grant to the user. |
{- "apiKey": "string",
- "permissions": [
- "dropzone.upload",
- "dropzone.download"
]
}
{- "status": "success",
- "data": [
- {
- "publicId": "fh5AHGBzkZzvt4DET",
- "type": "apiKey",
- "permissions": [
- "dropzone.download"
]
}
]
}
Revokes permissions from the specified dropzone. The used API key must have the permission dropzone.grant
to access this endpoint.
This endpoint is useful to revoke permissions from other users or API keys for the dropzone.
Only exception is: if the dropzone is public ("anyone" has "dropzone.own" permission), then permissions cannot be revoked.
dropzoneId required | string The ID of the dropzone to revoke permissions from. |
publicId | string The public ID of the apikey or "anyone" to revoke permissions from. |
permissions | Array of strings The list of permissions to revoke from the user. |
{- "publicId": "string",
- "permissions": [
- "dropzone.upload",
- "dropzone.download"
]
}
{- "status": "success",
- "data": [
- {
- "publicId": "fh5AHGBzkZzvt4DET",
- "type": "apiKey",
- "permissions": [
- "dropzone.download"
]
}
]
}
Retrieves the permissions of the specified file. The used API key must have the permission file.get
to access this endpoint.
This endpoint is useful to check which permissions are available for the file.
fileId required | string The ID of the file to retrieve permissions for. |
{- "status": "success",
- "data": [
- {
- "publicId": "fh5AHGBzkZzvt4DET",
- "type": "apiKey",
- "permissions": [
- "dropzone.download"
]
}
]
}
Grants permissions to the specified file. The used API key must have the permission file.grant
to access this endpoint.
This endpoint is useful to grant permissions to other users or API keys for the file.
fileId required | string The ID of the file to grant permissions for. |
publicId | string The public ID of the apikey or "anyone" to grant permissions to. |
permissions | Array of strings (FilePermissions) Items Enum: "file.own" "file.get" "file.grant" "file.upload.confirm" "file.delete" "file.download" The list of permissions to grant to the user. |
{- "publicId": "string",
- "permissions": [
- "file.upload",
- "file.download"
]
}
{- "status": "success",
- "data": [
- {
- "publicId": "fh5AHGBzkZzvt4DET",
- "type": "apiKey",
- "permissions": [
- "dropzone.download"
]
}
]
}
Revokes permissions from the specified file. The used API key must have the permission file.grant
to access this endpoint.
This endpoint is useful to revoke permissions from other users or API keys for the file.
Only exception is: if the file is public ("anyone" has "file.own" permission), then permissions cannot be revoked.
fileId required | string The ID of the file to revoke permissions from. |
publicId | string The public ID of the apikey or "anyone" to revoke permissions from. |
permissions | Array of strings The list of permissions to revoke from the user. |
{- "publicId": "string",
- "permissions": [
- "file.upload",
- "file.download"
]
}
{- "status": "success",
- "data": [
- {
- "publicId": "fh5AHGBzkZzvt4DET",
- "type": "apiKey",
- "permissions": [
- "dropzone.download"
]
}
]
}
Retrieves the permissions of the specified file. The used API key must have the permission file.get
to access this endpoint.
This endpoint is useful to check which permissions are available for the file.
fileId required | string The ID of the file to retrieve permissions for. |
{- "status": "success",
- "data": [
- {
- "publicId": "fh5AHGBzkZzvt4DET",
- "type": "apiKey",
- "permissions": [
- "dropzone.download"
]
}
]
}
Grants permissions to the specified file. The used API key must have the permission file.grant
to access this endpoint.
This endpoint is useful to grant permissions to other users or API keys for the file.
fileId required | string The ID of the file to grant permissions for. |
publicId | string The public ID of the apikey or "anyone" to grant permissions to. |
permissions | Array of strings (FilePermissions) Items Enum: "file.own" "file.get" "file.grant" "file.upload.confirm" "file.delete" "file.download" The list of permissions to grant to the user. |
{- "publicId": "string",
- "permissions": [
- "file.upload",
- "file.download"
]
}
{- "status": "success",
- "data": [
- {
- "publicId": "fh5AHGBzkZzvt4DET",
- "type": "apiKey",
- "permissions": [
- "dropzone.download"
]
}
]
}
Revokes permissions from the specified file. The used API key must have the permission file.grant
to access this endpoint.
This endpoint is useful to revoke permissions from other users or API keys for the file.
Only exception is: if the file is public ("anyone" has "file.own" permission), then permissions cannot be revoked.
fileId required | string The ID of the file to revoke permissions from. |
publicId | string The public ID of the apikey or "anyone" to revoke permissions from. |
permissions | Array of strings The list of permissions to revoke from the user. |
{- "publicId": "string",
- "permissions": [
- "file.upload",
- "file.download"
]
}
{- "status": "success",
- "data": [
- {
- "publicId": "fh5AHGBzkZzvt4DET",
- "type": "apiKey",
- "permissions": [
- "dropzone.download"
]
}
]
}
Retrieves a list of files in the dropzone.
dropzoneId required | string The ID of the dropzone to retrieve files from. |
{- "status": "success",
- "data": [
- {
- "_id": "string",
- "size": 0,
- "type": "string",
- "name": "string",
- "meta": {
- "dropZoneCode": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dropZoneId": "string",
- "s3Status": "string"
}
}
]
}
Returns a signed S3 URL and fileId for direct upload to S3 for the given file metadata. This will already consume the storage quota of the dropzone, so ensure that the dropzone has enough space available. The file will not be immediately available in the dropzone until the upload is confirmed.
dropzoneId required | string The ID of the dropzone to upload files to. This is required to ensure that the file is uploaded to the correct dropzone and that the storage quota is correctly applied. |
name required | string non-empty The name of the file to be uploaded. |
type required | string non-empty The MIME type of the file. This must not be an empty string. |
size required | integer >= 0 The size of the file in bytes. |
{- "name": "example-file.txt",
- "type": "text/plain",
- "size": 123456
}
{- "status": "success",
- "data": {
- "fileId": "string",
- "signedUrl": "string"
}
}
Confirms that a file has been uploaded to S3 and finalizes the file in the system. No request body is required.
fileId required | string The ID of the file to confirm. |
{- "_id": "string",
- "size": 0,
- "type": "string",
- "name": "string",
- "meta": {
- "dropZoneCode": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dropZoneId": "string",
- "s3Status": "string"
}
}
Retrieves details of a specific file.
fileId required | string The ID of the file. |
{- "_id": "string",
- "size": 0,
- "type": "string",
- "name": "string",
- "meta": {
- "dropZoneCode": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dropZoneId": "string",
- "s3Status": "string"
}
}
Downloads a specific file. You must either have the permission file.download
or dropzone.download
to access this endpoint.
If you have the dropzone.download
permission for the dropzone, the file is contained in,
you can download any file from the dropzone, regardless of the file's owner.
Or you need the indivitiual file's permission file.download
to download the file.
If the file has been marked as public ("anyone" has permission "file.download"), it can be downloaded by anyone without authentication.
fileId required | string The ID of the file. |
{- "status": "error",
- "message": "Missing dropzoneId or fileId."
}