import Inbound from 'inboundemail';
const client = new Inbound({
apiKey: process.env['INBOUND_API_KEY'], // This is the default and can be omitted
});
const endpoint = await client.endpoints.create({ config: { url: 'url' }, name: 'x', type: 'webhook' });
console.log(endpoint.id);{
"id": "<string>",
"name": "<string>",
"type": "webhook",
"config": "<unknown>",
"isActive": true,
"description": "<string>",
"userId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"groupEmails": [
"<string>"
],
"deliveryStats": {
"total": 123,
"successful": 123,
"failed": 123,
"lastDelivery": "<string>"
}
}Create a new endpoint (webhook, email, or email_group) for the authenticated user
import Inbound from 'inboundemail';
const client = new Inbound({
apiKey: process.env['INBOUND_API_KEY'], // This is the default and can be omitted
});
const endpoint = await client.endpoints.create({ config: { url: 'url' }, name: 'x', type: 'webhook' });
console.log(endpoint.id);{
"id": "<string>",
"name": "<string>",
"type": "webhook",
"config": "<unknown>",
"isActive": true,
"description": "<string>",
"userId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"groupEmails": [
"<string>"
],
"deliveryStats": {
"total": 123,
"successful": 123,
"failed": 123,
"lastDelivery": "<string>"
}
}Your Inbound API key. Include it in the Authorization header as: Bearer
Response for status 201
webhook, email, email_group Show child attributes
Was this page helpful?