Skip to main content
POST
/
api
/
e2
/
endpoints
JavaScript
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>"
  }
}

Authorizations

Authorization
string
header
required

Your Inbound API key. Include it in the Authorization header as: Bearer

Body

name
string
required
Required string length: 1 - 255
type
enum<string>
required
Available options:
webhook,
email,
email_group
config
WebhookConfig · object
required
description
string
Maximum string length: 1000

Response

Response for status 201

id
string
required
name
string
required
type
enum<string>
required
Available options:
webhook,
email,
email_group
config
any
required
isActive
boolean
required
description
string · null · null
required
userId
string
required
createdAt
string
required
updatedAt
string
required
groupEmails
string[] · null · null
required
deliveryStats
object
required