> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.truvo.com/llms.txt.

# replay_event_delivery

POST https://api.truvo.com/v1/mcp#replay_event_delivery
Content-Type: application/json

Reference: https://docs.truvo.com/api-reference/call-replay-event-delivery

## Authentication

- `Authorization` header (bearer token, required) — Your Truvo API key, sent as a bearer token. The prefix selects sandbox (trv_sandbox_) or live (trv_live_).

## Request

### Headers

- `Accept` (string, required, default: application/json, text/event-stream)

### Body (application/json)

This endpoint expects a ReplayEventDeliveryCall.

- `jsonrpc` (enum, required)
  - Allowed values: `2.0`
- `id` (integer, required)
- `method` (enum, required)
  - Allowed values: `tools/call`
- `params` (ReplayEventDeliveryCallParams, required)

## Response

### 200

The JSON-RPC answer.

- `jsonrpc` (enum, optional)
  - Allowed values: `2.0`
- `id` (integer, optional)
- `result` (ToolCallAnswerResult, optional)
- `error` (ToolCallAnswerError, optional)

## Types

### ReplayEventDeliveryCallParams

- `name` (enum, required)
  - Allowed values: `replay_event_delivery`
- `arguments` (ReplayEventDeliveryArguments, required)

### ToolCallAnswerResult

- `content` (list of ToolCallAnswerResultContentItems, optional)
- `structuredContent` (ToolCallAnswerResultStructuredContent, optional)
- `isError` (boolean, optional)

### ToolCallAnswerError

- `code` (integer, optional)
- `message` (string, optional)

### ReplayEventDeliveryArguments

- `subscription_id` (string, required)
- `event_id` (string, required)
- `request_key` (string, required)

### ToolCallAnswerResultContentItems

### ToolCallAnswerResultStructuredContent

## Examples

**Request**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "replay_event_delivery",
    "arguments": {
      "subscription_id": "sub_53e3e36ac096b9d2e3cad557691d523f",
      "event_id": "evt_799fylual73b0x6xnpzzm0xi827e24qrayk4",
      "request_key": "0a96c256-747b-4c15-bc86-60afe038acd0"
    }
  }
}
```

**Response**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "text": "Truvo queued event evt_799fylual73b0x6xnpzzm0xi827e24qrayk4 for subscription sub_53e3e36ac096b9d2e3cad557691d523f again, with the same event ID.",
        "type": "text"
      },
      {
        "text": "{\"subscription_id\":\"sub_53e3e36ac096b9d2e3cad557691d523f\",\"event_id\":\"evt_799fylual73b0x6xnpzzm0xi827e24qrayk4\"}",
        "type": "text"
      }
    ],
    "structuredContent": {
      "event_id": "evt_799fylual73b0x6xnpzzm0xi827e24qrayk4",
      "subscription_id": "sub_53e3e36ac096b9d2e3cad557691d523f"
    }
  }
}
```

**SDK Code**

```python Replay the test event
import requests

url = "https://api.truvo.com/v1/mcp#replay_event_delivery"

payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
        "name": "replay_event_delivery",
        "arguments": {
            "subscription_id": "sub_53e3e36ac096b9d2e3cad557691d523f",
            "event_id": "evt_799fylual73b0x6xnpzzm0xi827e24qrayk4",
            "request_key": "0a96c256-747b-4c15-bc86-60afe038acd0"
        }
    }
}
headers = {
    "Accept": "application/json, text/event-stream",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Replay the test event
const url = 'https://api.truvo.com/v1/mcp#replay_event_delivery';
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json, text/event-stream',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"replay_event_delivery","arguments":{"subscription_id":"sub_53e3e36ac096b9d2e3cad557691d523f","event_id":"evt_799fylual73b0x6xnpzzm0xi827e24qrayk4","request_key":"0a96c256-747b-4c15-bc86-60afe038acd0"}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Replay the test event
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.truvo.com/v1/mcp#replay_event_delivery"

	payload := strings.NewReader("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"replay_event_delivery\",\n    \"arguments\": {\n      \"subscription_id\": \"sub_53e3e36ac096b9d2e3cad557691d523f\",\n      \"event_id\": \"evt_799fylual73b0x6xnpzzm0xi827e24qrayk4\",\n      \"request_key\": \"0a96c256-747b-4c15-bc86-60afe038acd0\"\n    }\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Accept", "application/json, text/event-stream")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Replay the test event
require 'uri'
require 'net/http'

url = URI("https://api.truvo.com/v1/mcp#replay_event_delivery")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json, text/event-stream'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"replay_event_delivery\",\n    \"arguments\": {\n      \"subscription_id\": \"sub_53e3e36ac096b9d2e3cad557691d523f\",\n      \"event_id\": \"evt_799fylual73b0x6xnpzzm0xi827e24qrayk4\",\n      \"request_key\": \"0a96c256-747b-4c15-bc86-60afe038acd0\"\n    }\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Replay the test event
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.truvo.com/v1/mcp#replay_event_delivery")
  .header("Accept", "application/json, text/event-stream")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"replay_event_delivery\",\n    \"arguments\": {\n      \"subscription_id\": \"sub_53e3e36ac096b9d2e3cad557691d523f\",\n      \"event_id\": \"evt_799fylual73b0x6xnpzzm0xi827e24qrayk4\",\n      \"request_key\": \"0a96c256-747b-4c15-bc86-60afe038acd0\"\n    }\n  }\n}")
  .asString();
```

```php Replay the test event
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.truvo.com/v1/mcp#replay_event_delivery', [
  'body' => '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "replay_event_delivery",
    "arguments": {
      "subscription_id": "sub_53e3e36ac096b9d2e3cad557691d523f",
      "event_id": "evt_799fylual73b0x6xnpzzm0xi827e24qrayk4",
      "request_key": "0a96c256-747b-4c15-bc86-60afe038acd0"
    }
  }
}',
  'headers' => [
    'Accept' => 'application/json, text/event-stream',
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Replay the test event
using RestSharp;

var client = new RestClient("https://api.truvo.com/v1/mcp#replay_event_delivery");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json, text/event-stream");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"replay_event_delivery\",\n    \"arguments\": {\n      \"subscription_id\": \"sub_53e3e36ac096b9d2e3cad557691d523f\",\n      \"event_id\": \"evt_799fylual73b0x6xnpzzm0xi827e24qrayk4\",\n      \"request_key\": \"0a96c256-747b-4c15-bc86-60afe038acd0\"\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Replay the test event
import Foundation

let headers = [
  "Accept": "application/json, text/event-stream",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": [
    "name": "replay_event_delivery",
    "arguments": [
      "subscription_id": "sub_53e3e36ac096b9d2e3cad557691d523f",
      "event_id": "evt_799fylual73b0x6xnpzzm0xi827e24qrayk4",
      "request_key": "0a96c256-747b-4c15-bc86-60afe038acd0"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.truvo.com/v1/mcp#replay_event_delivery")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```