For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomepageProduct HelpLog inTry for Free
Developers HomeAPI ReferenceMCP
Developers HomeAPI ReferenceMCP
  • Getting Started
    • Introduction
    • Authentication with API Keys
    • Authentication with OAuth
    • API Clients
    • Pagination
    • Specifying Fields
    • Filter Parameters
    • HTTP Response Codes
    • Rate Limits
    • Timezone Offsets
    • Rich Text Fields
    • Changelog
  • CRM Core
    • Leads
    • Contacts
    • Opportunities
    • Tasks
    • Files
    • Custom Objects
    • Comments
  • Activities
    • Activities
    • Notes
    • Calls
    • Emails
    • Email Threads
    • WhatsApp Messages
    • Meetings
    • Custom Activities
    • Creations
    • Form Submissions
    • Lead Status Changes
    • Opportunity Status Changes
    • Lead Merges
    • Task Completions
  • Events & Webhooks
    • Webhooks
    • Events
  • Search & Reporting
    • Advanced Filtering
    • Smart Views
    • Reporting
  • Automation & Bulk Actions
    • Sequences (Workflows)
    • Bulk Actions
    • Exports
    • AI Field Enrichment
  • CRM Configuration
    • Custom Fields
    • Custom Activity Types
    • Custom Object Types
    • Pipelines
    • Opportunity Statuses
    • Lead Statuses
    • Integration Links
    • Forms
  • Communication Configuration
    • Email Templates
      • GETList email templates
      • POSTCreate an email template
      • GETFetch an email template
      • PUTUpdate an email template
      • DELDelete an email template
      • GETRender an email template
    • SMS Templates
    • Outcomes
    • Playbooks
    • Scheduling Links Guide
    • Scheduling Links
    • Connected Accounts
    • Send As
    • Unsubscribed Emails
    • Phone Numbers
    • Blocked Phone Numbers
    • Dialers
  • Users & Organizations
    • Users
    • Organizations
    • Memberships
    • Roles
    • Groups
Close

Product

OverviewCommunicationAutomationIntegrationsReportingSMSCallingSecurityForms

Pricing & Use Cases

PricingClose vs Other CRMsCustomer Stories

Resources

Sales BlogSales ResourcesSales GuidesWebinarsOn-Demand DemoSales Tools

Company

AboutCareersPartner with CloseBrand GuidelinesTermsPrivacyGDPRCCPA

Get Help

+1-833-GO-CLOSEHelp CenterDownload the Close AppProduct UpdatesSystem Status
LogoLogo
HomepageProduct HelpLog inTry for Free
Communication ConfigurationEmail Templates

Render an email template

||View as Markdown|
GET
https://api.close.com/api/v1/email_template/:id/render/
GET
/api/v1/email_template/:id/render/
$curl https://api.close.com/api/v1/email_template/id/render/ \
> -u "<CLOSE_API_KEY>:"
1{
2 "body": "Hi John,\n\nI hope you are having a great day.\n\nFrom,\nPhil\nphil@close.com",
3 "contact_display_name": "John Smith",
4 "contact_id": "cont_NdKMSOuamgB8ZlbNJW2WP17hfL3jQmf0hW6X8ichwQk",
5 "email": "john@example.com",
6 "lead_display_name": "Bluth Company",
7 "lead_id": "lead_vYaUG0D39KdBeqVHbPkmvqaYopsdCBmDXW3tvJgwc2L",
8 "subject": "Checking In"
9}
Render an email template for the given lead/contact using the current user context. Accepts two forms of usage: - Single lead/contact: - `lead_id` and `contact_id` is supplied (both required) - Preview results from a search query - `query` (required) contains a search query - `entry` (optional, ranges from 0 to 99) specifies the index of the lead/contact that should be rendered. - `mode` (optional), which can have a value of: - `lead` (default), the first contact of the lead with the index given by `entry` will be rendered (excluding leads that have no email addresses). - `contact`, then `entry` refers to the index of the contact (excluding contacts that have no emails). Will return an empty dict if there are no more entries.
Was this page helpful?
Previous

Delete an email template

Next

SMS Templates

Built with

Render an email template for the given lead/contact using the current user context.

Accepts two forms of usage:

  • Single lead/contact:
    • lead_id and contact_id is supplied (both required)
  • Preview results from a search query
    • query (required) contains a search query
    • entry (optional, ranges from 0 to 99) specifies the index of the lead/contact that should be rendered.
    • mode (optional), which can have a value of:
      • lead (default), the first contact of the lead with the index given by entry will be rendered (excluding leads that have no email addresses).
      • contact, then entry refers to the index of the contact (excluding contacts that have no emails). Will return an empty dict if there are no more entries.

Authentication

AuthorizationBasic
Use your API key as the username and leave the password empty.
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

idstringRequired

Query parameters

email_account_idstringOptional
bulk_object_typeenumOptional
Allowed values:
contact_idstringOptional
contact_preferenceenumOptional
Allowed values:
entryintegerOptional0-100
lead_idstringOptional
limitintegerOptional
querystringOptional
results_limitintegerOptional
s_querystringOptional
senderstringOptionalformat: "email"
sortlist of objectsOptional
modeenumOptional
Allowed values:

Response

Successful response

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error