---
title: "host.site-config-request@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/host.site-config-request"
updated: null
---

# host.site-config-request@1 · OpenVibe.Services

HTML: [host.site-config-request@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/host.site-config-request)

# HostSiteConfigRequest `host.site-config-request@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: host
- Visibility: first-party
- Status: retired
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/host/site-config-request.v1.json`](/docs/contracts/host.site-config-request.json)

Deprecated since 0.150.0; use space.site-config-request@1. Removed after 1.0.0. the static hosting engine moved from OpenVibe.Host to OpenVibe.Space (2026-10-12, plan T20)

host.site-config-request@1: the body of PUT /api/v1/sites/:id/config on OpenVibe.Host (host.site.config; the acting principal must be a maintainer or owner of the site's project). { headers?, redirects?, spa? } replaces the whole configuration: a field left out is reset to its default. A redirect's status defaults to 301. Refusals are 422 problem+json: site\_config.reserved\_header, site\_config.header\_name, site\_config.header\_value (longer than 1024 characters or a control character), site\_config.too\_many (over 50 headers or 200 redirects), site\_config.redirect (not a local path, a duplicate from, or a status outside 301/302/307/308), site\_config.headers and site\_config.redirects (wrong type). GET and DELETE /api/v1/sites/:id/config take no body (DELETE resets to the defaults).

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `headers` | object |  |  |  |
| `redirects` | array of object |  |  | - `items: no other fields` |
| `redirects[].from` | string | yes |  |  |
| `redirects[].to` | string | yes |  |  |
| `redirects[].status` | enum |  |  | - `one of 301, 302, 307, 308` |
| `spa` | boolean |  |  |  |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: full

~~~~
{
  "headers": {
    "X-Frame-Options": "SAMEORIGIN"
  },
  "redirects": [
    {
      "from": "/docs",
      "to": "/docs/"
    }
  ],
  "spa": true
}
~~~~

Valid: reset

~~~~
{}
~~~~

Rejected: bad-status

~~~~
{
  "redirects": [
    {
      "from": "/a",
      "to": "/b",
      "status": 303
    }
  ]
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('host.site-config-request@1', value);   // { valid, errors: [{ path, message }] }
~~~~
