Class: Telnyx::Models::EmailMessageCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/telnyx/models/email_message_create_params.rb,
sig/telnyx/models/email_message_create_params.rbs

Overview

See Also:

  • Telnyx::Resources::EmailMessages#create

Constant Summary collapse

Telnyx =

Returns:

  • (:TrackingSettings)

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(from:, to:, attachments: nil, bcc: nil, cc: nil, forward_of_message_id: nil, from_name: nil, group_id: nil, headers: nil, html_body: nil, ignore_suppression: nil, in_reply_to_message_id: nil, inline_css: nil, metadata: nil, reply_to: nil, reply_to_all: nil, sandbox_mode: nil, scheduled_at: nil, send_at: nil, subject: nil, tags: nil, template_id: nil, template_variables: nil, text_body: nil, tracking_settings: nil, idempotency_key: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Telnyx::Models::EmailMessageCreateParams for more details.

Parameters:

  • from (String, Telnyx::Models::EmailInboxes::EmailAddress)
  • to (Array<String, Telnyx::Models::EmailInboxes::EmailAddress>)
  • attachments (Array<Telnyx::Models::AttachmentRequest>) (defaults to: nil)
  • bcc (Array<String, Telnyx::Models::EmailInboxes::EmailAddress>) (defaults to: nil)
  • cc (Array<String, Telnyx::Models::EmailInboxes::EmailAddress>) (defaults to: nil)
  • forward_of_message_id (String, nil) (defaults to: nil)

    Telnyx message UUID of the message this send forwards. Forwarded

  • from_name (String) (defaults to: nil)

    Optional display name for string from; overrides from.name when provided.

  • group_id (String, nil) (defaults to: nil)

    Optional unsubscribe-group UUID used for group-scoped suppression checks and uns

  • headers (Hash{Symbol=>String}) (defaults to: nil)

    Custom email headers. Write-only; not returned in responses.

  • html_body (String) (defaults to: nil)

    HTML email body. Returned only by GET /email_messages/{id}; omitted from creat

  • ignore_suppression (Boolean) (defaults to: nil)

    When true, allows delivery to recipients whose suppressions explicitly

  • in_reply_to_message_id (String, nil) (defaults to: nil)

    Telnyx message UUID of the message this send replies to. When provided,

  • inline_css (Boolean) (defaults to: nil)
  • metadata (Hash{Symbol=>Object}) (defaults to: nil)

    Custom metadata. Write-only; not returned in responses.

  • reply_to (String, Telnyx::Models::EmailInboxes::EmailAddress) (defaults to: nil)

    Reply-to address. If provided as an object with a name, only the email is stored

  • reply_to_all (Boolean, nil) (defaults to: nil)

    Indicates a reply-all intent. In Phase 1 (wire-only) this does not

  • sandbox_mode (Boolean) (defaults to: nil)
  • scheduled_at (Time, nil) (defaults to: nil)

    Future ISO 8601 time to schedule sending. Invalid or past timestamps

  • send_at (Time) (defaults to: nil)

    Deprecated alias for scheduled_at.

  • subject (String) (defaults to: nil)

    Required unless template_id is supplied. When using a template, the template's

  • tags (Array<String>) (defaults to: nil)

    Tags for categorization and reporting. Stored on the message and propagated to E

  • template_id (String) (defaults to: nil)
  • template_variables (Hash{Symbol=>Object}) (defaults to: nil)

    Variables for Liquid template rendering. Non-object values may cause a 422 valid

  • text_body (String) (defaults to: nil)

    Plain text email body. Returned only by GET /email_messages/{id}; omitted from

  • tracking_settings (Telnyx::Models::TrackingSettings) (defaults to: nil)

    Per-send open and click tracking overrides. Omitted properties inherit the sende

  • idempotency_key (String) (defaults to: nil)
  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/telnyx/models/email_message_create_params.rb', line 198

Instance Attribute Details

#attachmentsArray<Telnyx::Models::AttachmentRequest>?

Returns:



23
# File 'lib/telnyx/models/email_message_create_params.rb', line 23

optional :attachments, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AttachmentRequest] }

#bccArray<String, Telnyx::Models::EmailInboxes::EmailAddress>?

Returns:



28
# File 'lib/telnyx/models/email_message_create_params.rb', line 28

optional :bcc, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::EmailAddressInput] }

#ccArray<String, Telnyx::Models::EmailInboxes::EmailAddress>?

Returns:



33
# File 'lib/telnyx/models/email_message_create_params.rb', line 33

optional :cc, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::EmailAddressInput] }

#forward_of_message_idString?

Telnyx message UUID of the message this send forwards. Forwarded messages start a NEW thread per RFC 5322 — NO In-Reply-To or References headers are set on the outbound MIME. The id is recorded in the message's metadata for EDR provenance only.

The id is validated as a UUID but is NOT looked up against the message store — existence is the caller's responsibility (the forward is pure metadata; it does not affect delivery). Cannot be combined with in_reply_to_message_id (422).

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


46
# File 'lib/telnyx/models/email_message_create_params.rb', line 46

optional :forward_of_message_id, String, nil?: true

#fromString, Telnyx::Models::EmailInboxes::EmailAddress

Parameters:

  • value (Telnyx::Models::email_address_input)

Returns:



13
# File 'lib/telnyx/models/email_message_create_params.rb', line 13

required :from, union: -> { Telnyx::EmailAddressInput }

#from_nameString?

Optional display name for string from; overrides from.name when provided.

Parameters:

  • (String)

Returns:

  • (String, nil)


52
# File 'lib/telnyx/models/email_message_create_params.rb', line 52

optional :from_name, String

#group_idString?

Optional unsubscribe-group UUID used for group-scoped suppression checks and unsubscribe handling.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


59
# File 'lib/telnyx/models/email_message_create_params.rb', line 59

optional :group_id, String, nil?: true

#headersHash{Symbol=>String}?

Custom email headers. Write-only; not returned in responses.

Parameters:

  • (::Hash[Symbol, String])

Returns:

  • (Hash{Symbol=>String}, nil)


65
# File 'lib/telnyx/models/email_message_create_params.rb', line 65

optional :headers, Telnyx::Internal::Type::HashOf[String]

#html_bodyString?

HTML email body. Returned only by GET /email_messages/{id}; omitted from create and list responses.

Parameters:

  • (String)

Returns:

  • (String, nil)


72
# File 'lib/telnyx/models/email_message_create_params.rb', line 72

optional :html_body, String

#idempotency_keyString?

Parameters:

  • (String)

Returns:

  • (String, nil)


196
# File 'lib/telnyx/models/email_message_create_params.rb', line 196

optional :idempotency_key, String

#ignore_suppressionBoolean?

When true, allows delivery to recipients whose suppressions explicitly permit an override. Hard bounces, spam complaints, and invalid-address suppressions cannot be overridden. Requires the email:override API scope.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


80
# File 'lib/telnyx/models/email_message_create_params.rb', line 80

optional :ignore_suppression, Telnyx::Internal::Type::Boolean

#in_reply_to_message_idString?

Telnyx message UUID of the message this send replies to. When provided, the API sets RFC 5322 In-Reply-To and References headers on the outbound MIME so the recipient's mailbox (Gmail/Outlook) threads it correctly. The parent is looked up under the caller's account scope; a UUID belonging to another account yields a non-enumerating 404.

Wire-only (Phase 1): the API sets the headers and does NOT resolve or mutate thread_id on the server side. Messages sent without this parameter are standalone (no threading headers injected).

Cannot be combined with forward_of_message_id (422).

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


96
# File 'lib/telnyx/models/email_message_create_params.rb', line 96

optional :in_reply_to_message_id, String, nil?: true

#inline_cssBoolean?

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


101
# File 'lib/telnyx/models/email_message_create_params.rb', line 101

optional :inline_css, Telnyx::Internal::Type::Boolean

#metadataHash{Symbol=>Object}?

Custom metadata. Write-only; not returned in responses.

Parameters:

  • (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object}, nil)


107
# File 'lib/telnyx/models/email_message_create_params.rb', line 107

optional :metadata, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]

#reply_toString, ...

Reply-to address. If provided as an object with a name, only the email is stored; the name is ignored.



114
# File 'lib/telnyx/models/email_message_create_params.rb', line 114

optional :reply_to, union: -> { Telnyx::EmailAddressInput }

#reply_to_allBoolean?

Indicates a reply-all intent. In Phase 1 (wire-only) this does not change the threading headers — recipient selection is customer- controlled (to/cc), and a thread is not defined by its audience. When the referenced message has no thread context, reply-all degrades to a plain reply (parent ID only in References). The resolution engine (separate work) will expand the ancestor chain at a later phase with no API change.

Only meaningful alongside in_reply_to_message_id.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


127
# File 'lib/telnyx/models/email_message_create_params.rb', line 127

optional :reply_to_all, Telnyx::Internal::Type::Boolean, nil?: true

#sandbox_modeBoolean?

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


132
# File 'lib/telnyx/models/email_message_create_params.rb', line 132

optional :sandbox_mode, Telnyx::Internal::Type::Boolean

#scheduled_atTime?

Future ISO 8601 time to schedule sending. Invalid or past timestamps are silently ignored and the email is sent immediately. The legacy alias send_at is still accepted for backward compatibility; when both are provided, scheduled_at wins.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


141
# File 'lib/telnyx/models/email_message_create_params.rb', line 141

optional :scheduled_at, Time, nil?: true

#send_atTime?

Deprecated.

Deprecated alias for scheduled_at.

Parameters:

  • (Time)

Returns:

  • (Time, nil)


149
# File 'lib/telnyx/models/email_message_create_params.rb', line 149

optional :send_at, Time

#subjectString?

Required unless template_id is supplied. When using a template, the template's subject is rendered; if the template has no subject or renders empty, the request returns 400.

Parameters:

  • (String)

Returns:

  • (String, nil)


157
# File 'lib/telnyx/models/email_message_create_params.rb', line 157

optional :subject, String

#tagsArray<String>?

Tags for categorization and reporting. Stored on the message and propagated to Email Detail Records. Not returned in API responses.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


164
# File 'lib/telnyx/models/email_message_create_params.rb', line 164

optional :tags, Telnyx::Internal::Type::ArrayOf[String]

#template_idString?

Parameters:

  • (String)

Returns:

  • (String, nil)


169
# File 'lib/telnyx/models/email_message_create_params.rb', line 169

optional :template_id, String

#template_variablesHash{Symbol=>Object}?

Variables for Liquid template rendering. Non-object values may cause a 422 validation error on message creation, but are silently treated as an empty object for template rendering.

Parameters:

  • (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object}, nil)


177
# File 'lib/telnyx/models/email_message_create_params.rb', line 177

optional :template_variables, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]

#text_bodyString?

Plain text email body. Returned only by GET /email_messages/{id}; omitted from create and list responses.

Parameters:

  • (String)

Returns:

  • (String, nil)


184
# File 'lib/telnyx/models/email_message_create_params.rb', line 184

optional :text_body, String

#toArray<String, Telnyx::Models::EmailInboxes::EmailAddress>

Parameters:

  • value (::Array[Telnyx::Models::email_address_input])

Returns:



18
# File 'lib/telnyx/models/email_message_create_params.rb', line 18

required :to, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::EmailAddressInput] }

#tracking_settingsTelnyx::Models::TrackingSettings?

Per-send open and click tracking overrides. Omitted properties inherit the sender domain's tracking settings.



191
# File 'lib/telnyx/models/email_message_create_params.rb', line 191

optional :tracking_settings, -> { Telnyx::TrackingSettings }

Instance Method Details

#to_hash{

Returns:

  • ({)


168
# File 'sig/telnyx/models/email_message_create_params.rbs', line 168

def to_hash: -> {