Set the off-site copy destination
const url = 'http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/backup-destination';
const options = {
method: 'PUT',
headers: {
'API-Version': '2026-06-01.beta',
'API-Key': '<API-Key>',
'Content-Type': 'application/json'
},
body: '{"bucket":"acme-keycloak-backups","region":"eu-central-1","access_key_id":"AKIAEXAMPLE","secret_access_key":"write-only"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}curl --request PUT \
--url http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/backup-destination \
--header 'API-Key: <API-Key>' \
--header 'API-Version: 2026-06-01.beta' \
--header 'Content-Type: application/json' \
--data '{ "bucket": "acme-keycloak-backups", "region": "eu-central-1", "access_key_id": "AKIAEXAMPLE", "secret_access_key": "write-only" }'Creates or replaces the cluster’s one destination. After each completed backup the plain
pg_restore archive is copied to <prefix>/<cluster_id>/<backup_id>.dump with its manifest
<backup_id>.json beside it. Skycloak never deletes anything in your bucket.
Returns 403 on plans without off-site copy.
Required scope: clusters:backups:write
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
S3-compatible endpoint. Omit for AWS S3. Must be an https URL to a public host.
Signing region. Required when endpoint is set.
Optional key prefix for the copies.
Secret access key. Required for a new destination and whenever the endpoint, bucket or access key changes; otherwise omit it to keep the stored one. Never returned.
Defaults to true for a new destination; omit to keep the current value.
Example
{
"bucket": "acme-keycloak-backups",
"region": "eu-central-1",
"access_key_id": "AKIAEXAMPLE",
"secret_access_key": "write-only"
}Responses
Section titled “Responses”The request has succeeded.
Where finished backups are copied: one S3-compatible bucket you own. The secret access key is write-only and is never returned.
object
S3-compatible endpoint, for example https://<account>.r2.cloudflarestorage.com. Omitted for AWS S3.
Signing region. Required with a custom endpoint.
Key prefix the copies are written under: <prefix>/<cluster_id>/<backup_id>.dump and .json.
Whether finished backups are copied. Turn off to pause copying without removing the destination.
When Test connection last ran against this destination.
Whether the last Test connection succeeded.
The provider’s error from the last failed Test connection.
Example
{
"bucket": "acme-keycloak-backups",
"region": "eu-central-1",
"prefix": "skycloak",
"access_key_id": "AKIAEXAMPLE",
"enabled": true,
"created_at": "2026-11-08T10:00:00Z",
"updated_at": "2026-11-08T10:00:00Z"
}Access is unauthorized.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Access is forbidden.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}The server cannot find the requested resource.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Client error
object
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com",
"errors": [
{
"field": "example",
"detail": "example",
"code": "example",
"value": "example"
}
]
}Client error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Headers
Section titled “Headers”Server error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Server error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}