Skip to main content

Create Endpoint

curl -X POST https://inbound.new/api/e2/endpoints \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support Webhook",
    "type": "webhook",
    "config": {
      "url": "https://api.example.com/webhooks/email",
      "timeout": 30,
      "retryAttempts": 3,
      "headers": {
        "X-Custom-Header": "value"
      }
    },
    "description": "Webhook for support emails"
  }'

POST /api/e2/endpoints

Create a new endpoint (webhook, email, or email_group) for the authenticated user.

Request Parameters

name
string
required
Name of the endpoint (1-255 characters).
type
string
required
Endpoint type: webhook, email, or email_group.
config
object
required
Configuration object based on endpoint type.
description
string
Optional description (max 1000 characters).

Response

id
string
Unique identifier for the endpoint.
name
string
Endpoint name.
type
string
Endpoint type: webhook, email, or email_group.
config
object
Configuration object (includes verificationToken for webhooks).
isActive
boolean
Whether the endpoint is active.
description
string
Endpoint description.
userId
string
ID of the user who owns this endpoint.
createdAt
string
ISO 8601 timestamp when the endpoint was created.
updatedAt
string
ISO 8601 timestamp when the endpoint was last updated.
groupEmails
string[]
Array of group email addresses (only for email_group type).
deliveryStats
object
Delivery statistics.
{
  "id": "ep_abc123",
  "name": "Support Webhook",
  "type": "webhook",
  "config": {
    "url": "https://api.example.com/webhooks/email",
    "timeout": 30,
    "retryAttempts": 3,
    "headers": {
      "X-Custom-Header": "value"
    },
    "verificationToken": "wh_verify_abc123def456"
  },
  "isActive": true,
  "description": "Webhook for support emails",
  "userId": "usr_abc123",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:30:00Z",
  "groupEmails": null,
  "deliveryStats": {
    "total": 0,
    "successful": 0,
    "failed": 0,
    "lastDelivery": null
  }
}

List Endpoints

curl -X GET "https://inbound.new/api/e2/endpoints?type=webhook&limit=50" \
  -H "Authorization: Bearer YOUR_API_KEY"

GET /api/e2/endpoints

Get paginated list of endpoints for authenticated user with optional filtering by type, active status, sort order, and search by name.

Query Parameters

limit
integer
default:"50"
Maximum number of endpoints to return (1-100).
offset
integer
default:"0"
Number of endpoints to skip for pagination.
type
string
Filter by endpoint type: webhook, email, or email_group.
active
string
Filter by active status: true or false.
sortBy
string
default:"newest"
Sort order: newest or oldest.
Search by name or configuration content (max 100 characters).

Response

data
array
Array of endpoint objects (same structure as Create Endpoint response).
pagination
object
Pagination metadata.
{
  "data": [
    {
      "id": "ep_abc123",
      "name": "Support Webhook",
      "type": "webhook",
      "config": {
        "url": "https://api.example.com/webhooks/email",
        "timeout": 30,
        "retryAttempts": 3,
        "headers": {
          "X-Custom-Header": "value"
        },
        "verificationToken": "wh_verify_abc123def456"
      },
      "isActive": true,
      "description": "Webhook for support emails",
      "userId": "usr_abc123",
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T10:30:00Z",
      "groupEmails": null,
      "deliveryStats": {
        "total": 150,
        "successful": 147,
        "failed": 3,
        "lastDelivery": "2024-01-15T14:25:00Z"
      }
    }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 1,
    "hasMore": false
  }
}

Get Endpoint

curl -X GET https://inbound.new/api/e2/endpoints/ep_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

GET /api/e2/endpoints/:id

Get a specific endpoint by ID with detailed information including delivery statistics.

Response

Same structure as Create Endpoint response.

Update Endpoint

curl -X PATCH https://inbound.new/api/e2/endpoints/ep_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Support Webhook",
    "config": {
      "url": "https://api.example.com/webhooks/new-email",
      "timeout": 60
    },
    "isActive": true
  }'

PATCH /api/e2/endpoints/:id

Update an endpoint’s configuration, name, or active status.

Request Parameters

name
string
Updated name (1-255 characters).
config
object
Updated configuration (same structure as create).
isActive
boolean
Whether the endpoint should be active.
description
string
Updated description (max 1000 characters).

Response

Same structure as Create Endpoint response.

Test Endpoint

curl -X POST https://inbound.new/api/e2/endpoints/ep_abc123/test \
  -H "Authorization: Bearer YOUR_API_KEY"

POST /api/e2/endpoints/:id/test

Test an endpoint by sending a sample payload. Useful for verifying webhook URLs and email forwarding.

Response

success
boolean
Whether the test was successful.
message
string
Human-readable test result message.
responseTime
number
Response time in milliseconds (for webhooks).
statusCode
number
HTTP status code (for webhooks).
{
  "success": true,
  "message": "Webhook endpoint responded successfully",
  "responseTime": 245,
  "statusCode": 200
}

Delete Endpoint

curl -X DELETE https://inbound.new/api/e2/endpoints/ep_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

DELETE /api/e2/endpoints/:id

Delete an endpoint. Email addresses and domains using this endpoint will need to be reconfigured.

Response

success
boolean
Whether the deletion was successful.
message
string
Human-readable message about the deletion result.
id
string
ID of the deleted endpoint.
{
  "success": true,
  "message": "Endpoint deleted successfully",
  "id": "ep_abc123"
}

Webhook Verification

All webhook endpoints automatically receive a verificationToken in their config. Use this token to verify that webhook requests are coming from Inbound:
// Verify webhook signature
const signature = request.headers.get('X-Inbound-Signature')
const verificationToken = 'wh_verify_abc123def456' // From endpoint config

if (signature !== verificationToken) {
  return new Response('Invalid signature', { status: 401 })
}

// Process the email...

Webhook Payload

Webhooks receive the full email object:
{
  "id": "eml_abc123",
  "type": "received",
  "from": "[email protected]",
  "to": ["[email protected]"],
  "subject": "Help needed",
  "html": "<p>Email content</p>",
  "text": "Email content",
  "attachments": [],
  "headers": {},
  "receivedAt": "2024-01-15T10:30:00Z"
}

Build docs developers (and LLMs) love