Skip to content
POST /webhook/test

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:reactivatedlink_token:connection_errorenvironment_integration:createdenvironment_integration:updated+ 24 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:reactivatedlink_token:connection_errorenvironment_integration:createdenvironment_integration:updated+ 24 more
payloadRecord<string, any>

The payload that was delivered, after any overrides.

successboolean
Example: true
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())