execute

View as MarkdownOpen in Claude
execute<T>(request, options?): Promise<T>

Executes a raw JSON-RPC request on the client session.

Lower-level than executeMethod — allows full control over the RPC request structure.

Type Parameters

Type ParameterDefault type
T extends JSONRPCResponseJSONRPCResponse

Parameters

request
JSONRPCRequestRequired

Complete JSON-RPC request object. See JSONRPCRequest.

options
PendingRPCOptions

Optional RPC execution options (timeout, etc.). See PendingRPCOptions.

Returns

Promise<T>

The RPC response.

Throws

If the RPC call returns an error response.

Examples

Send a raw JSON-RPC request

const response = await call.execute({
jsonrpc: '2.0',
id: crypto.randomUUID(),
method: 'call.mute',
params: { call_id: call.id },
});

See

  • executeMethod — higher-level wrapper for member-targeted Verto methods.