preview_email_template(template_id?, direction_path_id?, job_id?, candidate_id?, cta_style?, avoid?, subject_pattern?, must_include?, anchor_examples?)
Renders a sample outreach email from a template against an approved direction. The first call returns a job id. A later call with that job id returns the sample subject and body. When no candidate is named, the server picks the newest contactable one on that direction. Optional brief fields apply to this sample only and do not save the template. The result has no recipient email, name, or phone.
Parameters
- template_idstringOptional
- Template to sample. Required to start. Omit when reading a job.
- direction_path_idstringOptional
- Approved direction to sample against. Required to start. Omit when reading a job.
- job_idstringOptional
- Job id from the first call. Pass it to read the sample.
- candidate_idstringOptional
- Candidate to sample. Omit to use the newest contactable candidate on the direction.
- cta_stylestringOptional
- Overrides the saved ask for this sample only.
- avoidarrayOptional
- Overrides the saved avoid list for this sample only.
- subject_patternstringOptional
- Overrides the saved subject guidance for this sample only.
- must_includearrayOptional
- Overrides the saved must-include list for this sample only.
- anchor_examplesarrayOptional
- Overrides the saved examples for this sample only.
Returns
- job_idstring
- Present when a sample is started or still running.
- statestring
- Job state for that call.
- subjectstring
- Sample subject when the job has finished.
- body_textstring
- Sample body when the job has finished. No recipient email, name, or phone.