blockreq_deleteEndpoint
Description
Section titled “Description”Deletes an endpoint by its ID. Only endpoints owned by the authenticated user can be deleted.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
endpointId | string | Yes | The endpoint ID to delete |
Returns
Section titled “Returns”| Field | Type | Description |
|---|---|---|
deleted | boolean | Always true on success |
endpointId | string | The deleted endpoint ID |
Errors
Section titled “Errors”| Code | Message | Description |
|---|---|---|
| -32602 | Missing required parameter: endpointId | No endpointId provided |
| -32004 | Endpoint not found or not owned by this user | Invalid or unauthorized endpoint |
Request Example
Section titled “Request Example”{ "jsonrpc": "2.0", "method": "blockreq_deleteEndpoint", "params": [{ "endpointId": "a1b2c3d4-..." }], "id": 1}Response Example
Section titled “Response Example”{ "jsonrpc": "2.0", "id": 1, "result": { "deleted": true, "endpointId": "a1b2c3d4-..." }}Code Examples
Section titled “Code Examples”curl -X POST https://eth-mainnet.blockreq.com/v1/rpc/YOUR_API_KEY \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"blockreq_deleteEndpoint","params":[{"endpointId":"a1b2c3d4-..."}],"id":1}'const response = await fetch('https://eth-mainnet.blockreq.com/v1/rpc/YOUR_API_KEY', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ jsonrpc: '2.0', method: 'blockreq_deleteEndpoint', params: [{ endpointId: 'a1b2c3d4-...' }], id: 1, }),});const data = await response.json();console.log(data.result.deleted ? 'Deleted' : 'Failed');