---
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
      - `preserveHeaders` boolean
    - object
      - `emails` string[], required
      - `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

## Changes

- **2026-01-10** `04a8a5e5040d` — 3 breaking, 3 info
  - removed `subschema #1, subschema #2, subschema #3` from the `config` request property `anyOf` list (media type: application/json)
  - removed `subschema #1, subschema #2, subschema #3` from the `config` request property `anyOf` list (media type: application/x-www-form-urlencoded)
  - removed `subschema #1, subschema #2, subschema #3` from the `config` request property `anyOf` list (media type: multipart/form-data)
  - added `subschema #1: WebhookConfig, subschema #2: EmailConfig, subschema #3: EmailGroupConfig` to the `config` request property `anyOf` list (media type: application/json)
  - …2 more

[Change history](https://skmtc.dev/inboundemail/apis/inbound-email-api/changes/api/e2/endpoints/post.md)

---

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