Email Templates
Create a new email template using AI
Email Templates
- The Email Template object
- GETList all email templates for a business
- POSTCreate an email template
- POSTCreate a new email template using AI
- POSTCopy a project email template into a specific business
- GETRetrieve an email template
- GETPreview an email template
- GETPreview an email template as an image
- POSTUpdate an email template
- DELDelete an email template
Email Template Embeds
Project Email Templates
Business Email Addresses
Project Email Addresses
Emails
SMS Templates
SMS Template Embeds
SMS Messages
Business Phone Numbers
Project Phone Numbers
Campaigns
- The Campaign object
- The Campaign Execution object
- GETList all campaigns
- POSTCreate a campaign
- GETRetrieve a campaign
- GETView a campaign interactively
- GETPreview a campaign
- GETPreview a campaign as an image
- POSTUpdate a campaign
- POSTStart a campaign
- POSTStop a campaign
- DELDelete a campaign
- GETGet the executions of a campaign
Campaign Embeds
Triggers
Email Templates
Create a new email template using AI
POST
/
businesses
/
{id}
/
email_templates
/
ai
curl --request POST \
--url https://api.pocketflows.com/businesses/{id}/email_templates/ai \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"description": "<string>"
}'
{
"id": "<string>",
"name": "<string>",
"subject": "<string>",
"body": "<string>",
"template_json": "<any>",
"template_html": "<string>",
"attachments": [
{
"content": "<string>",
"name": "<string>"
}
]
}
This endpoint can take a while to return an email template. Streaming responses coming soon
Authorizations
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Path Parameters
The ID of the business
Body
application/json
Response
200 - application/json
An EmailTemplate
object generated by AI
The response is of type object
.
curl --request POST \
--url https://api.pocketflows.com/businesses/{id}/email_templates/ai \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"description": "<string>"
}'
{
"id": "<string>",
"name": "<string>",
"subject": "<string>",
"body": "<string>",
"template_json": "<any>",
"template_html": "<string>",
"attachments": [
{
"content": "<string>",
"name": "<string>"
}
]
}