Create Endpoint
cURL - Webhook
cURL - Email Forward
cURL - Email Group
TypeScript SDK
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 of the endpoint (1-255 characters).
Endpoint type: webhook, email, or email_group.
Configuration object based on endpoint type. Webhook URL to receive email notifications.
Request timeout in seconds (1-300).
Number of retry attempts on failure (0-10).
Custom headers to include with webhook requests. Example: { "X-Custom-Header": "value" }
Email address to forward emails to.
Whether to preserve original email headers when forwarding.
Array of email addresses (1-50 addresses).
Whether to preserve original email headers when forwarding.
Optional description (max 1000 characters).
Response
Unique identifier for the endpoint.
Endpoint type: webhook, email, or email_group.
Configuration object (includes verificationToken for webhooks).
Whether the endpoint is active.
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 group email addresses (only for email_group type).
Delivery statistics. Show Delivery Stats Object
Total number of delivery attempts.
Number of successful deliveries.
Number of failed deliveries.
ISO 8601 timestamp of last delivery attempt.
Webhook Response
Email Group Response
{
"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
Maximum number of endpoints to return (1-100).
Number of endpoints to skip for pagination.
Filter by endpoint type: webhook, email, or email_group.
Filter by active status: true or false.
Sort order: newest or oldest.
Search by name or configuration content (max 100 characters).
Response
Array of endpoint objects (same structure as Create Endpoint response).
Pagination metadata. Number of results per page.
Number of results skipped.
Total number of matching endpoints.
Whether there are more results available.
{
"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
Updated name (1-255 characters).
Updated configuration (same structure as create).
Whether the endpoint should be active.
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
Whether the test was successful.
Human-readable test result message.
Response time in milliseconds (for webhooks).
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
Whether the deletion was successful.
Human-readable message about the deletion result.
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"
}