Delete a webhook
Deletes the webhook subscription identified by ID within the specified email domain and returns the deleted subscription.
DELETE
/
email_domains
/
{domain_id}
/
webhooks
/
{id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
await client.emailDomains.webhooks.delete('domain_id', 'id');import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
client.email_domains.webhooks.delete(
"domain_id",
"id",
)
package main
import (
"context"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.EmailDomains.Webhooks.Delete(
context.TODO(),
"domain_id",
"id",
)
if err != nil {
panic(err.Error())
}
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
client.emailDomains().webhooks().delete("domain_id", "id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
email_webhook = telnyx.email_domains.webhooks.delete("domain_id", "id")
puts(email_webhook)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$email_webhook = $client->emailDomains->webhooks->delete(
'domain_id',
'id',
);
var_dump($email_webhook);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-domains:webhooks delete \
--api-key 'My API Key' \
--domain-id domain_id \
--id idcurl --request DELETE \
--url https://api.telnyx.com/v2/email_domains/{domain_id}/webhooks/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174003",
"record_type": "email_webhook",
"url": "https://example.com/webhooks/email",
"events": [
"email.sent",
"email.delivered",
"email.bounced"
],
"domain_id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2026-06-18T12:00:00Z",
"updated_at": "2026-06-18T12:00:00Z"
}
}{
"errors": [
{
"code": "10001",
"title": "Not Found",
"detail": "The requested email domain was not found"
}
]
}{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "An unexpected error occurred"
}
]
}Authorizations
Telnyx API key supplied as Authorization: Bearer <token>. In production, auth may be validated by the API gateway and forwarded via Telnyx auth headers.
Path Parameters
Email domain UUID
Email webhook UUID
Response
Email webhook deleted
Show child attributes
Show child attributes
Example:
{
"id": "123e4567-e89b-12d3-a456-426614174003",
"record_type": "email_webhook",
"url": "https://example.com/webhooks/email",
"events": [
"email.sent",
"email.delivered",
"email.bounced"
],
"domain_id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2026-06-18T12:00:00Z",
"updated_at": "2026-06-18T12:00:00Z"
}
Was this page helpful?
โI
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
await client.emailDomains.webhooks.delete('domain_id', 'id');import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
client.email_domains.webhooks.delete(
"domain_id",
"id",
)
package main
import (
"context"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.EmailDomains.Webhooks.Delete(
context.TODO(),
"domain_id",
"id",
)
if err != nil {
panic(err.Error())
}
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
client.emailDomains().webhooks().delete("domain_id", "id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
email_webhook = telnyx.email_domains.webhooks.delete("domain_id", "id")
puts(email_webhook)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$email_webhook = $client->emailDomains->webhooks->delete(
'domain_id',
'id',
);
var_dump($email_webhook);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-domains:webhooks delete \
--api-key 'My API Key' \
--domain-id domain_id \
--id idcurl --request DELETE \
--url https://api.telnyx.com/v2/email_domains/{domain_id}/webhooks/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174003",
"record_type": "email_webhook",
"url": "https://example.com/webhooks/email",
"events": [
"email.sent",
"email.delivered",
"email.bounced"
],
"domain_id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2026-06-18T12:00:00Z",
"updated_at": "2026-06-18T12:00:00Z"
}
}{
"errors": [
{
"code": "10001",
"title": "Not Found",
"detail": "The requested email domain was not found"
}
]
}{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "An unexpected error occurred"
}
]
}