Optimizely Email Templates API
The Email Templates API from Optimizely — 10 operation(s) for email templates.
Operations 14
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Ask an LLM
“How can I see all the email templates set up in Commerce admin?”
“Can I filter the email template list by website?”
Tell an agent
List every email template.
Show the email templates matching {filter}.
POST
/api/v1/admin/EmailTemplates
Create a new email template · Post a new entity to EntitySet EmailTemplates
#
Ask an LLM
“What do I need to supply to add a new email template?”
“Can I create an email template for a specific website?”
Tell an agent
Create an email template named {name} described as {description}.
Add email template {name} for website {websiteId} with description {description}.
GET
/api/v1/admin/EmailTemplates({id})
Get one email template by id · Returns the entity with the key from EmailTemplates
#
Ask an LLM
“How do I open a single email template record?”
“What details are stored for one email template?”
Tell an agent
Fetch email template {id}.
Show me everything about email template {id}.
PUT
/api/v1/admin/EmailTemplates({id})
Replace an email template record · Replace entity in EntitySet EmailTemplates
#
Ask an LLM
“Can I replace an entire email template record in one request?”
“Does a full replace of an email template require the name and description again?”
Tell an agent
Replace email template {id} with name {name} and description {description}.
Overwrite the whole email template {id} record.
DELETE
/api/v1/admin/EmailTemplates({id})
Delete a single email template · Delete entity in EntitySet EmailTemplates
#
Ask an LLM
“How do I delete one email template by id?”
“Can I guard an email template delete with an ETag check?”
Tell an agent destructive · confirm first
Delete email template {id}.
Delete email template {id} if its ETag is still {etag}.
PATCH
/api/v1/admin/EmailTemplates({id})
Rename or edit part of an email template · Update entity in EntitySet EmailTemplates
#
Ask an LLM
“Can I just rename an email template without replacing it?”
“Is there a partial update for an email template's description?”
Tell an agent
Rename email template {id} to {name}.
Change the description of email template {id} to {description}.
GET
/api/v1/admin/EmailTemplates/Default.Default()
Get default values for a new email template · Call operation Default
#
Ask an LLM
“What values does a new email template record start with?”
“Is there a blank email template entity I can fill in?”
Tell an agent
Get the default field values for a new email template entity.
Show the blank email template record.
GET
/api/v1/admin/EmailTemplates/Default.defaulttemplates()
List built-in default templates via OData action · Call operation defaulttemplates
#
Ask an LLM
“Which built-in default email templates ship with the platform, via the OData defaulttemplates function?”
“Can I call Default.defaulttemplates() to see the stock templates?”
Tell an agent
Call the OData defaulttemplates function to list stock email templates.
Show the built-in email templates using Default.defaulttemplates().
POST
/api/v1/admin/EmailTemplates/Default.createdefaulttemplate
Create a stock template via the OData action · Call operation createdefaulttemplate
#
Ask an LLM
“How do I install one of the built-in email templates for a website with the OData createdefaulttemplate action?”
“Can the Default.createdefaulttemplate action target a specific website?”
Tell an agent
Run createdefaulttemplate to add stock template {defaultTemplate} for website {websiteId}.
Install the built-in email template {defaultTemplate} with the OData action.
GET
/api/v1/admin/emailtemplates/defaultTemplates
List built-in default templates via REST route · Email templates default templates 2
#
Ask an LLM
“Is there a plain REST route that lists the stock email templates?”
“What does the emailtemplates/defaultTemplates route return?”
Tell an agent
Get the default email templates from the defaultTemplates route.
List the stock email templates using the REST-style route.
POST
/api/v1/admin/emailtemplates/createDefaultTemplate
Create a stock template via the REST route · Email templates create default template 2
#
Ask an LLM
“Can I create a default email template through the createDefaultTemplate REST route?”
“What does posting to emailtemplates/createDefaultTemplate do?”
Tell an agent
Create a default email template using the createDefaultTemplate route.
Post to the REST createDefaultTemplate endpoint to add a stock template.
DELETE
/api/v1/admin/emailtemplates/delete
Delete several email templates at once · Email templates delete route
#
Ask an LLM
“How do I bulk delete multiple email templates?”
“Can I remove a list of email templates by id in one call?”
Tell an agent destructive · confirm first
Bulk delete email templates {ids}.
Permanently remove every email template in {ids}.
GET
/api/v1/admin/emailtemplates({key})/customproperties({custompropertyKey})
Get a custom property on an email template · Email templates get custom property by key and custompropertykey
#
Ask an LLM
“How do I read a custom property stored on an email template?”
“Can I fetch one custom field from an email template?”
Tell an agent
Get custom property {custompropertyKey} of email template {key}.
Show the custom property {custompropertyKey} value on email template {key}.
GET
/api/v1/admin/emailtemplates({key})/emaillists({emaillistKey})
Get an email list that uses a template · Email templates get email list by key and emaillistkey
#
Ask an LLM
“Which email list is tied to a given email template?”
“Can I look up one email list through its template?”
Tell an agent
Get email list {emaillistKey} for email template {key}.
Show the email list {emaillistKey} that uses template {key}.