CommunityPaste community.paste@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- community
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/community/paste.v1.json
community.paste@1: one paste as OpenVibe.Community's /api/pastes answers it (server/pastes/service.js shape: Media's pastePublic shape plus the author projection). user_id carries the owner's subject id (Community has no numeric user ids), so a falsy user_id still means anonymous. Times are SQLite UTC text. In lists, content is a 300-character preview (null for a screenshot).
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | integer | yes | ||
app_id | const | yes |
| |
slug | string | yes | ||
user_id | string | null | yes | The owner's subject (usr_…), or null for an anonymous paste. | |
owner_subject | string | null | yes | ||
origin | string | yes | user, or ai for a paste an AI service wrote. | |
type | enum | yes |
| |
title | string | yes | ||
content | string | null | |||
language | string | null | |||
visibility | enum | yes |
| |
stream_id | integer | null | The Live stream it was made during, when its stream_ref is one. | ||
stream_ref | object | null | An EntityRef of where it was made (a Live stream, or a service's own source). | ||
screenshot_url | string | null | |||
metadata | any | Structured metadata a service attached (AI moments), or a screenshot's upload details. | ||
burn_after_read | boolean | |||
forked_from | integer | null | |||
pinned | boolean | |||
views | integer |
| ||
unique_views | integer |
| ||
copies | integer |
| ||
likes | integer |
| ||
is_nsfw | boolean | |||
ai_summary | string | null | |||
ai_tags | string | null | JSON text as the AI pass wrote it. | ||
ai_analyzed_at | string | null | |||
revision | integer | |||
url | string | yes | /p/<slug> | |
raw_url | string | yes | /p/<slug>/raw | |
created_at | string | yes | ||
updated_at | string | null | |||
is_owner | boolean | yes | Whether the caller owns it. | |
username | string | null | |||
display_name | string | null | OpenVibe AI for an AI paste. | ||
avatar_url | string | null | |||
profile_color | string | null |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: text-paste
{
"unique_views": 12,
"id": 4412,
"app_id": "community",
"slug": "k3JfQ2",
"user_id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"owner_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"origin": "user",
"type": "paste",
"title": "ffmpeg restream flags",
"content": "ffmpeg -re -i in.flv -c copy -f flv rtmp://example/live",
"language": "text",
"visibility": "public",
"stream_id": 812,
"stream_ref": {
"service": "live",
"type": "stream",
"id": "812"
},
"screenshot_url": null,
"metadata": null,
"burn_after_read": false,
"forked_from": null,
"pinned": false,
"views": 30,
"copies": 2,
"likes": 5,
"is_nsfw": false,
"ai_summary": null,
"ai_tags": null,
"ai_analyzed_at": null,
"revision": 1,
"url": "/p/k3JfQ2",
"raw_url": "/p/k3JfQ2/raw",
"created_at": "2026-09-25 18:02:11",
"updated_at": "2026-09-25 18:02:11",
"is_owner": true,
"username": "alice",
"display_name": "Alice",
"avatar_url": "https://openvibe.media/avatar/alice",
"profile_color": "#3b82f6"
}Rejected: wrong-app
{
"id": 4412,
"app_id": "media",
"slug": "k3JfQ2",
"user_id": null,
"owner_subject": null,
"origin": "user",
"type": "paste",
"title": "x",
"visibility": "public",
"url": "/p/k3JfQ2",
"raw_url": "/p/k3JfQ2/raw",
"created_at": "2026-09-25 18:02:11",
"is_owner": false
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('community.paste@1', value); // { valid, errors: [{ path, message }] }