> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.truvo.com/api-reference/send-test-event/llms.txt. # Send a test event POST https://api.truvo.com/v1/event-subscriptions/{id}/test **MCP tool:** [`send_test_event`](https://docs.truvo.com/api-reference/mcp/send-test-event) Reference: https://docs.truvo.com/api-reference/send-test-event ## 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 ### Path parameters - `id` (string, required) ### Headers - `Truvo-Version` (enum, required, default: 2026-09-26) — The contract revision of this request, which every operation in this document requires. This document describes 2026-09-26. Served revisions: 2026-09-26. A missing header, or one that names no served revision exactly, answers `invalid_version` (400), and its field error lists the served revisions in `allowed_values`, newest first. - Allowed values: `2026-09-26` - `Idempotency-Key` (string, required) — A caller-chosen request key. A key replays for at least 24 hours. The same key with the same body replays the first answer; the same key with a different body is a conflict. ## Response ### 202 Send a test event to one active subscription, up to 10 a minute. It names no resource and carries no applicant data. Its delivery shows in the delivery log. A test does not use the quote request allowance. - `subscription_id` (string, required) - `event` (TestEvent, required) ## Errors ### 400 Bad Request Error Error envelope. One of: invalid_version, invalid_json. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 401 Unauthorized Error Error envelope. One of: authentication_failed. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 403 Forbidden Error Error envelope. One of: forbidden. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 404 Not Found Error Error envelope. One of: not_found. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 409 Conflict Error Error envelope. One of: conflict. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 413 Content Too Large Error Error envelope. One of: request_too_large. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 422 Unprocessable Entity Error Error envelope. One of: invalid_input. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 429 Too Many Requests Error Error envelope. One of: rate_limited. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 500 Internal Server Error Error envelope. One of: internal_error. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 503 Service Unavailable Error Error envelope. One of: service_unavailable. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ## Types ### TestEvent - `id` (string, required) - `type` (string, required) - `occurred_at` (datetime, required) - `environment` (string, required) - `subscription_id` (string, required) ### ErrorEnvelopeError - `code` (string, required) - `message` (string, required) - `field_errors` (list of FieldError, required, nullable) - `retry_action` (RetryAction, required) - `doc_url` (string, required) ### FieldError - `path` (string, required) - `message` (string, required) - `allowed_values` (list of string, optional) ### RetryAction - `type` (enum, required) - Allowed values: `none`, `retry`, `correct_input`, `supply_facts`, `read_status`, `use_new_request_key`, `wait`, `contact_support` - `summary` (string, required) ## Examples **Response** ```json { "subscription_id": "sub_53e3e36ac096b9d2e3cad557691d523f", "event": { "id": "evt_test9a7d923809399cb7eb6c35632cda4384", "type": "webhook.test", "occurred_at": "2026-09-27T15:02:28.000Z", "environment": "sandbox", "subscription_id": "sub_53e3e36ac096b9d2e3cad557691d523f" } } ``` **SDK Code** ```python Test event import requests url = "https://api.truvo.com/v1/event-subscriptions/sub_53e3e36ac096b9d2e3cad557691d523f/test" headers = { "Idempotency-Key": "c38e3e85-5d27-4a5e-b27c-78c0d12c9251", "Truvo-Version": "2026-09-26", "Authorization": "Bearer " } response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript Test event const url = 'https://api.truvo.com/v1/event-subscriptions/sub_53e3e36ac096b9d2e3cad557691d523f/test'; const options = { method: 'POST', headers: { 'Idempotency-Key': 'c38e3e85-5d27-4a5e-b27c-78c0d12c9251', 'Truvo-Version': '2026-09-26', Authorization: 'Bearer ' } }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Test event package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.truvo.com/v1/event-subscriptions/sub_53e3e36ac096b9d2e3cad557691d523f/test" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Idempotency-Key", "c38e3e85-5d27-4a5e-b27c-78c0d12c9251") req.Header.Add("Truvo-Version", "2026-09-26") req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Test event require 'uri' require 'net/http' url = URI("https://api.truvo.com/v1/event-subscriptions/sub_53e3e36ac096b9d2e3cad557691d523f/test") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Idempotency-Key"] = 'c38e3e85-5d27-4a5e-b27c-78c0d12c9251' request["Truvo-Version"] = '2026-09-26' request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java Test event import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.truvo.com/v1/event-subscriptions/sub_53e3e36ac096b9d2e3cad557691d523f/test") .header("Idempotency-Key", "c38e3e85-5d27-4a5e-b27c-78c0d12c9251") .header("Truvo-Version", "2026-09-26") .header("Authorization", "Bearer ") .asString(); ``` ```php Test event request('POST', 'https://api.truvo.com/v1/event-subscriptions/sub_53e3e36ac096b9d2e3cad557691d523f/test', [ 'headers' => [ 'Authorization' => 'Bearer ', 'Idempotency-Key' => 'c38e3e85-5d27-4a5e-b27c-78c0d12c9251', 'Truvo-Version' => '2026-09-26', ], ]); echo $response->getBody(); ``` ```csharp Test event using RestSharp; var client = new RestClient("https://api.truvo.com/v1/event-subscriptions/sub_53e3e36ac096b9d2e3cad557691d523f/test"); var request = new RestRequest(Method.POST); request.AddHeader("Idempotency-Key", "c38e3e85-5d27-4a5e-b27c-78c0d12c9251"); request.AddHeader("Truvo-Version", "2026-09-26"); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift Test event import Foundation let headers = [ "Idempotency-Key": "c38e3e85-5d27-4a5e-b27c-78c0d12c9251", "Truvo-Version": "2026-09-26", "Authorization": "Bearer " ] let request = NSMutableURLRequest(url: NSURL(string: "https://api.truvo.com/v1/event-subscriptions/sub_53e3e36ac096b9d2e3cad557691d523f/test")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers 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() ```