---
title: "website.share-create-request@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/website.share-create-request"
updated: null
---

# website.share-create-request@1 · OpenVibe.Services

HTML: [website.share-create-request@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/website.share-create-request)

# WebsiteShareCreateRequest `website.share-create-request@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: connect
- Visibility: public
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/website/share-create-request.v1.json`](/docs/contracts/website.share-create-request.json)

website.share-create-request@1: the body of website.share.create (POST /api/v1/shares). The caller names one DNS label, the protocol, the local target and the policy; the project scope comes from the token, never from this body. Connect returns only website.share@1; CON-5 defines a separate authenticated exchange for the one-time tunnel token.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `name` | string | yes | The requested single label under openvibe.website. A taken or reserved label is refused; the UI may suggest name-2 rather than changing it silently. | - `pattern ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$` |
| `protocol` | enum | yes |  | - `one of "http", "https", "tcp", "udp"` |
| `local_target` | string | yes | The local port the Link exposes, e.g. 127.0.0.1:3000; never an arbitrary internet host. | - `minLength 3`<br>- `maxLength 300` |
| `policy` | any | yes | The policy to enforce. An id binds an existing owner-checked policy; without one, Connect creates it. Server-owned fields are refused in this caller body. Credential and link secrets are configured separately. |  |
| `node_id` | string |  | Optional: bind the share to this Link principal now. Omit to bind it when the first tunnel connects. | - `pattern ^lnk_[0-9A-HJKMNP-TV-Z]{26}$` |
| `region` | string |  | Optional preferred edge region; placement may ignore it when capacity or policy requires. | - `maxLength 40` |

## Examples

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

 Valid: agents-portal

~~~~
{
  "name": "agents-alice",
  "protocol": "http",
  "local_target": "127.0.0.1:3000",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
  "policy": {
    "mode": "signin",
    "allowed_projects": [
      "prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
    ],
    "rate_limits": {
      "per_ip_per_minute": 120
    }
  }
}
~~~~

Valid: existing-policy-id

~~~~
{
  "name": "agents-alice",
  "protocol": "http",
  "local_target": "127.0.0.1:3000",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
  "policy": {
    "id": "pol_01J8Z3Q4R5S6T7V8W9X0Y1Z2A4",
    "mode": "signin"
  }
}
~~~~

Valid: max-label

~~~~
{
  "name": "a-------------------------------------------------------------z",
  "protocol": "http",
  "local_target": "127.0.0.1:3000",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
  "policy": {
    "mode": "signin",
    "allowed_projects": [
      "prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
    ],
    "rate_limits": {
      "per_ip_per_minute": 120
    }
  }
}
~~~~

Valid: one-char

~~~~
{
  "name": "a",
  "protocol": "http",
  "local_target": "127.0.0.1:3000",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
  "policy": {
    "mode": "signin",
    "allowed_projects": [
      "prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
    ],
    "rate_limits": {
      "per_ip_per_minute": 120
    }
  }
}
~~~~

Valid: two-char

~~~~
{
  "name": "ab",
  "protocol": "http",
  "local_target": "127.0.0.1:3000",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
  "policy": {
    "mode": "signin",
    "allowed_projects": [
      "prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
    ],
    "rate_limits": {
      "per_ip_per_minute": 120
    }
  }
}
~~~~

Rejected: leading-hyphen

~~~~
{
  "name": "-ab",
  "protocol": "http",
  "local_target": "127.0.0.1:3000",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
  "policy": {
    "mode": "signin",
    "allowed_projects": [
      "prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
    ],
    "rate_limits": {
      "per_ip_per_minute": 120
    }
  }
}
~~~~

Rejected: missing-policy

~~~~
{
  "name": "agents-alice",
  "protocol": "http",
  "local_target": "127.0.0.1:3000"
}
~~~~

Rejected: policy-created-at

~~~~
{
  "name": "agents-alice",
  "protocol": "http",
  "local_target": "127.0.0.1:3000",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
  "policy": {
    "mode": "signin",
    "allowed_projects": [
      "prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
    ],
    "rate_limits": {
      "per_ip_per_minute": 120
    },
    "created_at": "2026-10-29T08:00:00.000Z"
  }
}
~~~~

Rejected: policy-owner

~~~~
{
  "name": "agents-alice",
  "protocol": "http",
  "local_target": "127.0.0.1:3000",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
  "policy": {
    "mode": "signin",
    "allowed_projects": [
      "prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
    ],
    "rate_limits": {
      "per_ip_per_minute": 120
    },
    "owner": {
      "type": "user",
      "id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A6"
    }
  }
}
~~~~

Rejected: policy-password-set

~~~~
{
  "name": "agents-alice",
  "protocol": "http",
  "local_target": "127.0.0.1:3000",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
  "policy": {
    "mode": "signin",
    "allowed_projects": [
      "prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
    ],
    "rate_limits": {
      "per_ip_per_minute": 120
    },
    "password_set": false
  }
}
~~~~

Rejected: policy-project-id

~~~~
{
  "name": "agents-alice",
  "protocol": "http",
  "local_target": "127.0.0.1:3000",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
  "policy": {
    "mode": "signin",
    "allowed_projects": [
      "prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
    ],
    "rate_limits": {
      "per_ip_per_minute": 120
    },
    "project_id": null
  }
}
~~~~

Rejected: policy-updated-at

~~~~
{
  "name": "agents-alice",
  "protocol": "http",
  "local_target": "127.0.0.1:3000",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
  "policy": {
    "mode": "signin",
    "allowed_projects": [
      "prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
    ],
    "rate_limits": {
      "per_ip_per_minute": 120
    },
    "updated_at": "2026-10-29T08:00:00.000Z"
  }
}
~~~~

Rejected: policy-version

~~~~
{
  "name": "agents-alice",
  "protocol": "http",
  "local_target": "127.0.0.1:3000",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
  "policy": {
    "mode": "signin",
    "allowed_projects": [
      "prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
    ],
    "rate_limits": {
      "per_ip_per_minute": 120
    },
    "version": 1
  }
}
~~~~

Rejected: project-in-body

~~~~
{
  "name": "agents-alice",
  "protocol": "http",
  "local_target": "127.0.0.1:3000",
  "policy": {
    "mode": "signin"
  },
  "project_id": "prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
}
~~~~

Rejected: too-long

~~~~
{
  "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "protocol": "http",
  "local_target": "127.0.0.1:3000",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
  "policy": {
    "mode": "signin",
    "allowed_projects": [
      "prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
    ],
    "rate_limits": {
      "per_ip_per_minute": 120
    }
  }
}
~~~~

Rejected: trailing-hyphen

~~~~
{
  "name": "ab-",
  "protocol": "http",
  "local_target": "127.0.0.1:3000",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
  "policy": {
    "mode": "signin",
    "allowed_projects": [
      "prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
    ],
    "rate_limits": {
      "per_ip_per_minute": 120
    }
  }
}
~~~~

## Validate

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