Velt REST APIs Best Practices
Comprehensive guide for the Velt REST API v2, JWT authentication, review agents, Memory, and webhooks. Contains 21 rules across 4 categories covering core setup, REST API endpoints, webhook handling, and debugging.
When to Apply
Reference these guidelines when:
- Calling Velt REST API v2 endpoints from your backend
- Generating JWT tokens for frontend user authentication, or managing permissions
- Managing users, documents, organizations, folders, notifications, activities, or CRDT data server-side
- Provisioning workspaces and API keys (testing vs. production, data residency regions)
- Creating and running review agents, or reading their executions and findings
- Searching or asking Memory, or ingesting knowledge sources
- Handling Velt webhooks (basic or advanced) and verifying signatures
- Implementing GDPR data export or deletion
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|----------|----------|--------|--------|
| 1 | Core Setup | CRITICAL | core- |
| 2 | REST API Endpoints | HIGH | rest- |
| 3 | Webhooks | MEDIUM | webhooks- |
| 4 | Debugging | LOW-MEDIUM | debug- |
Quick Reference
Core Setup (CRITICAL)
core-rest-api-auth- API-key-level vs. workspace-level header pairs, POST +{ data }wrapper, response envelopecore-jwt-tokens-/v2/auth/generate_tokenbody shape,authProviderrefresh, permissions add/get/remove,generate_signature
REST API Endpoints (HIGH)
rest-comments- Comment annotation and comment CRUD (commentAnnotations[],commentData[],updatedData), agent filters, GET shapesrest-users- Add/get/update/delete users with request-level scope andaccessRole, GDPR export and async deletionrest-documents-orgs- Organizations, documents, folders, user groups, access types, migration, allowed domainsrest-documents-partial-failures- Per-itemcodeon bulk document endpoints; v2 500 vs. v1 200 behaviorrest-notifications- Add/get/update/delete notifications,notifyAll, resolver mode, per-user configrest-activities-crdt- Activity logs (activities[],featureType), CRDT editor data, live state broadcastrest-workspace-apikey- Create workspaces and API keys: testing vs. gated production keys, regions, auth tokens, app configrest-advanced-webhooks- Manage advanced webhooks: config enable, endpoint CRUD, signing-secret retrievalrest-agents- Agent create/get/update/delete, config blocks, version update merge rules, redacted secrets, versions list/restorerest-agents-execution- Async runs, statuses, page lists (urls), multi-agentagentIdsruns, run-scope keys, per-runaiConfig, list/countrest-agents-builtin-options- Built-in agent IDs, issue types, per-runuserContextoptions, Fix It Everywhere estimaterest-agents-groups-tools- Agent groups and system groups, prompt tools, config resolve, extract, analyticsrest-memory- Memory search, ask, suggest, and judgments query: scoping, decision values, response shaperest-memory-knowledge- Knowledge ingest (inline and by reference), status polling, search, rules, update, delete, rate limitsrest-memory-insights-alerts- Reviewer profiles, patterns, stats, and alerts with their caps and quirksrest-approval-engine- Pointer: Approval Engine (Review Workflow Builder) lives invelt-approval-engine-best-practices
Webhooks (MEDIUM)
webhooks-basic- Basic webhook setup, action types,Basicauth header, encoding and encryption,accessDeniedUserswebhooks-advanced- Advanced (Svix) event types, signature verification, retries, transformations
Debugging (LOW-MEDIUM)
debug-common-issues- Troubleshooting auth, prerequisites, partial failures, agent and Memory misreads, missing webhooks
How to Use
Read individual rule files for detailed explanations and code examples:
rules/shared/core/core-rest-api-auth.md
rules/shared/rest-api/rest-agents-execution.md
Each rule file contains:
- Brief explanation of why it matters
- Incorrect example with explanation
- Correct example with explanation
- Source pointers to official documentation
Compiled Documents
AGENTS.md- Compressed index of all rules with file paths (start here)AGENTS.full.md- Full verbose guide with all rules expanded inline