For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
GuidesIntegrationsAPI ReferencesRelease notes
GuidesIntegrationsAPI ReferencesRelease notes
    • APIs overview
  • Upload API
    • Errors
  • REST API
    • Authentication
      • GETList of files
      • PUTStore file
      • DELDelete file
      • GETFile info
      • PUTBatch file storing
      • DELBatch file delete
      • POSTCopy file to local storage
      • POSTCopy file to remote storage
    • File Metadata
    • Add Ons
    • Changelog
    • Versioning
  • URL API
    • File Information
    • File Names
    • File groups
    • Image processing limitations
    • Image compression
    • Image resize and crop
    • Image rotation
    • Image overlays
    • Image colors
    • Image definition
    • Image recognition
    • Other image operations
    • Proxy
    • Signed URLs
    • CDN settings
    • Integrations
Dashboard
LogoLogo
REST APIFile

Copy file to remote storage

POST
https://api.uploadcare.com/files/remote_copy/
POST
/files/remote_copy/
$curl -X POST https://api.uploadcare.com/files/remote_copy/ \
> -H "Accept: application/vnd.uploadcare-v0.7+json" \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "source": "03ccf9ab-f266-43fb-973d-a6529c55c2ae",
> "target": "mytarget"
>}'
1{
2 "type": "url",
3 "result": "s3://mybucket/03ccf9ab-f266-43fb-973d-a6529c55c2ae/image.png"
4}
POST requests are used to copy original files or their modified versions to the S3 bucket. Source files MAY either be stored or just uploaded and MUST NOT be deleted. Copying of large files is not supported at the moment. File size MUST NOT exceed 5 GB.
Was this page helpful?
Previous

File Metadata

Next
Built with

Authentication

Authorizationstring
Every request made to `https://api.uploadcare.com/` MUST be signed. HTTPS SHOULD be used with any authorization scheme. Requests MUST contain the `Authorization` header defining `auth-scheme` and `auth-param`: `Authorization: auth-scheme auth-param`. Every request MUST contain the `Accept` header identifying the REST API version: `Accept: application/vnd.uploadcare-v0.7+json`. There are two available authorization schemes: * For production: `Uploadcare`, a scheme where a `signature`, not your Secret API Key MUST be specified. Signatures SHOULD be generated on backend. * For quick tests: `Uploadcare.Simple`, a simple scheme where your [Secret API Key](https://app.uploadcare.com/projects/-/api-keys/) MUST be specified in every request's `auth-param`.

Headers

AcceptstringRequired
Version header.

Request

This endpoint expects an object.
sourcestringRequiredformat: "uri"
A CDN URL or just UUID of a file subjected to copy.
targetstringRequired
Identifies a custom storage name related to your project. It implies that you are copying a file to a specified custom storage. Keep in mind that you can have multiple storages associated with a single S3 bucket.
make_publicbooleanOptionalDefaults to true

MUST be either true or false. The true value makes copied files available via public links, false does the opposite.

patternenumOptionalDefaults to ${default}
The parameter is used to specify file names Uploadcare passes to the S3 bucket. If the parameter is omitted, your S3 bucket pattern is used. Use any combination of allowed values. Parameter values: - `${default}` = `${uuid}/${auto_filename}` - `${auto_filename}` = `${filename}${effects}${ext}` - `${effects}` = processing operations put into a CDN URL - `${filename}` = original filename without extension - `${uuid}` = file UUID - `${ext}` = file extension, including period, e.g. .jpg

Response

Destination file with that name already exists. Check the pattern parameter.

typestringDefaults to url
resultstringformat: "url"
URL with an s3 scheme. Your bucket name is put as a host, and an s3 object path follows.

Errors

400
Bad Request Error
401
Unauthorized Error
406
Not Acceptable Error
429
Too Many Requests Error

Every request made to https://api.uploadcare.com/ MUST be signed. HTTPS SHOULD be used with any authorization scheme.

Requests MUST contain the Authorization header defining auth-scheme and auth-param: Authorization: auth-scheme auth-param.

Every request MUST contain the Accept header identifying the REST API version: Accept: application/vnd.uploadcare-v0.7+json.

There are two available authorization schemes:

  • For production: Uploadcare, a scheme where a signature, not your Secret API Key MUST be specified. Signatures SHOULD be generated on backend.
  • For quick tests: Uploadcare.Simple, a simple scheme where your Secret API Key MUST be specified in every request’s auth-param.

The parameter is used to specify file names Uploadcare passes to the S3 bucket. If the parameter is omitted, your S3 bucket pattern is used. Use any combination of allowed values.

Parameter values:

  • ${default} = ${uuid}/${auto_filename}
  • ${auto_filename} = ${filename}${effects}${ext}
  • ${effects} = processing operations put into a CDN URL
  • ${filename} = original filename without extension
  • ${uuid} = file UUID
  • ${ext} = file extension, including period, e.g. .jpg