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"
}
}
}
Notifications
Update Notification Setting
Update a notification setting by email type ID
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
string
required
The notification type ID to update settings for.
Body Parameters
boolean
Enable or disable this notification.
string | null
Custom email subject line. Set to
null to revert to default.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"
}
}
}
Was this page helpful?
