NetSuite REST Azerion icon

NetSuite REST Azerion

Call NetSuite SuiteTalk REST operations.

Actions981

Email Template → Insert or update record

AI-generated

Summary

Insert or update Email Template

Inputs

  • id (required) — External identifier of the template; required for updates.
  • isDebugMode — Include full request and response details in the output.
  • authMethod — Authentication method for NetSuite connection (oauth1 or oauth2).
  • additionalFields — Collection of bulk merge options such as adding company address or unsubscribe link.
  • mediaItem — Media item to attach to the template; can specify internal or external identifier.
  • isInactive — Check to make the template inactive and unavailable for sending.
  • name — Human‑readable name of the email template.
  • scriptid — Script ID to reference the template programmatically.
  • subject — Default subject line for emails generated from the template.
  • templateType — Type of template (e.g., MAIL, PDF).
  • replace — Names of sublists to replace in bulk updates.
  • replaceSelectedFields — When true, deletions must be listed in the replace query parameter.
  • Prefer — Request execution preference; 'respond-async' makes the call asynchronous.
  • X-NetSuite-Idempotency-Key — Unique key to ensure idempotent execution of async requests.
  • X-NetSuite-PropertyNameValidation — Controls strictness of property name validation.
  • X-NetSuite-PropertyValueValidation — Controls strictness of property value validation.
  • customFields — Custom fields attached to the template; can include various field types.

Output shape

a single Email Template record

Returns the created or updated template; may include all fields of the record. Success returns the full record, failure returns an error object.

Examples

Example 1: Create a new email template

Provide name, subject, content, and required auth method; leave id empty to insert a new record.

Example 2: Update an existing template

Set the id of the template to update and fill in desired changes such as subject or additional fields.

Example 3: Bulk merge with extra footer options

Enable addCompanyAddress and addUnsubscribeLink, optionally supply customFields, and set Prefer to 'respond-async' for asynchronous processing.

Links

Discussion