---
title: "Create a new S3 source"
method: POST
path: "/backups/s3-sources"
tags: ["Backups"]
---

# Create a new S3 source

`POST /backups/s3-sources`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/backups/s3-sources`
- Auth: HTTP bearer

## Request body

- CreateS3SourceRequest
  - `access_key_id` string, password, required: Access key ID of the bucket's credentials, for example `AKIA...` on AWS.
  - `backing_service_id` integer, nullable: Managed RustFS/S3 service that supplies this destination. When set, schedules using this source can never target that service itself.
  - `bucket_name` string, required
  - `bucket_path` string, required
  - `endpoint` string, nullable: Optional endpoint for S3-compatible services like MinIO or RustFS, with or without a scheme. Stored with an explicit scheme: without one, `use_tls` decides it (plain `http://` when that is unset too).
  - `force_path_style` boolean, nullable: Whether to use path-style addressing (default: true). Forced on for an IP-address endpoint and a Temps-managed object store.
  - `is_default` boolean, nullable: When true, make this the default source (will swap out any existing default). The very first S3 source is always created as default regardless of this flag.
  - `name` string, required
  - `region` string, required
  - `secret_key` string, password, required: Secret access key that goes with the access key ID. Shown once by the provider; stored encrypted and never returned.
  - `use_tls` boolean, nullable: Whether the endpoint is reached over TLS. Only needed for an endpoint entered without a scheme; one that conflicts with the endpoint's scheme is rejected.
  - `worker_credentials` 'scoped' | 'allow_full', nullable: What a worker node may receive from an S3 source (ADR-102).

## Response `201`

S3 source created

- S3SourceResponse: Response type for S3 source
  - `access_key_id` string, required
  - `bucket_name` string, required
  - `bucket_path` string, required
  - `created_at` string, date-time, required
  - `effective_endpoint` string, nullable: The endpoint every client (WAL-G, restore and worker jobs) receives, always with an explicit scheme. `None` for AWS S3 itself.
  - `effective_force_path_style` boolean, required: Whether clients actually use path-style addressing.
  - `endpoint` string, nullable
  - `force_path_style` boolean, nullable
  - `id` integer, required
  - `is_default` boolean, required
  - `managed_by_cloud` boolean, required: True when this source was auto-provisioned by a Temps Cloud link rather than entered by an operator. Managed sources cannot be edited or deleted from this API; disconnect Temps Cloud to remove one.
  - `name` string, required
  - `path_style_reason` 'configured' | 'ip_address_endpoint' | 'managed_object_store', required: Why `effective_force_path_style` has its value: the source's own setting, or forced because the endpoint is an IP address or a Temps-managed object store.
  - `region` string, required
  - `secret_key` string, required
  - `updated_at` string, date-time, required
  - `worker_credentials` 'scoped' | 'allow_full', required: What a worker node receives from this source (ADR-102).

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `403`: Insufficient permissions
- `409`: Another request changed the default source at the same time; nothing was saved, retry
- `500`: Internal server error

## Changes

- **2026-11-26** `e1864d950604`: 2 breaking
  - the `created_at` response's property type changed from `integer` to `string`, and format from `int64` to `date-time` for status `201`
  - the `updated_at` response's property type changed from `integer` to `string`, and format from `int64` to `date-time` for status `201`
- **2026-11-25** `cd6cbc9c9868`: 1 info
  - added the non-success response with the status `409`
- **2026-11-13** `8b476d8ce3ea`: 4 info
  - added the new optional request property `use_tls`
  - added the optional property `effective_endpoint` to the response with the `201` status
  - added the required property `effective_force_path_style` to the response with the `201` status
  - added the required property `path_style_reason` to the response with the `201` status
- **2026-11-12** `e052e98bb073`: 2 info
  - added the new optional request property `worker_credentials`
  - added the required property `worker_credentials` to the response with the `201` status
- **2026-11-09** `12896146b193`: 4 breaking
  - removed the required property `extensions` from the response with the `400` status
  - removed the required property `extensions` from the response with the `401` status
  - removed the required property `extensions` from the response with the `403` status
  - removed the required property `extensions` from the response with the `500` status

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/backups/s3-sources/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
