GET
/
api
/
v2
/
endpoints
import { InboundEmailClient } from '@inboundemail/sdk'

const inbound = new InboundEmailClient('your_api_key')
const { data, error } = await inbound.endpoint.list()
{
  "data": [
    {
      "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": 145,
        "successful": 142,
        "failed": 3,
        "lastDelivery": "2024-01-15T14:30:00Z"
      }
    },
    {
      "id": "ep_def456",
      "name": "Support Team",
      "type": "email_group",
      "config": {
        "emails": ["support@example.com", "alerts@example.com"],
        "includeAttachments": true,
        "subjectPrefix": "[SUPPORT]"
      },
      "isActive": true,
      "description": "Forward emails to support team",
      "userId": "user_123",
      "createdAt": "2024-01-14T09:15:00Z",
      "updatedAt": "2024-01-14T09:15:00Z",
      "groupEmails": ["support@example.com", "alerts@example.com"],
      "deliveryStats": {
        "total": 23,
        "successful": 23,
        "failed": 0,
        "lastDelivery": "2024-01-15T12:00:00Z"
      }
    }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 2,
    "hasMore": false
  }
}

Overview

Get a paginated list of all endpoints in your account. Endpoints are the unified routing system for webhooks, email forwarding, and email groups. Results are ordered by creation date (newest first).
import { InboundEmailClient } from '@inboundemail/sdk'

const inbound = new InboundEmailClient('your_api_key')
const { data, error } = await inbound.endpoint.list()

Authentication

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

Query Parameters

limit
integer
default:"50"
Maximum number of results to return. Range: 1-100.
offset
integer
default:"0"
Number of results to skip for pagination. Must be non-negative.
type
string
Filter by endpoint type. Valid values: webhook, email, email_group.
active
string
Filter by active status. Pass "true" for active endpoints, "false" for inactive. Must be string values, not boolean.

Response

{
  "data": [
    {
      "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": 145,
        "successful": 142,
        "failed": 3,
        "lastDelivery": "2024-01-15T14:30:00Z"
      }
    },
    {
      "id": "ep_def456",
      "name": "Support Team",
      "type": "email_group",
      "config": {
        "emails": ["support@example.com", "alerts@example.com"],
        "includeAttachments": true,
        "subjectPrefix": "[SUPPORT]"
      },
      "isActive": true,
      "description": "Forward emails to support team",
      "userId": "user_123",
      "createdAt": "2024-01-14T09:15:00Z",
      "updatedAt": "2024-01-14T09:15:00Z",
      "groupEmails": ["support@example.com", "alerts@example.com"],
      "deliveryStats": {
        "total": 23,
        "successful": 23,
        "failed": 0,
        "lastDelivery": "2024-01-15T12:00:00Z"
      }
    }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 2,
    "hasMore": false
  }
}

Response Fields

data
array
Array of endpoint objects matching the query parameters.
pagination
object
Pagination information for the results.

Examples

Basic Usage

import { InboundEmailClient } from '@inboundemail/sdk'

const inbound = new InboundEmailClient('your_api_key')

const { data, error } = await inbound.endpoint.list()
if (error) {
  console.error('Error:', error)
} else {
  console.log(`Found ${data.data.length} endpoints`)
}

Filtering by Type

import { InboundEmailClient } from '@inboundemail/sdk'

const inbound = new InboundEmailClient('your_api_key')

const { data, error } = await inbound.endpoint.list({
  type: 'webhook',
  active: 'true'
})

if (error) {
  console.error('Error:', error)
} else {
  console.log(`Found ${data.data.length} active webhooks`)
}

Pagination

import { InboundEmailClient } from '@inboundemail/sdk'

const inbound = new InboundEmailClient('your_api_key')

const { data, error } = await inbound.endpoint.list({
  limit: 10,
  offset: 20
})

if (error) {
  console.error('Error:', error)
} else {
  console.log(`Page results: ${data.data.length}, Total: ${data.pagination.total}`)
}

Error Responses

Endpoint Types

Webhook

Send email data to an external URL via HTTP POST

Email Forward

Forward emails to a single email address

Email Group

Forward emails to multiple email addresses (up to 50)
Documentation Verified - This endpoint documentation has been verified against the actual API implementation in /api/v2/endpoints/route.ts. All parameters, response fields, error codes, and behavior match the implementation.
1.0 - ✅