ChatInboxRequest chat.inbox-request@1
Generated at from
openvibe-contracts v0.221.0 and
openvibe-sdk v0.65.0.
- Version
- 1.0.0
- Owner
- chat
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/chat/inbox-request.v1.json
chat.inbox-request@1: a support inbox, made (POST /api/chat/inboxes, name required) or changed by its owner (PATCH /api/chat/inboxes/:id, any subset). Unknown fields are ignored; a bad value is 422 with a code (inbox.name, inbox.origin, inbox.hours, inbox.retention, …). Members (POST /:id/members { username }), saved replies (POST /:id/replies { shortcut, body }), webhooks (POST /:id/webhooks { url }), actions (POST /:id/actions { name, description, url, params }) and verified visitors (POST /:id/identity { action: on | rotate | off }) take their own small bodies on the routes chat.inbox.manage names.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
name | string |
| ||
greeting | string | The first line a visitor sees. |
| |
color | string |
| ||
ai_enabled | boolean | Vibe, the assistant, answers first. | ||
ai_instructions | string | What Vibe should know and how to answer (content, never rules that override Chat's). |
| |
knowledge_urls | one of | https pages Vibe may read (an array, or one a line). | ||
allowed_origins | one of | The sites the widget answers (empty: any). | ||
handoff | boolean | The inbox's people answer too (false: a site assistant where only Vibe answers). | ||
hours | object | null | When the people answer; null: always. | ||
route | enum | round_robin: a visitor waiting for a person goes to the next of the people. |
| |
retention_days | integer | null | How long finished conversations stay; null: forever. |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: hours-routing-retention
{
"hours": {
"tz": "America/Los_Angeles",
"days": [
1,
2,
3,
4,
5
],
"start": "09:00",
"end": "17:00"
},
"route": "round_robin",
"retention_days": 90
}Valid: make-an-inbox
{
"name": "Pixel Lamp Co.",
"greeting": "Questions about your lamp? Ask away.",
"color": "#7c5cff",
"ai_enabled": true,
"ai_instructions": "We sell smart lamps.",
"knowledge_urls": [
"https://pixellamp.example/faq"
],
"allowed_origins": [
"https://pixellamp.example"
]
}Rejected: bad-colour
{
"color": "orange"
}Rejected: retention-too-short
{
"retention_days": 3
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('chat.inbox-request@1', value); // { valid, errors: [{ path, message }] }