Skip to main content
POST
A location is a stored credential — the provider names the storage backend, the label is the human-readable name you refer to it by, and the secret is the provider-typed authentication material. The secret is encrypted at rest and is never returned by any endpoint; the response is the non-secret projection of the new location. The shape of secret depends on provider. S3-family providers (s3, r2, wasabi, b2, azureblob) take access_key_id and secret_access_key; OAuth providers (dropbox, drive, onedrive, box) take access_token, refresh_token, and expiry; gcs takes service_account_json. A secret whose shape doesn’t match the provider is rejected with 422.

Authorizations

Authorization
string
header
required

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

Body

application/json
provider
enum<string>
required

The storage backend to authenticate against. Immutable once set.

Available options:
s3,
r2,
wasabi,
b2,
gcs,
azureblob,
dropbox,
drive,
onedrive,
box
Example:

"s3"

label
string
required

Human-readable name for the location. Required and non-empty. Need not be unique.

Example:

"prod-backups"

secret
object
required

The provider-typed secret object (shape depends on the location's provider). For S3-family providers: access_key_id and secret_access_key. For OAuth providers (Dropbox, Google Drive, OneDrive, Box): access_token, refresh_token, and expiry. For GCS: service_account_json. A shape that doesn't match the provider is rejected with 422.

Example:
metadata
object

Optional non-secret configuration stored alongside the secret (e.g. region).

Example:

Response

Location created.

The non-secret projection of a location (a stored credential). Returned by Create, Get, Replace, and Update Label. Never includes the secret material — only the fields safe to display.

id
string

Unique identifier for the location (a UUID). Address a location by this id, or by its name (label).

Example:

"3f9a2b7c-1d4e-4a8f-9c2b-6e5d0a1f7b83"

provider
enum<string>

The storage backend this location authenticates against, set at creation and immutable thereafter.

Available options:
s3,
r2,
wasabi,
b2,
gcs,
azureblob,
dropbox,
drive,
onedrive,
box
Example:

"s3"

label
string

The human-readable name for the location. Labels are not unique: an account may reuse one across providers, and the same name can match several locations — pass an id to disambiguate. Set at creation and changed via Update Label.

Example:

"prod-backups"

metadata
object

Non-secret, provider-specific configuration stored alongside the secret (e.g. region, scopes, account_email). Byteport may stamp additional display hints here. Omitted entirely when empty.

Example: