PUT
/
api
/
v2
/
endpoints
/
{id}
PUT https://inbound.new/api/v2/endpoints/{id}
{
  "id": "ep_abc123",
  "name": "Updated Production Webhook",
  "type": "webhook",
  "config": {
    "url": "https://api.example.com/new-webhook",
    "timeout": 45,
    "retryAttempts": 5,
    "headers": {
      "X-Custom-Header": "updated-value"
    }
  },
  "isActive": true,
  "description": "Updated webhook for production alerts",
  "userId": "user_123",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T15:45:00Z",
  "groupEmails": null
}

Overview

Update an existing endpoint’s name, description, active status, or configuration. All fields are optional - only provide the fields you want to update.
PUT https://inbound.new/api/v2/endpoints/{id}

Authentication

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

Path Parameters

id
string
required
The unique identifier of the endpoint to update.

Request Body

name
string
Update the user-friendly name for the endpoint.
description
string
Update the description of the endpoint’s purpose.
isActive
boolean
Enable or disable the endpoint. Inactive endpoints will not receive emails.
config
object
Update the configuration specific to the endpoint type. Structure varies by type.

Configuration Updates by Type

Webhook Configuration

config.url
string
Update the URL where webhook payloads will be sent.
config.secret
string
Update the secret for webhook signature verification.
config.headers
object
Update custom headers to include in webhook requests.
config.timeout
number
Update request timeout in seconds. Range: 1-300.
config.retryAttempts
number
Update number of retry attempts for failed requests. Range: 0-10.

Email Forward Configuration

config.forwardTo
string
Update the email address where emails will be forwarded.
config.includeAttachments
boolean
Update whether to include attachments in forwarded emails.
config.subjectPrefix
string
Update the prefix to add to the subject line of forwarded emails.
config.fromAddress
string
Update the custom from address for forwarded emails.

Email Group Configuration

config.emails
string[]
Update the array of email addresses where emails will be forwarded. Maximum 50 addresses.
config.includeAttachments
boolean
Update whether to include attachments in forwarded emails.
config.subjectPrefix
string
Update the prefix to add to the subject line of forwarded emails.
config.fromAddress
string
Update the custom from address for forwarded emails.

Response

{
  "id": "ep_abc123",
  "name": "Updated Production Webhook",
  "type": "webhook",
  "config": {
    "url": "https://api.example.com/new-webhook",
    "timeout": 45,
    "retryAttempts": 5,
    "headers": {
      "X-Custom-Header": "updated-value"
    }
  },
  "isActive": true,
  "description": "Updated webhook for production alerts",
  "userId": "user_123",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T15:45:00Z",
  "groupEmails": null
}

Response Fields

id
string
Unique identifier for the endpoint.
name
string
Updated user-friendly name for the endpoint.
type
string
Type of endpoint (cannot be changed): webhook, email, or email_group.
config
object
Updated configuration object specific to the endpoint type.
isActive
boolean
Updated active status of the endpoint.
description
string | null
Updated description of the endpoint.
userId
string
ID of the user who owns this endpoint.
createdAt
string
ISO 8601 timestamp when the endpoint was originally created.
updatedAt
string
ISO 8601 timestamp when the endpoint was last updated.
groupEmails
string[] | null
Updated array of email addresses (only for email_group type endpoints).

Examples

Update Webhook Configuration

import { InboundEmailClient } from '@inboundemail/sdk'

const inbound = new InboundEmailClient('your_api_key')

const { data: endpoint, error } = await inbound.endpoint.update('ep_abc123', {
  name: 'Updated Production Webhook',
  config: {
    url: 'https://api.example.com/new-webhook',
    timeout: 45,
    retryAttempts: 5
  }
})

if (error) {
  console.error('Failed to update endpoint:', error)
} else {
  console.log(`Updated endpoint: ${endpoint.name}`)
}

Disable Endpoint

import { InboundEmailClient } from '@inboundemail/sdk'

const inbound = new InboundEmailClient('your_api_key')

const { data: endpoint, error } = await inbound.endpoint.update('ep_abc123', {
  isActive: false
})

if (error) {
  console.error('Failed to disable endpoint:', error)
} else {
  console.log(`Endpoint ${endpoint.name} is now ${endpoint.isActive ? 'active' : 'inactive'}`)
}

Update Email Group Recipients

import { InboundEmailClient } from '@inboundemail/sdk'

const inbound = new InboundEmailClient('your_api_key')

const { data: endpoint, error } = await inbound.endpoint.update('ep_def456', {
  name: 'Updated Support Team',
  config: {
    emails: [
      'support@example.com',
      'alerts@example.com',
      'manager@example.com'
    ],
    subjectPrefix: '[URGENT-SUPPORT]'
  }
})

if (error) {
  console.error('Failed to update email group:', error)
} else {
  console.log(`Updated email group: ${endpoint.groupEmails?.length} recipients`)
}

Update Only Description

import { InboundEmailClient } from '@inboundemail/sdk'

const inbound = new InboundEmailClient('your_api_key')

const { data: endpoint, error } = await inbound.endpoint.update('ep_abc123', {
  description: 'Updated description for production webhook'
})

if (error) {
  console.error('Failed to update description:', error)
} else {
  console.log(`Updated description: ${endpoint.description}`)
}

Error Responses

Important Notes

When updating the config object, you must provide the complete configuration structure for that endpoint type. Partial config updates are not supported.
The endpoint type cannot be changed after creation. If you need to change the type, you must delete the endpoint and create a new one.
For email group endpoints, updating the config.emails array will completely replace the existing email addresses. The old addresses will be removed and the new ones added.

Configuration Validation

The same validation rules apply as when creating an endpoint:
  • url must be a valid URL if provided
  • timeout must be between 1-300 seconds
  • retryAttempts must be between 0-10

Impact of Updates

Configuration Changes

New configuration takes effect immediately for future emails

Status Changes

Disabling an endpoint stops all email routing to it

1.0 - ✅
Documentation Verified - This endpoint documentation has been verified against the actual API implementation at /api/v2/endpoints/{id} (PUT method) and matches the current codebase implementation. Last verified: January 2025.