{"method":"POST","path":"https://api.revcent.com/v2/smtp_messages","summary":"Send A SMTP Message","description":"Send an SMTP message using an Email Template ID and optional custom arguments determined by the Email Template used. DO NOT send a SMTP message unless explicitly told to do so by the user. When using an email template to send a SMTP message it is extremely important to review the custom_arguments array for the Email Template being used and provide the necessary custom arguments with their inferred values. If the SMTP Message is being send with an item_type and item_id and has custom arguments, you should: 1. Get the details of the item, if not having done so already. 2. After retrieving the details of the item, review the custom arguments of the Email Template, specifically each custom arguments' description. 3. Send the SMTP Message with the custom arguments and their inferred values. If you do not have an email template ID or an email template ID is invalid, automatically get a list of available email templates and their ID's using the GetEmailTemplates operation and find the appropriate Email Template. View markdown documentation at https://revcent.com/documentation/markdown/mcp/operation/SendSMTPMessage.md for an in-depth overview of this operation.","operationId":"SendSMTPMessage","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"email_template_id":{"type":"string","description":"A 20 character Email Template ID which will be used to send the SMTP message. If you do not have an email template ID or an email template ID is invalid, automatically get a list of available email templates and their ID's using the GetEmailTemplates operation and find the appropriate Email Template.","minLength":20,"maxLength":20},"to":{"description":"An optional array of email addresses that the SMTP message should send to. An Email Template may already have pre-defined recipients, which will not be overwritten and will be de-duplicated.","type":"array","items":{"type":"string","description":"An individual email address that should be included in the 'to' recipient list."}},"cc":{"description":"An optional array of CC email addresses that the SMTP message should send to. An Email Template may already have pre-defined cc recipients, which will not be overwritten and will be de-duplicated.","type":"array","items":{"type":"string","description":"An individual email address that should be included in the 'cc' recipient list."}},"bcc":{"description":"An optional array of BCC email addresses that the SMTP message should send to. An Email Template may already have pre-defined bcc recipients, which will not be overwritten and will be de-duplicated.","type":"array","items":{"type":"string","description":"An individual email address that should be included in the 'bcc' recipient list."}},"item_type":{"type":"string","description":"If the SMTP message is in reference to, or during the processing of an specific item, specify the item_type.","enum":["sale","customer","product_sale","shipping","subscription","subscription_renewal","salvage_transaction","transaction","chargeback","fraud_detection"]},"item_id":{"type":"string","description":"If the SMTP message is in reference to, or during the processing of specific item, provide the ID of the item corresponding to the item_type.","minLength":20,"maxLength":20},"custom_arguments":{"description":"An array of custom arguments, specific to the Email Template being triggered if the Email Template has a non-empty custom_arguments array. When sending an SMTP message it is extremely important to review the Email Templates' custom_arguments array and provide the necessary custom arguments with their inferred values.","type":"array","items":{"type":"object","additionalProperties":false,"properties":{"name":{"description":"The name of the custom argument, which should be the name within the custom_arguments array from the source Email Template.","type":"string"},"value":{"description":"The value of the custom argument. Read the custom arguments' description from the source Email Template, then infer the value when sending the SMTP message. The description instructs/describes what the value should be, i.e. infer the value using the description.","type":"string"}}}}},"type":"object","required":["email_template_id"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"API call response code.","type":"integer","format":"int32","enum":[1]},"smtp_message_id":{"type":"string","title":"SMTP Message ID","description":"A 20 character SMTP Message ID.","minLength":20,"maxLength":20},"result":{"type":"string"}},"type":"object","additionalProperties":false}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"This value indicates that there is an error. Will always be 0.","type":"integer","enum":[0]},"error_code":{"description":"The specific error code.","type":"string"},"message":{"description":"A human readable description of the error.","type":"string"},"result":{"description":"A description of the API call result.","type":"string"}},"title":"APIStandardErrors","type":"object","additionalProperties":false}}},"description":"Error response."}}}