import Inbound from 'inboundemail';
const client = new Inbound({
apiKey: process.env['INBOUND_API_KEY'], // This is the default and can be omitted
});
const emailAddress = await client.emailAddresses.create({ address: 'x', domainId: 'x' });
console.log(emailAddress.id);{
"id": "<string>",
"address": "<string>",
"domainId": "<string>",
"webhookId": "<string>",
"endpointId": "<string>",
"isActive": true,
"isReceiptRuleConfigured": true,
"receiptRuleName": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"userId": "<string>",
"domain": {
"id": "<string>",
"name": "<string>",
"status": "<string>"
},
"routing": {
"type": "webhook",
"id": "<string>",
"name": "<string>",
"isActive": true,
"config": "<unknown>"
},
"warning": "<string>"
}Create a new email address for an authenticated user’s domain, optionally routing to a webhook or endpoint.
import Inbound from 'inboundemail';
const client = new Inbound({
apiKey: process.env['INBOUND_API_KEY'], // This is the default and can be omitted
});
const emailAddress = await client.emailAddresses.create({ address: 'x', domainId: 'x' });
console.log(emailAddress.id);{
"id": "<string>",
"address": "<string>",
"domainId": "<string>",
"webhookId": "<string>",
"endpointId": "<string>",
"isActive": true,
"isReceiptRuleConfigured": true,
"receiptRuleName": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"userId": "<string>",
"domain": {
"id": "<string>",
"name": "<string>",
"status": "<string>"
},
"routing": {
"type": "webhook",
"id": "<string>",
"name": "<string>",
"isActive": true,
"config": "<unknown>"
},
"warning": "<string>"
}Your Inbound API key. Include it in the Authorization header as: Bearer
Response for status 201
Show child attributes
Show child attributes
Was this page helpful?