---
title: "sources.source-write-request@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/sources.source-write-request"
updated: null
---

# sources.source-write-request@1 · OpenVibe.Services

HTML: [sources.source-write-request@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/sources.source-write-request)

# SourcesSourceWriteRequest `sources.source-write-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: sources
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/sources/source-write-request.v1.json`](/docs/contracts/sources.source-write-request.json)

sources.source-write-request@1: bodies of sources.source.manage on OpenVibe.Sources. POST /api/v1/sources registers a source (key, name, type and category required; the other sources.source@1 fields take their defaults; endpoints may be given as bare URLs; a manual source has none, any other at least one) and PATCH /api/v1/sources/:key changes one (merged over the stored source and validated again; key never changes, type not once it has items). Both refuse unknown fields. POST /api/v1/sources/:key/items adds an item to a manual source: url (the evidence) and title required. DELETE /api/v1/items/:id takes { reason } (takedown, licence, error…). DELETE /api/v1/sources/:key (only a source that never produced an item) and POST /api/v1/sources/:key/fetch take no body.

## Fields

This schema has no named fields.

## Examples

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

 Valid: manual-item

~~~~
{
  "url": "https://city.example.gov/notices/2026-114",
  "title": "Road closure on 5th Street",
  "kind": "notice",
  "published_at": "2026-09-24",
  "fields": {
    "street": "5th",
    "days": 3
  }
}
~~~~

Valid: register-csv-identity-fields

~~~~
{
  "key": "usda-ers-fruit-vegetable-prices",
  "name": "USDA ERS average retail prices for fruits and vegetables",
  "type": "api",
  "category": "food",
  "homepage_url": "https://www.ers.usda.gov/data-products/fruit-and-vegetable-prices/",
  "endpoints": [
    {
      "url": "https://www.ers.usda.gov/media/6210/all-fruits-average-prices-csv-format.csv",
      "format": "csv",
      "items_path": "",
      "identity_fields": [
        "Fruit",
        "Form"
      ],
      "fields": {
        "title": "Fruit"
      }
    }
  ],
  "poll_interval_sec": 604800,
  "enabled": false
}
~~~~

Valid: register

~~~~
{
  "key": "example-news",
  "name": "Example News",
  "type": "rss",
  "category": "news",
  "homepage_url": "https://news.example.com/",
  "endpoints": [
    "https://news.example.com/feed.xml"
  ],
  "poll_interval_sec": 900,
  "enabled": false
}
~~~~

Valid: remove-item

~~~~
{
  "reason": "takedown request from the publisher"
}
~~~~

Rejected: unknown-field

~~~~
{
  "key": "example-news",
  "name": "Example News",
  "type": "rss",
  "category": "news",
  "password": "hunter2"
}
~~~~

## Validate

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