Skip to content
POST /webhook/test

Delivers a single event to one webhook so you can verify your endpoint receives, verifies and parses Truto events before wiring up the real thing.

The event is delivered synchronously and directly to the webhook — it reaches the endpoint whether or not the webhook subscribes to that event type, and the response tells you exactly how your endpoint answered. It is signed with the same X-Truto-Signature header as a production event and carries the webhook's real environment_id.

Pick an event_type and Truto generates a payload shaped like the one the platform really emits for it. Pass integrated_account_id to build that payload from one of your connected accounts (credentials are stripped, exactly as in production); leave it out and placeholder account data is used. payload is deep-merged over the generated payload if you need to pin specific values.

Calling with only id still works and sends integrated_account:created.

Request Body

event_typestring

The event type to simulate. Defaults to integrated_account:created.

Example: integrated_account:created
Possible values:
integrated_account:createdintegrated_account:updatedintegrated_account:deletedintegrated_account:activeintegrated_account:post_connect_form_submittedintegrated_account:post_install_errorintegrated_account:validation_errorintegrated_account:authentication_errorintegrated_account:forbidden_errorintegrated_account:reactivatedintegrated_account:stalelink_token:connection_error+ 27 more
idstring · uuid

ID of the webhook you want to send the test event to.

Example: f49fa6c3-3d60-4d7e-bc86-16259a5d0db0
integrated_account_idstring · uuid

Build the payload from this connected account instead of placeholder data. Must belong to the same environment as the webhook. Credentials are stripped before delivery.

Example: 8dfb1a2c-1c48-4a55-9a1e-6c37bd7f1f9a
payloadRecord<string, any>

Values deep-merged over the generated payload, for pinning fields your handler branches on.

Example: {"tenant_id":"my-tenant"}

Response Body

event_typestring

The event type that was delivered.

Possible values:
integrated_account:createdintegrated_account:updatedintegrated_account:deletedintegrated_account:activeintegrated_account:post_connect_form_submittedintegrated_account:post_install_errorintegrated_account:validation_errorintegrated_account:authentication_errorintegrated_account:forbidden_errorintegrated_account:reactivatedintegrated_account:stalelink_token:connection_error+ 27 more
payloadRecord<string, any>

The payload that was delivered, after any overrides.

successboolean
Example: true

Errors

StatusDescription
500Your endpoint answered with a status that is not 2xx. The body's message says which status, and remote_status_code and remote_response_text carry your endpoint's status and response body.
truto webhooks test --id '<id>'
import Truto from '@truto/truto-ts-sdk';

const truto = new Truto({
  token: '<your_api_token>',
});

const result = await truto.webhook.test({
  "id": "<webhook_id>"
});

console.log(result);
import asyncio
from truto_python_sdk import TrutoApi

truto_api = TrutoApi(token="<your_api_token>")

async def main():
    result = await truto_api.webhooks.test("<id>")
    print(result)

asyncio.run(main())
curl -X POST 'https://api.truto.one/webhook/test' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": "f49fa6c3-3d60-4d7e-bc86-16259a5d0db0",
  "event_type": "integrated_account:created",
  "integrated_account_id": "8dfb1a2c-1c48-4a55-9a1e-6c37bd7f1f9a",
  "payload": {
    "tenant_id": "my-tenant"
  }
}'
const body = {
  "id": "f49fa6c3-3d60-4d7e-bc86-16259a5d0db0",
  "event_type": "integrated_account:created",
  "integrated_account_id": "8dfb1a2c-1c48-4a55-9a1e-6c37bd7f1f9a",
  "payload": {
    "tenant_id": "my-tenant"
  }
};

const response = await fetch('https://api.truto.one/webhook/test', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import requests

url = "https://api.truto.one/webhook/test"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}
payload = {
    "id": "f49fa6c3-3d60-4d7e-bc86-16259a5d0db0",
    "event_type": "integrated_account:created",
    "integrated_account_id": "8dfb1a2c-1c48-4a55-9a1e-6c37bd7f1f9a",
    "payload": {
        "tenant_id": "my-tenant"
    }
}

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