Skip to main content
PATCH
/
v1
/
program
/
notifications
/
{emailTypeId}
curl -X PATCH "https://api.affonso.io/v1/program/notifications/nt_welcome" \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "is_active": true,
    "custom_subject": "Welcome to the Acme affiliate family!"
  }'
{
  "success": true,
  "data": {
    "id": "ns_abc123",
    "email_type_id": "nt_welcome",
    "is_active": true,
    "custom_subject": "Welcome to the Acme affiliate family!",
    "custom_body": null,
    "type": {
      "name": "Welcome Email",
      "description": "Sent when an affiliate is approved",
      "icon": "mail",
      "is_customizable": true,
      "target_audience": "affiliate"
    }
  }
}
Update a notification setting for a specific email type. If no custom setting exists yet, it will be created. All fields are optional.

Path Parameters

emailTypeId
string
required
The notification type ID to update settings for.

Body Parameters

is_active
boolean
Enable or disable this notification.
custom_subject
string | null
Custom email subject line. Set to null to revert to default.
custom_body
string | null
Custom email body content. Set to null to revert to default.

Response

Returns the updated notification setting object. Same structure as items in the List Notification Settings response.
curl -X PATCH "https://api.affonso.io/v1/program/notifications/nt_welcome" \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "is_active": true,
    "custom_subject": "Welcome to the Acme affiliate family!"
  }'
{
  "success": true,
  "data": {
    "id": "ns_abc123",
    "email_type_id": "nt_welcome",
    "is_active": true,
    "custom_subject": "Welcome to the Acme affiliate family!",
    "custom_body": null,
    "type": {
      "name": "Welcome Email",
      "description": "Sent when an affiliate is approved",
      "icon": "mail",
      "is_customizable": true,
      "target_audience": "affiliate"
    }
  }
}