POST
/
api
/
v2
/
endpoints
POST https://inbound.new/api/v2/endpoints
{
  "id": "ep_abc123",
  "name": "Production Webhook",
  "type": "webhook",
  "config": {
    "url": "https://api.example.com/webhook",
    "timeout": 30,
    "retryAttempts": 3
  },
  "isActive": true,
  "description": "Main webhook for production alerts",
  "userId": "user_123",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:30:00Z",
  "groupEmails": null,
  "deliveryStats": {
    "total": 0,
    "successful": 0,
    "failed": 0,
    "lastDelivery": null
  }
}

Overview

Create a new endpoint to handle incoming emails. Endpoints support three types: webhooks (HTTP POST), email forwarding (single recipient), and email groups (multiple recipients).
POST https://inbound.new/api/v2/endpoints

Authentication

Authorization
string
required
Bearer token for API authentication. Format: Bearer YOUR_API_KEY

Request Body

name
string
required
User-friendly name for the endpoint.
type
string
required
Type of endpoint. Valid values: webhook, email, email_group.
config
object
required
Configuration specific to the endpoint type. Structure varies by type (see examples below).
description
string
Optional description of the endpoint’s purpose.

Configuration by Type

Webhook Configuration

config.url
string
required
The URL where webhook payloads will be sent via HTTP POST.
config.secret
string
Optional secret for webhook signature verification.
config.headers
object
Optional custom headers to include in webhook requests.
config.timeout
number
default:"30"
Request timeout in seconds. Range: 1-300.
config.retryAttempts
number
default:"3"
Number of retry attempts for failed requests. Range: 0-10.

Email Forward Configuration

config.forwardTo
string
required
Email address where emails will be forwarded.
config.includeAttachments
boolean
default:"true"
Whether to include attachments in forwarded emails.
config.subjectPrefix
string
Optional prefix to add to the subject line of forwarded emails.
config.fromAddress
string
Optional custom from address for forwarded emails.

Email Group Configuration

config.emails
string[]
required
Array of email addresses where emails will be forwarded. Maximum 50 addresses.
config.includeAttachments
boolean
default:"true"
Whether to include attachments in forwarded emails.
config.subjectPrefix
string
Optional prefix to add to the subject line of forwarded emails.
config.fromAddress
string
Optional custom from address for forwarded emails.

Response

{
  "id": "ep_abc123",
  "name": "Production Webhook",
  "type": "webhook",
  "config": {
    "url": "https://api.example.com/webhook",
    "timeout": 30,
    "retryAttempts": 3
  },
  "isActive": true,
  "description": "Main webhook for production alerts",
  "userId": "user_123",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:30:00Z",
  "groupEmails": null,
  "deliveryStats": {
    "total": 0,
    "successful": 0,
    "failed": 0,
    "lastDelivery": null
  }
}

Response Fields

id
string
Unique identifier for the created endpoint.
name
string
User-friendly name for the endpoint.
type
string
Type of endpoint: webhook, email, or email_group.
config
object
Configuration object specific to the endpoint type.
isActive
boolean
Whether the endpoint is active (always true for new endpoints).
description
string | null
Description of the endpoint.
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[] | null
Array of email addresses (only for email_group type endpoints).
deliveryStats
object
Initial delivery statistics (all zeros for new endpoints).

Examples

Create Webhook Endpoint

curl -X POST "https://inbound.new/api/v2/endpoints" \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production Webhook",
    "type": "webhook",
    "description": "Main webhook for production alerts",
    "config": {
      "url": "https://api.example.com/webhook",
      "timeout": 30,
      "retryAttempts": 3,
      "headers": {
        "X-Custom-Header": "value"
      }
    }
  }'

Create Email Forward Endpoint

curl -X POST "https://inbound.new/api/v2/endpoints" \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sales Forward",
    "type": "email",
    "description": "Forward sales emails to sales team",
    "config": {
      "forwardTo": "sales@example.com",
      "includeAttachments": true,
      "subjectPrefix": "[SALES]"
    }
  }'

Create Email Group Endpoint

curl -X POST "https://inbound.new/api/v2/endpoints" \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support Team",
    "type": "email_group",
    "description": "Forward emails to support team",
    "config": {
      "emails": ["support@example.com", "alerts@example.com"],
      "includeAttachments": true,
      "subjectPrefix": "[SUPPORT]"
    }
  }'

Error Responses

Configuration Validation

Each endpoint type has specific configuration requirements. The API will validate these before creating the endpoint.
  • url is required and must be a valid URL
  • timeout must be between 1-300 seconds
  • retryAttempts must be between 0-10
  • headers must be a valid object