Skip to main content

Overview

The Velt Python SDK exposes two independent backends:
BackendNamespaceUse case
Self-hostingsdk.selfHosting.*Store Velt data in your own MongoDB + AWS S3
REST APIsdk.api.*Call Velt’s REST APIs directly — no database required
Self-hosting backend (sdk.selfHosting.*) simplifies backend implementation by 90%. Instead of writing custom database queries and storage logic, you:
  1. Pass your DB and storage configs to the SDK
  2. Pass the raw request object directly to SDK methods
  3. Return the resulting response object straight to the client
REST API backend (sdk.api.*) provides parity with Velt’s REST APIs. 18 services, typed @dataclass request objects, and raw Velt API responses. No database or AWS configuration needed.

Installation

Requirements

  • Python 3.8+
  • Django 4.2.26+ (only if using the self-hosting backend)
  • MongoDB (Percona Server or MongoDB Atlas) for self-hosting
  • requests for REST API calls (installed automatically)
  • Optional velt-py[auth] extra (PyJWT>=2.8.0, cryptography>=42.0.0) — required only for the built-in JWT/JWKS verifier path of verifyToken. Install with pip install 'velt-py[auth]'. Core install (pip install velt-py), the custom-callback verify path, and all non-auth features need no new dependency.

Quick Start

Initialize the SDK

Self-hosting initialization (MongoDB + optional AWS):

Configuration

Environment Variables

The SDK reads the following environment variables automatically. These can be used instead of (or in addition to) config dict keys.
VariableConfig key equivalentPurpose
VELT_API_KEYapiKeyVelt API key for authenticating REST API calls
VELT_AUTH_TOKENauthTokenVelt auth token for authenticating REST API calls
VELT_WORKSPACE_IDDefault workspace ID for workspace-scoped operations
VELT_WORKSPACE_AUTH_TOKENAuth token scoped to a specific workspace

Self-Hosting Configuration

Configure MongoDB connection for storing comments, reactions, and user data.

Self-Hosting Backend

The SDK provides methods that accept the raw request from the frontend and return the properly formatted response. All self-hosting service classes — the BaseService base class plus seven resolver services — are importable from velt_py.services.self_hosting. As of v0.1.12, RecorderService, NotificationService, and ActivityService are also exported — previously they were wired into SelfHostingBackend but missing from the package’s __all__.

Comments

getComments

Response

saveComments

Response
As of v0.1.14, when used as a save-resolver handler the inbound event may be a ResolverActions OR a CommentResolverSaveEvent member (or a raw string for forward-compat), and the request may carry targetComment (request context only — never persisted). See the SaveCommentResolverRequest entry under Data Models for these additions.

deleteComment

Response

Reactions

getReactions

Response

saveReactions

Response

deleteReaction

Response

Users

getUsers

Response

Attachments

saveAttachment

Response

deleteAttachment

Response

Token

getToken

  • Generates a Velt auth token for a user. Self-hosting variant.
  • Params: positional — organizationId, userId, email (optional), isAdmin (optional)
  • Returns: VeltSelfHostingResponse
Response
Note: getToken takes positional / keyword arguments — it does NOT accept a dataclass request object. Signature: getToken(organizationId, userId, email=None, isAdmin=False).

Resolver Token Verification

sdk.selfHosting.verifyToken(headers=None, token=None, **overrides) -> VerifyTokenResult authenticates the credential the Velt frontend forwards to your resolver endpoints. New in v0.1.14. It is opt-in via the resolver_auth config block, framework-agnostic, and fail-closed — it returns a structured VerifyTokenResult and never raises for a verification outcome. It is authentication only: it never consults apiKey, organizationId, or the resolver database; resolver services keep their own scoping. result.claims is informational — assert tenant claims against the resolver payload’s organizationId yourself if you need tenant isolation. The built-in JWT/JWKS verifier requires the optional extra: pip install 'velt-py[auth]'. The custom-callback (verify) path needs no new dependency. Configure resolver_auth in the Resolver Auth config tab.
  • Params:
    • headers — Incoming request headers; the token is extracted from the configured header.
    • token — A raw JWT string, passed directly instead of headers.
    • **overrides — One-off jwt / verify / header / scheme that merge over the configured resolver_auth without changing global config.
  • Returns: VerifyTokenResult — see the Data Models entry for fields.
Error codes (result.errorCode)
CodeWhen
MISSING_TOKENNo token found in header / not passed, empty, or wrong scheme.
EXPIREDToken exp is in the past.
INVALID_SIGNATURESignature did not verify against the resolved key.
CLAIM_MISMATCHissuer, audience, or a required claim failed the check.
ALGORITHM_NOT_ALLOWEDToken alg is not in the configured allowlist.
KEY_RESOLUTION_FAILEDJWKS fetch / public_key / secret could not yield a usable key.
VERIFICATION_FAILEDGeneric verification failure not covered above.
NOT_CONFIGUREDresolver_auth is not configured.
DEPENDENCY_MISSINGBuilt-in verifier used without the velt-py[auth] extra installed.
Token extraction Extracted from the configured header (default Authorization, case-insensitive), stripping the configured scheme prefix (default Bearer); or pass token='<raw_jwt>'. Missing, empty, or wrong-scheme credentials → MISSING_TOKEN. Built-in JWT path — key resolution
  • jwt.secret → symmetric HS256/384/512. A PEM string in secret is rejected to prevent PEM-as-HMAC forgery.
  • jwt.public_key → static RSA/EC key for RS* / ES*.
  • jwt.jwks_url → fetched over HTTPS, cached in-process by (url, kid). A fetch failure, non-2xx response, or unresolvable kidKEY_RESOLUTION_FAILED without raising.
Security properties
  • Fail-closed — never verified=True unless a token was present and fully verified.
  • Algorithm pinning — the allowlist is always required and passed to PyJWT; alg=none is rejected unconditionally even if listed; mixed symmetric + asymmetric allowlists are rejected (HS/RS confusion).
  • HTTPS-only JWKSjwks_url must be https://; a redirect downgrade https→http is rejected; 3xx responses are rejected; cache is scoped by (url, kid), not kid alone.
  • No credential leakage — the token, secret, and claims never appear in error strings or logs.
  • Authentication only — never consults apiKey, organizationId, or the resolver database.
Per-call overrides **overrides kwargs merge over the configured resolver_auth, letting you supply a one-off jwt, verify, header, or scheme without mutating global config. When resolver_auth is not configured verifyToken returns verified=False with errorCode='NOT_CONFIGURED'. It does not raise and does not silently pass. ResolverAuthService Newly exported in velt_py.services.self_hosting.__all__ — the DB-free service backing verifyToken. Direct use is optional.

Framework Examples

SDK Initialization (velt_sdk.py)
API Endpoints (views.py)
Configuration (settings.py)

REST API Backend

The sdk.api.* namespace gives you parity with Velt’s REST APIs across 18 services. Each method takes a typed @dataclass request object and returns the raw Velt API response. You only need apiKey and authToken — no database or AWS config.
Every method returns a dict with either a result key (success) or an error key (failure). See VeltApiResponse.

Organizations

addOrganizations

Response

getOrganizations

Response

updateOrganizations

Response

deleteOrganizations

Response

updateOrganizationDisableState

Response

Folders

addFolder

Response

getFolders

Response

updateFolder

Response

deleteFolder

Response

updateFolderAccess

Response

Documents

addDocuments

Response

getDocuments

Response

updateDocuments

Response

deleteDocuments

Response

moveDocuments

Response

updateDocumentAccess

Response

updateDocumentDisableState

Response

migrateDocuments

Response
Note: This call is asynchronous. Poll status via migrateDocumentsStatus.

migrateDocumentsStatus

Response

getDocumentsCount

  • Gets the document count for an organization. Optionally exclude folder docs or scope to a folder.
  • Params: GetDocumentsCountRequest (from velt_py.models.document)
  • Returns: VeltApiResponse

Users

addUsers

Response

getUsers

  • Retrieves users in an organization or document.
  • Params: GetUsersRequest
  • Returns: GetUsersResponse
  • Now also supports optional includeInvolvedDocuments and searchKey (free-text search) filters.
Response

updateUsers

Response

deleteUsers

Response

getUsersCount

  • Gets the user count for an organization. Optionally scope to a document, a user, or all documents.
  • Params: GetUsersCountRequest (from velt_py.models.user_api)
  • Returns: VeltApiResponse

getDocUsers

  • Gets document-level users. Optionally filter by user IDs (max 20; max 5 with includeInvolvedDocuments), include involved documents, and paginate.
  • Params: GetDocUsersRequest (from velt_py.models.user_api)
  • Returns: VeltApiResponse

addUserInvite

  • Creates a user invitation (organization, document, or folder).
  • Params: AddUserInviteRequest (from velt_py.models.user_api)
  • Returns: VeltApiResponse

respondToInvite

  • Responds to a user invitation (accept, reject, or withdraw).
  • Params: RespondUserInviteRequest (from velt_py.models.user_api)
  • Returns: VeltApiResponse

getInvitedUsers

  • Gets invited users for an organization (paginated).
  • Params: GetInvitedUsersRequest (from velt_py.models.user_api)
  • Returns: VeltApiResponse

getUserInvitations

  • Gets invitations for a specific user email (paginated).
  • Params: GetUserInvitationsRequest (from velt_py.models.user_api)
  • Returns: VeltApiResponse

getInvitedPendingUsersCount

  • Gets the count of pending invited users.
  • Params: GetInvitedPendingUsersCountRequest (from velt_py.models.user_api)
  • Returns: VeltApiResponse

User Groups

addUserGroups

Response

addUsersToGroup

Response

deleteUsersFromGroup

Response

Notifications

Filtering unknown fields: updateNotifications accepts an optional filter_unknown_fields: bool = False keyword (backed by velt_py.models.field_allowlists). When True, unknown/custom top-level keys are dropped before the request is sent, while open-typed fields (context, metadata, entityData, user objects) pass through whole. Filtering is fail-open: if it errors, the original payload is sent, so a write is never blocked. addNotifications is not affected — its top-level fields are already fixed. On updateNotifications, isRead / isArchived are not accepted by /v2/notifications/update (the backend strips them anyway), so with the flag on they are dropped client-side.

addNotifications

Response

getNotifications

Response

updateNotifications

Response

deleteNotifications

Response

getNotificationConfig

Response

setNotificationConfig

Response

Comment Annotations

Filtering unknown fields: The add/update methods below accept an optional filter_unknown_fields: bool = False keyword (backed by velt_py.models.field_allowlists). When True, request entity collections are filtered to only the fields the Velt API accepts, dropping unknown/custom top-level keys before the request is sent. Open-typed fields (context, metadata, entityData, user objects) pass through whole — their nested contents are never filtered. Filtering is fail-open: if it errors, the original payload is sent, so a write is never blocked.

addCommentAnnotations

Response

getCommentAnnotations

Response

getCommentAnnotationsCount

Response

updateCommentAnnotations

Response

deleteCommentAnnotations

Response

addComments

  • Adds reply comments to an existing annotation.
  • Params: AddCommentsRequest
  • Returns: VeltApiResponse
  • Accepts the optional filter_unknown_fields=True keyword (see the note above).
Response

getComments

Response

updateComments

  • Updates fields on individual comments inside an annotation.
  • Params: UpdateCommentsRequest
  • Returns: VeltApiResponse
  • Accepts the optional filter_unknown_fields=True keyword (see the note above).
Response

deleteComments

Response

Activities

Filtering unknown fields: The add/update methods below accept an optional filter_unknown_fields: bool = False keyword (backed by velt_py.models.field_allowlists). When True, request entity collections are filtered to only the fields the Velt API accepts, dropping unknown/custom top-level keys before the request is sent. Open-typed fields (context, metadata, entityData, user objects) pass through whole — their nested contents are never filtered. Filtering is fail-open: if it errors, the original payload is sent, so a write is never blocked.

addActivities

Response

getActivities

Response

updateActivities

Response

deleteActivities

Response

Access Control

addPermissions

Response

getPermissions

Response

removePermissions

Response

generateSignature

Response

generateToken

Response

CRDT

addCrdtData

Response

getCrdtData

Response

updateCrdtData

Response

deleteCrdtData

  • Deletes CRDT editor data. Optionally target specific editorIds; omit to delete all editors for a document.
  • Params: DeleteCrdtDataRequest (from velt_py.models.crdt)
  • Returns: VeltApiResponse

Presence

addPresence

Response

updatePresence

Response

deletePresence

Response

Livestate

broadcastEvent

Response

Recordings

getRecordings

Response

Rewriter

askAi

  • Sends a model, prompt, and text to Velt’s AI rewriter and returns the transformed text.
  • Params: AskAiRequest
  • Returns: AskAiResponse
Response
Note: This call may take several seconds and has no client-side timeout. Wrap calls in your own timeout if needed.

GDPR

deleteAllUserData

Response
Note: This call is asynchronous and returns a jobId. Poll status via getDeleteUserDataStatus.

getAllUserData

Response

getDeleteUserDataStatus

Response

Workspace

createWorkspace

Response

getWorkspace

Response

createApiKey

Response

updateApiKey

Response

getApiKeys

Response

getApiKeyMetadata

  • Gets metadata for the API key the SDK is authenticated with.
  • Params: GetApiKeyMetadataRequest
  • Returns: GetApiKeyMetadataResponse
  • Fixed in v0.1.11: now targets the canonical /v2/workspace/apikeyconfig/get endpoint (was /v2/workspace/apikeymetadata/get, retained as a legacy backend alias). Method signature is unchanged — no call-site change needed.
Response

resetAuthToken

Response

getAuthTokens

Response

addDomains

Response

deleteDomains

Response

getDomains

Response

getEmailStatus

Response
Response

getEmailConfig

Response

updateEmailConfig

Response

getWebhookConfig

Response

updateWebhookConfig

Response

getRequestedDomains

  • Gets requested (pending) domains.
  • Params: GetRequestedDomainsRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

createDomainRequest

  • Creates a domain access request.
  • Params: CreateDomainRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

acceptRejectAdditionalUrlRequest

  • Accepts or rejects an additional-URL request.
  • Params: AcceptRejectAdditionalUrlRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

copyApiKey

  • Copies configuration from one API key to another (workspace-scoped).
  • Params: CopyApiKeyRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

updateApiKeyMetadata

  • Updates API key app configuration (private comments, JWT, default access, AI keys).
  • Params: UpdateApiKeyMetadataRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

getNotificationConfig

  • Gets the workspace notification service config.
  • Params: GetWorkspaceNotificationConfigRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

updateNotificationConfig

  • Updates the workspace notification service config.
  • Params: UpdateWorkspaceNotificationConfigRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

getPermissionProviderConfig

  • Gets the permission provider config.
  • Params: GetPermissionProviderConfigRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

updatePermissionProviderConfig

  • Updates the permission provider config.
  • Params: UpdatePermissionProviderConfigRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

getActivityConfig

  • Gets the activity logs config.
  • Params: GetActivityConfigRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

updateActivityConfig

  • Updates the activity logs config.
  • Params: UpdateActivityConfigRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

getAdvancedWebhookConfig

  • Gets the advanced (Svix) webhook config.
  • Params: GetAdvancedWebhookConfigRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

updateAdvancedWebhookConfig

  • Updates the advanced (Svix) webhook config.
  • Params: UpdateAdvancedWebhookConfigRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

getAdvancedWebhookEndpoints

  • Lists advanced webhook endpoints.
  • Params: GetAdvancedWebhookEndpointsRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

createAdvancedWebhookEndpoint

  • Creates an advanced webhook endpoint.
  • Params: CreateAdvancedWebhookEndpointRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

updateAdvancedWebhookEndpoint

  • Updates an advanced webhook endpoint.
  • Params: UpdateAdvancedWebhookEndpointRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

deleteAdvancedWebhookEndpoint

  • Deletes an advanced webhook endpoint.
  • Params: DeleteAdvancedWebhookEndpointRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

getAdvancedWebhookEndpointSecret

  • Gets an advanced webhook endpoint’s signing secret.
  • Params: GetAdvancedWebhookEndpointSecretRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

ensureWorkspaceAuthToken

  • Ensures a workspace auth token exists (workspace-scoped).
  • Params: EnsureWorkspaceAuthTokenRequest (from velt_py.models.workspace)
  • Returns: VeltApiResponse

Workflow

A new service for the Approval Engine / workflow orchestration: definitions, executions, lifecycle events, and step resolution (/v2/workflow/*). 14 methods. Request types are imported from velt_py.models.workflow.

createDefinition

  • Creates a workflow definition.
  • Params: CreateWorkflowDefinitionRequest (from velt_py.models.workflow)
  • Returns: VeltApiResponse

updateDefinition

  • Updates a workflow definition. Supports optimistic concurrency via ifVersion.
  • Params: UpdateWorkflowDefinitionRequest (from velt_py.models.workflow)
  • Returns: VeltApiResponse

deleteDefinition

  • Deletes a workflow definition.
  • Params: DeleteWorkflowDefinitionRequest (from velt_py.models.workflow)
  • Returns: VeltApiResponse

getDefinition

  • Gets a workflow definition.
  • Params: GetWorkflowDefinitionRequest (from velt_py.models.workflow)
  • Returns: VeltApiResponse

listDefinitions

  • Lists workflow definitions.
  • Params: ListWorkflowDefinitionsRequest (from velt_py.models.workflow)
  • Returns: VeltApiResponse

dispatchExecution

  • Dispatches a workflow execution.
  • Params: DispatchExecutionRequest (from velt_py.models.workflow)
  • Returns: VeltApiResponse

cancelExecution

  • Cancels a workflow execution.
  • Params: CancelExecutionRequest (from velt_py.models.workflow)
  • Returns: VeltApiResponse

getExecution

  • Gets a workflow execution.
  • Params: GetExecutionRequest (from velt_py.models.workflow)
  • Returns: VeltApiResponse

getExecutionEvents

  • Gets lifecycle events for an execution (paginated).
  • Params: GetExecutionEventsRequest (from velt_py.models.workflow)
  • Returns: VeltApiResponse

listExecutions

  • Lists workflow executions.
  • Params: ListExecutionsRequest (from velt_py.models.workflow)
  • Returns: VeltApiResponse

cancelStep

  • Cancels a step within an execution.
  • Params: CancelStepRequest (from velt_py.models.workflow)
  • Returns: VeltApiResponse

resolveStep

  • Resolves a step (admin/reviewer override).
  • Params: ResolveStepRequest (from velt_py.models.workflow)
  • Returns: VeltApiResponse

recordAgentResolution

  • Records an agent resolution against a blocking-agent step.
  • Params: RecordAgentResolutionRequest (from velt_py.models.workflow)
  • Returns: VeltApiResponse

recordReviewerDecision

  • Records a reviewer decision against a human step.
  • Params: RecordReviewerDecisionRequest (from velt_py.models.workflow)
  • Returns: VeltApiResponse

Token

getToken

  • Generates a Velt auth token for a user.
  • Params: positional — organizationId, userId, email (optional), isAdmin (optional)
  • Returns: VeltApiResponse
Response
Note: getToken takes positional / keyword arguments — it does NOT accept a dataclass request object. Signature: getToken(organizationId, userId, email=None, isAdmin=False).

Data Isolation

Every sdk.api.* method requires an organizationId in its request payload. Velt’s API enforces data isolation server-side — requests without a valid organizationId will be rejected.

Error Handling

The SDK raises typed exceptions for different failure modes. All exceptions extend VeltSDKError.
ExceptionWhen raised
VeltSDKErrorBase class; catch for any SDK-level error
VeltValidationErrorSDK-level validation (e.g., missing required config); sdk.api.* methods do not validate request payloads locally
VeltTokenErrorToken generation or authentication failure
VeltApiErrorREST API errors (network failures, unexpected responses)
Import path: from velt_py.exceptions import VeltSDKError, VeltValidationError, VeltTokenError, VeltApiError Common self-hosting error codes returned in the response errorCode field:
  • INVALID_INPUT — Request data is malformed or missing required fields
  • INTERNAL_ERROR — Server-side error during processing
  • NOT_FOUND — Requested resource was not found

Data Models

Python-SDK-specific dataclasses used by the self-hosting backend. These are not in the shared API reference because they are only relevant to sdk.selfHosting.* implementations.

PartialCommentAnnotation

Represents a partial update payload for a comment annotation. Starting in v0.1.10, from, assignedTo, targetTextRange, and resolvedByUserId are first-class typed fields (previously silent pass-through via extra_fields).
Field notes
  • from_ — Python alias for the JSON key from (reserved keyword). Serialized as from in the Mongo document.
  • assignedTo — Typed as PartialUser. Omit to leave unchanged; the Mongo write skips the field when None.
  • targetTextRange — Typed PartialTargetTextRange for the selected text snippet a comment is anchored to.
  • resolvedByUserId — See UNSET sentinel for the difference between absent (UNSET) and explicit None.
  • extra_fields — Retained as a catch-all because the frontend contract includes [key: string]: any for customer-configured fieldsToRemove and additionalFields.

PartialReactionAnnotation

Represents a partial update payload for a reaction annotation. Starting in v0.1.12, the reaction-author field is from_ (wire key from), replacing the former user field — aligning with the velt-sdk contract and PartialCommentAnnotation.
Field notes
  • from_ — Python alias for the JSON key from (reserved keyword); serialized as from. Replaces the former user field (renamed in v0.1.12 to match the velt-sdk contract and the comment models). Constructing with user= no longer works — use from_=.
  • Backward-compatible reads: from_dict() accepts either the canonical from key or the legacy user key (from wins when both are present) and populates from_. to_dict() always emits from. No data migration is required for reaction documents already stored under user.

PartialTargetTextRange

Anchors a comment to a selected text snippet.

UNSET Sentinel

UNSET is a sentinel value exported from velt_py.models.comment. It signals that a field was not included in the incoming request payload and should be skipped entirely during the MongoDB write.
ValuePayloadMongo write
UNSETField absentField skipped — no change
NoneField present, value nullField written as null

BaseMetadata

Base metadata attached to every comment annotation. Starting in v0.1.10, sdkVersion and documentMetadata are fully modeled and preserved in MongoDB writes. These fields were previously sent by the frontend on every annotation save but silently dropped.
No import change is required — BaseMetadata is populated automatically from the incoming request payload. The fix applies transparently to all saveComments calls.

VerifyTokenResult

Structured result returned by sdk.selfHosting.verifyToken. New in v0.1.14. Module: velt_py.models.resolver_auth; exported from velt_py and velt_py.models.
Field notes
  • verifiedTrue only when a token was present and fully verified, or a custom callback returned non-None claims.
  • claims — Decoded payload when verified; otherwise None.
  • error — Generic, code-based message; never contains the token or secret.
  • errorCode — One of: MISSING_TOKEN, EXPIRED, INVALID_SIGNATURE, CLAIM_MISMATCH, ALGORITHM_NOT_ALLOWED, KEY_RESOLUTION_FAILED, VERIFICATION_FAILED, NOT_CONFIGURED, DEPENDENCY_MISSING.

CommentResolverSaveEvent

Enum of comment save-resolver actions the frontend forwards to your save handler. New in v0.1.14. A (str, Enum) exported from velt_py and velt_py.models; wire values are byte-identical to the upstream frontend enum.
MemberWire value
STATUS_CHANGEcomment_annotation.status_change
PRIORITY_CHANGEcomment_annotation.priority_change
ASSIGNcomment_annotation.assign
ACCESS_MODE_CHANGEcomment_annotation.access_mode_change
CUSTOM_LIST_CHANGEcomment_annotation.custom_list_change
APPROVEcomment_annotation.approve
ACCEPTcomment.accept
REJECTcomment.reject
SUGGESTION_ACCEPTcomment_annotation.suggestion_accept
SUGGESTION_REJECTcomment_annotation.suggestion_reject
REACTION_ADDcomment.reaction_add
REACTION_DELETEcomment.reaction_delete
SUBSCRIBEcomment_annotation.subscribe
UNSUBSCRIBEcomment_annotation.unsubscribe
Parse orderSaveCommentResolverRequest.from_dict tries ResolverActions FIRST (preserving every existing value), then CommentResolverSaveEvent, then keeps the raw string for unknown future values. DistinctnessCommentResolverSaveEvent.REACTION_ADD (comment.reaction_add) is distinct from ResolverActions.REACTION_ADD (reaction.add, the reaction-resolver action); the parse order routes each correctly.

SaveCommentResolverRequest

The full shared shape is documented in the API reference. This entry covers only the v0.1.14 additions — additive; existing payloads parse byte-identically.
Field notes
  • targetComment: Optional[PartialComment] — The comment the action occurred on, resolved by the frontend from commentId. from_dict parses it fail-open (a malformed/partial dict never raises). to_dict emits it only when not None. saveComments NEVER persists it (request context only).
  • event: Optional[Union[ResolverActions, CommentResolverSaveEvent, str]] — Widened. Every existing ResolverActions value still parses to the same member. Parse order: ResolverActions first, then CommentResolverSaveEvent, then raw string for unknown future values.

Resources