Skip to main content
PUT
AhaSend Go SDK

Authorizations

Authorization
string
header
required

API key for authentication. Non-empty Security Requirement values are AhaSend API-key roles. Roles listed within one requirement object are jointly required; separate requirement objects are alternatives.

Path Parameters

account_id
string<uuid>
required

Account ID

webhook_id
string<uuid>
required

Webhook ID

Body

application/json

Partial update. Omitted and null scalar fields leave their stored values unchanged. Domain transition rules depend on the webhook's existing scope and are described on domains.

name
string | null

Webhook name

Maximum string length: 255
url
string<uri> | null

Webhook URL

enabled
boolean | null

Whether the webhook is enabled

on_reception
boolean | null

Trigger on message reception

on_delivered
boolean | null

Trigger on message delivery

on_transient_error
boolean | null

Trigger on transient errors

on_failed
boolean | null

Trigger on permanent failures

on_bounced
boolean | null

Trigger on bounces

on_suppressed
boolean | null

Trigger on suppressions

on_opened
boolean | null

Trigger on opens

on_clicked
boolean | null

Trigger on clicks

on_suppression_created
boolean | null

Trigger on suppression creation

on_dns_error
boolean | null

Trigger on DNS errors

scope
enum<string> | null

Webhook scope. Omit or send null to keep the current scope.

Available options:
global,
scoped,
null
domains
string[] | null

Omit or send null to leave domain associations unchanged. An array replaces associations when the resulting scope is scoped; [] explicitly clears them. Changing a global webhook to scoped requires a non-empty array in the same request and otherwise returns HTTP 400. Changing to global clears all associations; supplied domains are ignored when the resulting scope is global.

Response

Webhook updated successfully

object
enum<string>
required

Object type identifier

Available options:
webhook
id
string<uuid>
required

Unique identifier for the webhook

created_at
string<date-time>
required

When the webhook was created

updated_at
string<date-time>
required

When the webhook was last updated

name
string
required

Webhook name

url
string<uri>
required

Webhook URL

enabled
boolean
required

Whether the webhook is enabled

on_reception
boolean
required

Trigger on message reception

on_delivered
boolean
required

Trigger on message delivery

on_transient_error
boolean
required

Trigger on transient errors

on_failed
boolean
required

Trigger on permanent failures

on_bounced
boolean
required

Trigger on bounces

on_suppressed
boolean
required

Trigger on suppressions

on_opened
boolean
required

Trigger on opens

on_clicked
boolean
required

Trigger on clicks

on_suppression_created
boolean
required

Trigger on suppression creation

on_dns_error
boolean
required

Trigger on DNS errors

scope
enum<string>
required

Webhook scope

Available options:
global,
scoped
domains
string[]
required

Domains this webhook applies to. Always present; global webhooks return an empty array.

success_count
integer
required

Number of successful calls

error_count
integer
required

Number of unsuccessful calls

errors_since_last_success
integer
required

Number of consecutive failed calls

last_request_at
string<date-time> | null
required

When the webhook was last called