import Inbound from 'inboundemail';
const client = new Inbound({
apiKey: process.env['INBOUND_API_KEY'], // This is the default and can be omitted
});
const response = await client.endpoints.test('id');
console.log(response.message);{
"success": true,
"message": "<string>",
"responseTime": 123,
"statusCode": 123,
"responseBody": "<string>",
"error": "<string>",
"testPayload": "<unknown>",
"webhookFormat": "inbound",
"urlTested": "<string>"
}Test an endpoint by sending a test payload. For webhooks, supports inbound, discord, and slack formats. For email endpoints, simulates the forwarding process.
import Inbound from 'inboundemail';
const client = new Inbound({
apiKey: process.env['INBOUND_API_KEY'], // This is the default and can be omitted
});
const response = await client.endpoints.test('id');
console.log(response.message);{
"success": true,
"message": "<string>",
"responseTime": 123,
"statusCode": 123,
"responseBody": "<string>",
"error": "<string>",
"testPayload": "<unknown>",
"webhookFormat": "inbound",
"urlTested": "<string>"
}Your Inbound API key. Include it in the Authorization header as: Bearer
Was this page helpful?