---
title: "Create new endpoint"
method: POST
path: "/api/e2/endpoints"
tags: ["Endpoints"]
---

# Create new endpoint

`POST /api/e2/endpoints`

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

## Request body

- object
  - `name` string, required
  - `type` 'webhook' | 'email' | 'email_group', required
  - `config` union, required
    - object
      - `url` string, required
      - `timeout` number
      - `retryAttempts` number
      - `headers` object — Custom headers to include with webhook requests
    - object
      - `forwardTo` string, email, required
      - `includeAttachments` boolean
      - `subjectPrefix` string
      - `fromAddress` string, email
      - `senderName` string
      - `preserveHeaders` boolean
    - object
      - `emails` string[], required
      - `includeAttachments` boolean
      - `subjectPrefix` string
      - `fromAddress` string, email
      - `senderName` string
      - `preserveHeaders` boolean
  - `description` string

## Response `201`

Response for status 201

- object
  - `id` string, required
  - `name` string, required
  - `type` 'webhook' | 'email' | 'email_group', required
  - `config` unknown, required
  - `isActive` boolean, required
  - `description` string, nullable, required
  - `userId` string, required
  - `createdAt` string, required
  - `updatedAt` string, required
  - `groupEmails` string[], nullable, required
  - `deliveryStats` object, required
    - `total` number, required
    - `successful` number, required
    - `failed` number, required
    - `lastDelivery` string, nullable, required

## Other responses

- `400` — Response for status 400
- `401` — Response for status 401
- `500` — Response for status 500

---

[API](https://skmtc.dev/stainless-api/apis/inbound-email-api.md) · [All operations](https://skmtc.dev/stainless-api/apis/inbound-email-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/stainless-api/inbound-email-api/revisions/e279d3cb940b/schema)
