Create a letter action

Create an action that fires when a subscriber interacts with a letter.

Letter triggers (letter_trigger):

  • on_open — fires when the letter is opened
  • on_any_click — fires on any link click in the letter
  • on_link_click — fires when any of the specified links in link_urls are clicked (requires link_urls)

source_list_id — optional source list override.

  • Omit or pass 0 (default): the source list is determined automatically from the send/campaign at execution time. Recommended when the letter is used in multiple sends targeting different lists.
  • Pass a specific list ID: that list is always used as the source, regardless of which list the send is addressed to.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
integer
required

ID of the letter

Body Params
string
enum
required

Type of action to perform

Allowed:
string
required

Descriptive name of the action

string
enum
required

Letter event that triggers this action

Allowed:
integer

Source list override. Optional.

  • 0 or omitted (default): source list is determined automatically from the send/campaign at execution time.
  • Specific ID: that list is always used as the source regardless of which list the send targets.
integer

Target list — the contact is subscribed to / unsubscribed from / updated in / deleted from this list.
Required for subscribe, unsubscribe, update, delete. Not required for external.

link_urls
array of strings
fields
array of objects

Field-value pairs to update. Required when action_type is update.

fields
string

Webhook URL to call. Required when action_type is external.

string
enum
Defaults to json

Data format for the external call.

Allowed:
string

HTTP Basic auth username for the external call.

string

HTTP Basic auth password for the external call.

boolean

Send a notification email when this action fires.

target_segments
array of integers

Target list segment IDs to filter by. Only contacts in (or not in) these segments are affected. Omit to disable filtering.

target_segments
string
enum
Defaults to or

Logical connector between target segments.

Allowed:
target_segment_negated_ids
array of integers

Subset of target_segments IDs to negate — contacts in these segments are excluded instead of included.

target_segment_negated_ids
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json