Skip to main content
PUT
Set where a partner's uploaded files are stored

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

partnerId
string<uuid>
required

The partner whose storage destination to set

Body

application/json

The bucket to keep the partner's files in, and the key that may write to it. The field names are camelCase, like every answer of the API; the snake_case spelling (keyPrefix) is read too.

endpoint
string
required

The HTTPS address of the S3-compatible service, scheme and host only (no path, port or credentials). It must be a host name, not an IP address, and must resolve to the public internet.

Example:

"https://abc123.r2.cloudflarestorage.com"

region
string
required

The region the service signs requests for. Use auto where the service says so (such as Cloudflare R2).

Example:

"auto"

bucket
string
required
Example:

"acme-widget-media"

publicBaseUrl
string
required

Where the stored files are served from: the bucket's public address, or a CDN in front of it. The address of a file is this value, a slash and the file's key in the bucket, which starts with the key prefix. A path is allowed (https://media.example.com/files/acme-widget-media).

Example:

"https://media.example.com"

accessKeyId
string
required

The id of an access key that may put objects into the bucket

secretAccessKey
string<password>
required
write-only

The secret of that access key. It is stored encrypted and is never returned.

keyPrefix
string
default:""

A folder inside the bucket to write every file under, for example widgetic/uploads. Folders are made of letters, digits, dots, hyphens and underscores. Leave it out to write at the root of the bucket.

Example:

"widgetic/"

forcePathStyle
boolean
default:true

Put the bucket name in the path of a request. Every S3-compatible service supports this; set it to false only for a service that needs the bucket name in the host name.

Response

The destination passed the check and was saved

success
boolean
required

Always true on a success.

Example:

true

data
object
required

The bucket a partner keeps the files its account uploads in: a bucket on an S3-compatible service that the partner owns. The secret access key is never returned.

Example:
meta
object

Extra information about the answer: where a page sits in a list, the cursor of the next page, or warnings about a call that succeeded with a caveat.