> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # execute > Send a raw JSON-RPC request to Relay. [dial]: /docs/server-sdks/reference/typescript/relay/client/dial [send-message]: /docs/server-sdks/reference/typescript/relay/client/send-message [call]: /docs/server-sdks/reference/typescript/relay/call Send a raw JSON-RPC 2.0 request to the Relay server and return the parsed response. This is the low-level RPC method that all other client and call control methods are built on. If the client is not currently connected (e.g., during a reconnect cycle), the request is automatically queued and sent after re-authentication completes. > **Warning** > > This method has a default timeout of 30 seconds. If no response is received > within that window, it throws `RelayError` and forces a reconnection attempt, > as the timeout may indicate a half-open WebSocket connection. > **Note** > > Most developers should use the higher-level methods like > [`dial()`][dial], > [`sendMessage()`][send-message], > and the [`Call`][call] control methods > instead of calling `execute()` directly. Use `execute()` only for custom > or unsupported RPC methods. ## **Parameters** **`method`** `string` — required Full JSON-RPC method name (e.g., `"calling.answer"`, `"calling.play"`, `"messaging.send"`). The method name must include the namespace prefix. --- **`params`** `Record` — required Parameters for the RPC call. Typically includes `node_id` and `call_id` for calling methods, along with method-specific parameters. --- ## **Returns** `Promise>` -- The `result` object from the JSON-RPC response. Structure depends on the method called. ## **Example** ```typescript {11} import { RelayClient } from '@signalwire/sdk'; const client = new RelayClient({ project: process.env.SIGNALWIRE_PROJECT_ID!, token: process.env.SIGNALWIRE_API_TOKEN!, contexts: ['default'] }); client.onCall(async (call) => { // Send a custom RPC request using the call's identifiers const result = await client.execute('calling.answer', { node_id: call.nodeId, call_id: call.callId, }); console.log(`Answer result: ${JSON.stringify(result)}`); }); await client.run(); ``` > Send a raw JSON-RPC request to Relay.