---
title: "Save S3 configuration"
method: POST
path: "/v1/integrations/s3"
tags: ["Integrations"]
---

# Save S3 configuration

`POST /v1/integrations/s3`

Save or update S3-compatible storage configuration.

**Authentication:** API Key required (`x-api-key` header)

**Usage:** Configure your S3-compatible storage to receive generated PDFs directly
in your own bucket instead of the default CDN.

**Supported providers:**
- Amazon S3
- DigitalOcean Spaces
- Cloudflare R2
- MinIO
- Any S3-compatible storage

**Secret key behavior:**
- For new configuration: `secret_access_key` is required
- For updates: Omit `secret_access_key` to keep existing value

**No credits consumed:** This is a configuration endpoint.

**Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.

## Request body

- S3ConfigRequest — Request model for S3 configuration
  - `endpoint_url` string, required — S3-compatible endpoint URL. Must start with https://
  - `access_key_id` string, required — Access key ID for S3 authentication
  - `secret_access_key` string, nullable — Secret access key. Required for new configuration, optional for updates (keeps existing if omitted)
  - `bucket_name` string, required — S3 bucket name. Must follow S3 naming conventions (lowercase, no underscores)
  - `default_prefix` string — Default path prefix for uploaded files. Can include slashes for folder structure

## Response `200`

Configuration saved successfully

- S3SuccessResponse — Generic success response for S3 operations
  - `success` boolean, required — Whether the operation succeeded

## Other responses

- `400` — Invalid configuration (e.g., missing secret key for new config)
- `422` — Validation Error
- `429` — Rate limit exceeded

---

[API](https://skmtc.net/pdftemplateapi/apis/templatefox-api.md) · [All operations](https://skmtc.net/pdftemplateapi/apis/templatefox-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pdftemplateapi/templatefox-api/versions/5673fc0d5fad/schema)
