---
title: "network.secret-use-request@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/network.secret-use-request"
updated: null
---

# network.secret-use-request@1 · OpenVibe.Services

HTML: [network.secret-use-request@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/network.secret-use-request)

# SecretUseRequest `network.secret-use-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: network
- Visibility: first-party
- Status: active
- Compatibility: backward
- Decision: [ADR-056](/docs/adr/ADR-056)
- Schema: [`https://openvibe.network/contracts/network/secret-use-request.v1.json`](/docs/contracts/network.secret-use-request.json)

network.secret-use-request@1 (ADR-056): what a first-party service sends to POST /internal/secrets/use with network.secret.use. sign asks for HMAC-SHA256 of message under the secret (the value never leaves Network); reveal asks for the value, to send to origin. Either needs a grant of that secret to the calling service for that purpose (and origin).

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `project_id` | string | yes |  | - `pattern ^prj_[0-9A-HJKMNP-TV-Z]{26}$` |
| `environment` | enum | yes |  | - `one of "sandbox", "production"` |
| `name` | string | yes |  | - `pattern ^[a-z][a-z0-9_-]{0,63}$` |
| `purpose` | enum | yes |  | - `one of "sign", "reveal"` |
| `message` | string |  | sign: the exact text to sign (for a webhook delivery, "<timestamp>.<raw body>"). Not allowed with reveal. | - `maxLength 1048576` |
| `origin` | string |  | reveal: the https origin the value will be sent to; the grant must list it. Not allowed with sign. | - `pattern ^https://[a-z0-9.-]+(:[0-9]{1,5})?$` |

## Examples

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

 Valid: reveal

~~~~
{
  "project_id": "prj_01M4XE52PGJDVR1KZ1AG9VYW3Q",
  "environment": "sandbox",
  "name": "api_token",
  "purpose": "reveal",
  "origin": "https://api.example.com"
}
~~~~

Valid: sign

~~~~
{
  "project_id": "prj_01M4XE52PGJDVR1KZ1AG9VYW3Q",
  "environment": "production",
  "name": "webhook-signing",
  "purpose": "sign",
  "message": "1760504400.{\"state\":\"succeeded\"}"
}
~~~~

Rejected: reveal-with-message

~~~~
{
  "project_id": "prj_01M4XE52PGJDVR1KZ1AG9VYW3Q",
  "environment": "production",
  "name": "api_token",
  "purpose": "reveal",
  "origin": "https://api.example.com",
  "message": "x"
}
~~~~

Rejected: reveal-without-origin

~~~~
{
  "project_id": "prj_01M4XE52PGJDVR1KZ1AG9VYW3Q",
  "environment": "production",
  "name": "api_token",
  "purpose": "reveal"
}
~~~~

Rejected: sign-without-message

~~~~
{
  "project_id": "prj_01M4XE52PGJDVR1KZ1AG9VYW3Q",
  "environment": "production",
  "name": "webhook-signing",
  "purpose": "sign"
}
~~~~

## Validate

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