---
title: "Create or replace a feature"
method: PUT
path: "/spaces/{spaceId}/features/{featureId}"
tags: ["Write Features"]
---

# Create or replace a feature

`PUT /spaces/{spaceId}/features/{featureId}`

Creates or replaces a feature in the space.

## Path parameters

- `spaceId` string, required
- `featureId` string, required

## Query parameters

- `versionRef` string

## Response `200`

A feature response.

## Other responses

- `400` — Malformed or Bad Request.
- `401` — Unauthorized to perform the request.
- `403` — Forbidden request. Insufficient rights to perform the request.
- `409` — An error response which indicates a conflict.
- `413` — Request entity too large.
- `513` — Response payload too large.

## Changes

- **2025-09-08** `f8364de657ab` — 1 info
  - added the new optional `query` request parameter `versionRef`
- **2024-02-05** `539d9580be99` — 1 breaking
  - for the `query` request parameter `versionRef`, default value `main:HEAD` was added
- **2023-08-22** `c656e0e4c8dc` — 1 breaking, 1 info
  - removed the media type `text/plain` for the response with the status `413`
  - added the media type `application/json` for the response with the status `413`
- **2023-07-27** `5e6d40a27f15` — 1 breaking, 1 info
  - removed the media type `text/plain` for the response with the status `413`
  - added the media type `application/json` for the response with the status `413`
- **2023-07-26** `9af744fff119` — 1 breaking, 1 info
  - removed the media type `application/json` for the response with the status `413`
  - added the media type `text/plain` for the response with the status `413`

[Full history](https://skmtc.dev/here/apis/here-xyz-hub/changes/spaces/:spaceId/features/:featureId/put.md)

---

[API](https://skmtc.dev/here/apis/here-xyz-hub.md) · [All operations](https://skmtc.dev/here/apis/here-xyz-hub/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/here/here-xyz-hub/revisions/1c6c6a2bcac9/schema)
