For the complete documentation index, see llms.txt. This page is also available as Markdown.

Save Membership Trigger

Create or update a membership trigger.

A membership trigger runs an action automatically in reaction to a membership event β€” for example sending a welcome email when a user registers. Triggers are part of Norbix's event-driven automation.

This endpoint creates the trigger (or updates it when you pass an existing triggerId); the response returns its id.

post
Authorizations
HTTPRequired

JWT Bearer Authorization

Body

SaveMembershipTrigger

correlationIdstring Β· nullableOptional

CorrelationId for each request

cultureCodestring Β· nullableOptional

Specify culture code when your response from the API should be localised. E.g.: en

timeZoneIdstring Β· nullableOptional

TimeZone

versionstring Β· nullableRequired

The CodeMash API version used to fetch data from the API. If not specified, the last version will be used. E.g.: v3

envstring Β· nullableOptional

Target environment for this request (e.g. TEST, STAGING). Optional β€” when omitted the request runs against PROD. Can be passed in a header as norbix-env.

projectIdstringRequired

ID of your project. Can be passed in a header as norbix-project-id.

Responses
200

OK

application/json
idstring Β· nullableOptional
statusstring Β· nullableOptional
post/api/SaveMembershipTrigger
200

OK

Request body

The request body is polymorphic. It is one of the SaveTriggerRequest types, chosen by the type field (Membership, Schema, Payment, or Files). For a membership trigger, type is Membership and the body is a MembershipTriggerRequest β€” you do not send the abstract base directly:

when selects which membership event fires the trigger (see the MembershipTriggerType values). action is the action to run when it fires β€” described next.

Step 1 β€” pick the action

Every trigger runs exactly one action, chosen by action.type. Each action targets a channel and carries a deliverySettings object shaped for that channel:

action.type

Action schema

Delivery settings

email

TriggerActionEmailDto

EmailCampaignDeliverySettingsDto

push

TriggerActionPushDto

PushCampaignDeliverySettingsDto

webhookcall

TriggerActionWebhookDto

WebhookDeliverySettingsDto

code

TriggerActionCodeDto

CodeDeliverySettingsDto

sms

TriggerActionSmsDto

SmsCampaignDeliverySettingsDto

ssecall

TriggerActionSseDto

SseDeliverySettingsDto

marketplace

TriggerActionMarketplaceDto

β€” (uses functionId + payload)

Pass one of these action objects:

Step 2 β€” pick the delivery settings

The action's deliverySettings controls who receives the message and when. For the messaging channels (email, push, SMS) this object is itself polymorphic: the concrete shape is chosen by its recipientsSourceType field. Pick the one that matches your audience.

Email delivery β€” EmailCampaignDeliverySettingsDto

recipientsSourceType

Sends to

Concrete shape

AllUsers

every user in the project

EmailToAllUsersDeliverySettingsDto

AccountUsers

users on the account

EmailToAccountUsersDeliverySettingsDto

SpecifiedUsers

a list of user ids

EmailToUsersDeliverySettingsDto

Email

raw email addresses

EmailToEmailAddressesDeliverySettingsDto

Collection

records from a database collection

EmailToCollectionRecordsDeliverySettingsDto

Push delivery β€” PushCampaignDeliverySettingsDto

recipientsSourceType

Sends to

Concrete shape

AllUsers

every user in the project

PushToAllUsersDeliverySettingsDto

AccountUsers

users on the account

PushToAccountUsersDeliverySettingsDto

SpecifiedUsers

a list of user ids

PushToUsersDeliverySettingsDto

Devices

specific device tokens

PushToDevicesDeliverySettingsDto

Collection

records from a database collection

PushToCollectionRecordsDeliverySettingsDto

SMS delivery β€” SmsCampaignDeliverySettingsDto

recipientsSourceType

Sends to

Concrete shape

AllUsers

every user in the project

SmsToAllUsersDeliverySettingsDto

SpecifiedUsers

a list of user ids

SmsToUsersDeliverySettingsDto

PhoneNumbers

raw phone numbers

SmsToPhoneNumbersDeliverySettingsDto

Collection

records from a database collection

SmsToCollectionRecordsDeliverySettingsDto

Webhook, Code and SSE delivery

Webhook, Code and SSE (realtime) actions use a single, non-polymorphic delivery-settings shape each:

In the dashboard

Manage this visually in Norbix Cloud β€” see Membership β†’ Triggers.

Use it from code

Call it from any Norbix SDK β€” see Save Membership Trigger in the SDK reference.

Last updated