---
title: "Rotate a space key"
method: POST
path: "/v1/claim/rotate"
tags: ["Publishing"]
---

# Rotate a space key

`POST /v1/claim/rotate`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/claim/rotate`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Replaces the shown-once space key for one unclaimed Space with a fresh key, door URL, and claim link. The previous key, its URLs, and its view sessions stop authorizing; explicit recipient Links survive.

## Request body

- object
  - `spaceId` string, required

## Response `200`

Response for status 200

- object
  - `$schema` string, uri: Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
  - `data` object, required
    - `spaceId` string, required
    - `claim` object, required: Replacement space key, door URL, and claim link. Shown exactly once; the previous key, its URLs, and its view sessions stop working.
      - `key` string, required: The space key (sfc_…): the one credential for this unclaimed space. Bearer auth for publish, update, status, sharing, rotation, and the one-time continuation exchange. Returned only at creation and rotation; save it immediately.
      - `url` string, uri, required: The site door: the live URL with the space key in /__/<key> form. Opening it exchanges the key for a private view session and lands on the site. It is the same key in URL form, so share it as carefully as the key.
      - `claimUrl` string, uri, required: Claim page link in /claim#<key> form. The fragment is the key; browsers never send it to a server and the claim page strips it before analytics. Works until expiresAt and can be opened more than once.
      - `expiresAt` string, date-time, required

## Other responses

- `default`: Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.

---

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