Webhooks

Update Webhook

Update an existing webhook. Only the fields provided will be updated (partial update). You can change the name, target URL, authentication, events, or active status.

put/webhooks/{webhookId}

Request

  • Base URL: https://app.lettr.com/api
  • URL: https://app.lettr.com/api/webhooks/{webhookId}
  • Auth: HTTP bearer

Path parameters

webhookIdstring required
Example:webhook-abc123

The webhook ID to update

Request body

namestring

Name of the webhook

urlstring uri

URL where webhook events will be sent

targetstring uri

Deprecated alias for url. Accepted for backwards compatibility.

auth_type'none' | 'basic' | 'oauth2'

Authentication type for the webhook

auth_usernamestring

Username for basic authentication

auth_passwordstring

Password for basic authentication

oauth_token_urlstring uri

OAuth2 token URL

oauth_client_idstring

OAuth2 client ID

oauth_client_secretstring

OAuth2 client secret

eventsstring[]

Event types that trigger the webhook. Fully-prefixed names such as message.delivery are canonical; short names (delivery) and the legacy engagament.* prefix are accepted for backwards compatibility and are normalised to the fully-prefixed form.

activeboolean

Whether the webhook is enabled

Example request

{
  "name": "Updated Webhook Name",
  "url": "https://example.com/webhook",
  "target": "https://example.com/webhook",
  "auth_type": "none",
  "events": [
    "message.delivery",
    "message.bounce"
  ],
  "active": true
}

Response

Webhook updated successfully

messagestring required

Human-readable response message

Example response

{
  "message": "Webhook retrieved successfully.",
  "data": {
    "id": "webhook-abc123",
    "name": "Order Notifications",
    "url": "https://example.com/webhook",
    "enabled": true,
    "event_types": [
      "message.delivery",
      "message.bounce"
    ],
    "auth_type": "basic",
    "has_auth_credentials": true,
    "last_successful_at": "2024-01-15T10:30:00+00:00",
    "last_status": "success"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.