---
title: "Get a presigned URL to upload a realm artifact"
method: POST
path: "/clusters/{cluster_id}/realms/import/upload-url"
tags: ["Imports"]
---

# Get a presigned URL to upload a realm artifact

`POST /clusters/{cluster_id}/realms/import/upload-url`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/clusters/{cluster_id}/realms/import/upload-url`
- Auth: API key in header `API-Key`

Returns a short-lived presigned PUT URL to upload the realm artifact to, and the object key to
pass to `createRealmImport` as `upload_s3_key`.

Required scope: `clusters:imports:write`

## Path parameters

- `cluster_id` string, uuid, required

## Headers

- `API-Version` '2026-06-01.beta', required

## Response `200`

Presigned URL to upload an import artifact to, plus the object key to pass back to createRealmImport.

- object
  - `upload_url` string, uri, required
  - `s3_key` string, required

## Other responses

- `401`: Access is unauthorized.
- `403`: Access is forbidden.
- `404`: The server cannot find the requested resource.
- `429`: Client error
- `500`: Server error
- `501`: Server error

---

[API](https://skmtc.dev/skycloak/apis/skycloak-public-api.md) · [All operations](https://skmtc.dev/skycloak/apis/skycloak-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/skycloak/apis/skycloak-public-api/revisions/33a69e2ce35f?raw)
