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
Bearer token for API authentication. Format: Bearer YOUR_API_KEY
Request Body
User-friendly name for the endpoint.
Type of endpoint. Valid values: webhook
, email
, email_group
.
Configuration specific to the endpoint type. Structure varies by type (see examples below).
Optional description of the endpoint’s purpose.
Configuration by Type
Webhook Configuration
The URL where webhook payloads will be sent via HTTP POST.
Optional secret for webhook signature verification.
Optional custom headers to include in webhook requests.
Request timeout in seconds. Range: 1-300.
Number of retry attempts for failed requests. Range: 0-10.
Email Forward Configuration
Email address where emails will be forwarded.
config.includeAttachments
Whether to include attachments in forwarded emails.
Optional prefix to add to the subject line of forwarded emails.
Optional custom from address for forwarded emails.
Email Group Configuration
Array of email addresses where emails will be forwarded. Maximum 50 addresses.
config.includeAttachments
Whether to include attachments in forwarded emails.
Optional prefix to add to the subject line of forwarded emails.
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
Unique identifier for the created endpoint.
User-friendly name for the endpoint.
Type of endpoint: webhook
, email
, or email_group
.
Configuration object specific to the endpoint type.
Whether the endpoint is active (always true
for new endpoints).
Description of the endpoint.
ID of the user who owns this endpoint.
ISO 8601 timestamp when the endpoint was created.
ISO 8601 timestamp when the endpoint was last updated.
Array of email addresses (only for email_group
type endpoints).
Initial delivery statistics (all zeros for new endpoints). Total number of delivery attempts.
Number of successful deliveries.
Number of failed deliveries.
ISO 8601 timestamp of the last delivery attempt.
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
{
"error" : "Missing required fields" ,
"required" : [ "name" , "type" , "config" ]
}
Required fields are missing or invalid configuration provided.
400 Bad Request - Invalid Type
{
"error" : "Invalid endpoint type" ,
"validTypes" : [ "webhook" , "email" , "email_group" ]
}
Invalid endpoint type specified.
400 Bad Request - Invalid Configuration
{
"error" : "Invalid configuration" ,
"details" : "Webhook URL is required"
}
Configuration validation failed for the specified endpoint type.
{
"error" : "Unauthorized"
}
Missing or invalid authentication credentials.
500 Internal Server Error
{
"error" : "Internal server error"
}
An unexpected error occurred. Please try again or contact support.
Configuration Validation
Each endpoint type has specific configuration requirements. The API will validate these before creating the endpoint.
Webhook Email Email Group
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