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

FieldTypeRequiredDescriptionConstraints
idintegeryes
app_idconstyes
  • = "community"
slugstringyes
user_idstring | nullyesThe owner's subject (usr_…), or null for an anonymous paste.
owner_subjectstring | nullyes
originstringyesuser, or ai for a paste an AI service wrote.
typeenumyes
  • one of "paste", "screenshot"
titlestringyes
contentstring | null
languagestring | null
visibilityenumyes
  • one of "public", "unlisted", "private"
stream_idinteger | nullThe Live stream it was made during, when its stream_ref is one.
stream_refobject | nullAn EntityRef of where it was made (a Live stream, or a service's own source).
screenshot_urlstring | null
metadataanyStructured metadata a service attached (AI moments), or a screenshot's upload details.
burn_after_readboolean
forked_frominteger | null
pinnedboolean
viewsinteger
  • minimum 0
unique_viewsinteger
  • minimum 0
copiesinteger
  • minimum 0
likesinteger
  • minimum 0
is_nsfwboolean
ai_summarystring | null
ai_tagsstring | nullJSON text as the AI pass wrote it.
ai_analyzed_atstring | null
revisioninteger
urlstringyes/p/<slug>
raw_urlstringyes/p/<slug>/raw
created_atstringyes
updated_atstring | null
is_ownerbooleanyesWhether the caller owns it.
usernamestring | null
display_namestring | nullOpenVibe AI for an AI paste.
avatar_urlstring | null
profile_colorstring | 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 }] }