PUT
/
api
/
v2
/
email-addresses
/
{id}
curl -X PUT 'https://inbound.new/api/v2/email-addresses/email_addr_123' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "endpointId": "end_new_456",
    "isActive": true
  }'
{
  "id": "email_addr_123",
  "address": "hello@example.com",
  "domainId": "dom_abc123",
  "webhookId": null,
  "endpointId": "end_new_456",
  "isActive": true,
  "isReceiptRuleConfigured": true,
  "receiptRuleName": "example.com-individual-rule",
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-15T10:30:00Z",
  "userId": "user_123",
  "domain": {
    "id": "dom_abc123",
    "name": "example.com",
    "status": "verified"
  },
  "routing": {
    "type": "endpoint",
    "id": "end_new_456",
    "name": "New Endpoint",
    "config": {
      "type": "webhook",
      "url": "https://api.newapp.com/webhooks/email"
    },
    "isActive": true
  }
}

Overview

This endpoint updates an email address’s routing configuration and status. It automatically updates AWS SES receipt rules to reflect the changes and ensures proper email forwarding.

Authentication

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

Parameters

id
string
required
The unique identifier of the email address to update.

Request Body

endpointId
string | null
ID of the endpoint to route emails to. Set to null to remove endpoint routing. Cannot be used together with webhookId.
webhookId
string | null
ID of the webhook to route emails to. Set to null to remove webhook routing. Cannot be used together with endpointId.
isActive
boolean
Whether the email address should be active and able to receive emails.

Response

id
string
required
Unique identifier for the email address.
address
string
required
The email address (e.g., “hello@example.com”).
domainId
string
required
ID of the domain this email address belongs to.
webhookId
string | null
ID of the webhook endpoint for routing emails (if using webhook routing).
endpointId
string | null
ID of the endpoint for routing emails (if using endpoint routing).
isActive
boolean
required
Whether this email address is active and can receive emails.
isReceiptRuleConfigured
boolean
required
Whether AWS SES receipt rule is configured for this email address.
receiptRuleName
string | null
Name of the AWS SES receipt rule for this email address.
createdAt
string
required
ISO 8601 timestamp when the email address was created.
updatedAt
string
required
ISO 8601 timestamp when the email address was last updated.
userId
string
required
ID of the user who owns this email address.
domain
object
required
Domain information for this email address.
routing
object
required
Updated email routing configuration.
warning
string
Warning message if there were issues with AWS SES configuration updates.

Examples

Update Routing to Endpoint

curl -X PUT 'https://inbound.new/api/v2/email-addresses/email_addr_123' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "endpointId": "end_new_456",
    "isActive": true
  }'

Update Routing to Webhook

curl -X PUT 'https://inbound.new/api/v2/email-addresses/email_addr_123' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "webhookId": "webhook_789",
    "endpointId": null
  }'

Disable Email Address

curl -X PUT 'https://inbound.new/api/v2/email-addresses/email_addr_123' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "isActive": false
  }'

Remove All Routing

curl -X PUT 'https://inbound.new/api/v2/email-addresses/email_addr_123' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "endpointId": null,
    "webhookId": null
  }'

Response

{
  "id": "email_addr_123",
  "address": "hello@example.com",
  "domainId": "dom_abc123",
  "webhookId": null,
  "endpointId": "end_new_456",
  "isActive": true,
  "isReceiptRuleConfigured": true,
  "receiptRuleName": "example.com-individual-rule",
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-15T10:30:00Z",
  "userId": "user_123",
  "domain": {
    "id": "dom_abc123",
    "name": "example.com",
    "status": "verified"
  },
  "routing": {
    "type": "endpoint",
    "id": "end_new_456",
    "name": "New Endpoint",
    "config": {
      "type": "webhook",
      "url": "https://api.newapp.com/webhooks/email"
    },
    "isActive": true
  }
}

Error Responses

{
  "error": "Cannot specify both endpoint and webhook"
}

Update Behavior

Routing Changes

When updating routing configuration:
1

Validation

The system validates that the new endpoint or webhook exists and belongs to your account.
Setting both endpointId and webhookId in the same request will result in an error.
2

Automatic Clearing

Setting an endpointId automatically clears any existing webhookId, and vice versa.
This ensures only one routing method is active at a time.
3

SES Rule Updates

AWS SES receipt rules are automatically updated to reflect the new routing configuration.
This ensures emails are properly routed without manual intervention.

Status Changes

  • Setting isActive: false disables email receiving but preserves routing configuration
  • Setting isActive: true re-enables email receiving with existing routing
  • SES receipt rules are updated based on the new active status

Important Notes

AWS SES receipt rules are automatically updated when you change routing configuration. This ensures emails are properly forwarded to the new destination.
You cannot specify both endpointId and webhookId in the same request. The system will automatically clear the conflicting routing method.
Set routing IDs to null to remove that routing method. This is useful when switching from endpoint to webhook routing or removing all routing.
  • Get email address: GET /api/v2/email-addresses/{id}
  • Delete email address: DELETE /api/v2/email-addresses/{id}
  • List all email addresses: GET /api/v2/email-addresses
  • Manage endpoints: GET /api/v2/endpoints
  • Manage webhooks: GET /api/v2/webhooks

Notes

  • Only specify the fields you want to update - omitted fields remain unchanged
  • Routing configuration changes are immediately reflected in AWS SES receipt rules
  • Email addresses can function without routing (emails received but not forwarded)
  • The domain must remain verified for the email address to receive emails
  • Both endpoint and webhook routing provide reliable email delivery