---
title: "space.build-files@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/space.build-files"
updated: null
---

# space.build-files@1 · OpenVibe.Services

HTML: [space.build-files@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/space.build-files)

# SpaceBuildFiles `space.build-files@1`

Generated at 2026-11-13 06:25:48 UTC from [`openvibe-contracts v0.419.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.419.0) and [`openvibe-sdk v0.161.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.161.0).

- Version: 1.0.0
- Owner: space
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/space/build-files.v1.json`](/docs/contracts/space.build-files.json)

space.build-files@1: the source files of one of a person's spaces, as their agent sees them (OpenVibe.Space's builder API; plan 2026-10-22 §Z stage Z1). GET /api/v1/spaces/:id/files answers { files }: every file of the space, its path and its whole content. The same shape is the body of PUT /api/v1/spaces/:id/files (space.build-write@1): the files to write, which replace the space's files as a whole.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `files` | array of object | yes |  | - `maxItems 20`<br>- `items: no other fields` |
| `files[].path` | string | yes | The file's path inside the space: letters, digits, ".", "-", "\_", up to four folders. | - `pattern ^[A-Za-z0-9][A-Za-z0-9._-]*(/[A-Za-z0-9][A-Za-z0-9._-]*){0,3}$`<br>- `maxLength 80` |
| `files[].content` | string | yes | The file's whole content. | - `maxLength 200000` |

## Examples

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

 Valid: two

~~~~
{
  "files": [
    {
      "path": "index.html",
      "content": "<!doctype html><title>My Podcast</title>"
    },
    {
      "path": "style.css",
      "content": "body { font: 16px system-ui; }"
    }
  ]
}
~~~~

Rejected: bad-path

~~~~
{
  "files": [
    {
      "path": "../secrets.txt",
      "content": "no"
    }
  ]
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('space.build-files@1', value);   // { valid, errors: [{ path, message }] }
~~~~
