{ "openapi" : "3.0.1", "info" : { "title" : "Automation Email Templates", "description" : "Basepom for all HubSpot Projects", "version" : "2026-09-beta", "x-hubspot-product-tier-requirements" : { "marketing" : "FREE", "sales" : "FREE", "service" : "FREE", "cms" : "FREE", "commerce" : "FREE", "crmHub" : "FREE", "dataHub" : "FREE" } }, "servers" : [ { "url" : "https://api.hubapi.com" } ], "tags" : [ { "name" : "Basic" } ], "paths" : { "/automation/email-templates/2026-09-beta" : { "get" : { "tags" : [ "Basic" ], "summary" : "List templates", "description" : "Retrieve a list of email templates available in the HubSpot account. This endpoint supports pagination to navigate through large sets of templates. Use this endpoint to access and manage your email templates efficiently. Please note: the scopes for these endpoints require user-level access and will not work for existing apps with portal-level access. ", "operationId" : "get-/automation/email-templates/2026-09-beta_/automation/email-templates/2026-09-beta", "parameters" : [ { "name" : "after", "in" : "query", "description" : "The paging cursor token of the last successfully read resource, returned as the `paging.next.after` JSON property of a paged response containing more results.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The maximum number of results to display per page. Defaults to 20.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "example" : null, "default" : 20 } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CollectionResponsePublicTemplateForwardPaging" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "sales-templates-public-read" ] } ], "x-hubspot-user-level-auth" : { "internalOnly" : false } }, "post" : { "tags" : [ "Basic" ], "summary" : "Create", "description" : "Create a new email template in your HubSpot account. This endpoint allows you to define the template's name, subject, body, and optionally assign it to a folder. The request must include the template's body and name. Please note: the scopes for these endpoints require user-level access and will not work for existing apps with portal-level access. ", "operationId" : "post-/automation/email-templates/2026-09-beta_/automation/email-templates/2026-09-beta", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicTemplateInput" }, "example" : null } }, "required" : true }, "responses" : { "201" : { "description" : "successful operation", "headers" : { "Location" : { "description" : "URL of the newly created resource", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } }, "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicTemplate" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "sales-templates-public-write" ] } ], "x-hubspot-user-level-auth" : { "internalOnly" : false } } }, "/automation/email-templates/2026-09-beta/folders" : { "get" : { "tags" : [ "Basic" ], "summary" : "List folders", "description" : "Retrieve a list of email template folders available in your HubSpot account. This endpoint supports pagination to navigate through large sets of folders. Use this endpoint to organize and manage your email templates efficiently. Please note: the scopes for these endpoints require user-level access and will not work for existing apps with portal-level access. ", "operationId" : "get-/automation/email-templates/2026-09-beta/folders_/automation/email-templates/2026-09-beta/folders", "parameters" : [ { "name" : "after", "in" : "query", "description" : "The paging cursor token of the last successfully read resource. Use this token to retrieve the next set of results.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The maximum number of results to display per page. Defaults to 20.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "example" : null, "default" : 20 } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CollectionResponsePublicFolderForwardPaging" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "sales-templates-public-read" ] } ], "x-hubspot-user-level-auth" : { "internalOnly" : false } } }, "/automation/email-templates/2026-09-beta/{templateId}" : { "get" : { "tags" : [ "Basic" ], "summary" : "Retrieve template", "description" : "Retrieve a specific email template by its unique identifier. This endpoint allows you to access the details of an email template, which can be useful for reviewing or managing your email automation strategies. Please note: the scopes for these endpoints require user-level access and will not work for existing apps with portal-level access. ", "operationId" : "get-/automation/email-templates/2026-09-beta/{templateId}_/automation/email-templates/2026-09-beta/{templateId}", "parameters" : [ { "name" : "templateId", "in" : "path", "description" : "The unique identifier of the email template to retrieve.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "integer", "format" : "int64", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicTemplate" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "sales-templates-public-read" ] } ], "x-hubspot-user-level-auth" : { "internalOnly" : false } }, "patch" : { "tags" : [ "Basic" ], "summary" : "Update template", "description" : "Update an existing email template in your HubSpot account. This endpoint allows you to modify the template's properties such as name, subject, body, and folderId. Ensure that the templateId provided corresponds to an existing template. Please note: the scopes for these endpoints require user-level access and will not work for existing apps with portal-level access. ", "operationId" : "patch-/automation/email-templates/2026-09-beta/{templateId}_/automation/email-templates/2026-09-beta/{templateId}", "parameters" : [ { "name" : "templateId", "in" : "path", "description" : "The unique identifier of the email template to update.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "integer", "format" : "int64", "example" : null } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicTemplateUpdate" }, "example" : null } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicTemplate" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "sales-templates-public-write" ] } ], "x-hubspot-user-level-auth" : { "internalOnly" : false } } } }, "components" : { "schemas" : { "CollectionResponsePublicFolderForwardPaging" : { "required" : [ "results" ], "type" : "object", "properties" : { "paging" : { "$ref" : "#/components/schemas/ForwardPaging" }, "results" : { "type" : "array", "description" : "An array of PublicFolder objects, each representing a folder containing email templates.", "example" : null, "items" : { "$ref" : "#/components/schemas/PublicFolder" } } }, "example" : null }, "CollectionResponsePublicTemplateForwardPaging" : { "required" : [ "results" ], "type" : "object", "properties" : { "paging" : { "$ref" : "#/components/schemas/ForwardPaging" }, "results" : { "type" : "array", "description" : "An array of public templates. Each item in the array is an object representing a template with properties such as id, name, subject, body, folderId, ownerId, createdAt, and updatedAt.", "example" : null, "items" : { "$ref" : "#/components/schemas/PublicTemplate" } } }, "example" : null }, "Error" : { "required" : [ "category", "correlationId", "message" ], "type" : "object", "properties" : { "category" : { "type" : "string", "description" : "The error category, represented as a string.", "example" : null }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "description" : "An object providing context about the error condition, with additional properties as arrays of strings.", "example" : "{invalidPropertyName=[propertyValue], missingScopes=[scope1, scope2]}" }, "correlationId" : { "type" : "string", "description" : "A unique identifier for the request, formatted as a UUID. Include this value with any error reports or support tickets.", "format" : "uuid", "example" : "aeb5f871-7f07-4993-9211-075dc63e7cbf" }, "errors" : { "type" : "array", "description" : "An array providing further information about the error, with each item being an ErrorDetail object.", "example" : null, "items" : { "$ref" : "#/components/schemas/ErrorDetail" } }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "A map of link names to associated URIs containing documentation about the error or recommended remediation steps, represented as an object with string properties.", "example" : null }, "message" : { "type" : "string", "description" : "A human readable message describing the error along with remediation steps where appropriate. It is a string.", "example" : "An error occurred" }, "subCategory" : { "type" : "string", "description" : "A specific category that contains more specific detail about the error, represented as a string.", "example" : null } }, "example" : { "message" : "Invalid input (details will vary based on the error)", "correlationId" : "aeb5f871-7f07-4993-9211-075dc63e7cbf", "category" : "VALIDATION_ERROR", "links" : { "knowledge-base" : "https://www.hubspot.com/products/service/knowledge-base" } } }, "ErrorDetail" : { "required" : [ "message" ], "type" : "object", "properties" : { "code" : { "type" : "string", "description" : "The status code associated with the error detail.", "example" : null }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "description" : "Context about the error condition, represented as an object where each key is a context name and the value is an array of strings providing additional details.", "example" : "{missingScopes=[scope1, scope2]}" }, "in" : { "type" : "string", "description" : "The name of the field or parameter in which the error was found.", "example" : null }, "message" : { "type" : "string", "description" : "A human readable message describing the error along with remediation steps where appropriate. This is a required field.", "example" : null }, "subCategory" : { "type" : "string", "description" : "A specific category that contains more specific detail about the error.", "example" : null } }, "example" : null }, "ForwardPaging" : { "type" : "object", "properties" : { "next" : { "$ref" : "#/components/schemas/NextPage" } }, "example" : null }, "NextPage" : { "required" : [ "after" ], "type" : "object", "properties" : { "after" : { "type" : "string", "description" : "A string that serves as the paging cursor token, indicating the position after the last successfully read resource.", "example" : null }, "link" : { "type" : "string", "description" : "A string representing the URL link to the next page of results.", "example" : null } }, "description" : "Specifies the paging information needed to retrieve the next set of results in a paginated API response", "example" : null }, "PublicFolder" : { "required" : [ "id" ], "type" : "object", "properties" : { "createdAt" : { "type" : "integer", "description" : "The timestamp indicating when the folder was created, represented as an integer in int64 format.", "format" : "int64", "example" : null }, "id" : { "type" : "string", "description" : "The unique identifier for the folder, represented as a string.", "example" : null }, "name" : { "type" : "string", "description" : "The name of the folder, represented as a string.", "example" : null }, "updatedAt" : { "type" : "integer", "description" : "The timestamp indicating when the folder was last updated, represented as an integer in int64 format.", "format" : "int64", "example" : null } }, "example" : null }, "PublicTemplate" : { "required" : [ "id" ], "type" : "object", "properties" : { "body" : { "type" : "string", "description" : "The content of the email template, represented as a string.", "example" : null }, "createdAt" : { "type" : "integer", "description" : "The timestamp indicating when the email template was created, represented as an integer in int64 format.", "format" : "int64", "example" : null }, "folderId" : { "type" : "string", "description" : "The identifier of the folder where the email template is stored, represented as a string.", "example" : null }, "id" : { "type" : "string", "description" : "The unique identifier for the email template, represented as a string.", "example" : null }, "name" : { "type" : "string", "description" : "The name of the email template, represented as a string.", "example" : null }, "ownerId" : { "type" : "string", "description" : "The identifier of the owner of the email template, represented as a string.", "example" : null }, "subject" : { "type" : "string", "description" : "The subject line of the email template, represented as a string.", "example" : null }, "updatedAt" : { "type" : "integer", "description" : "The timestamp indicating when the email template was last updated, represented as an integer in int64 format.", "format" : "int64", "example" : null } }, "example" : null }, "PublicTemplateInput" : { "required" : [ "body", "name" ], "type" : "object", "properties" : { "body" : { "type" : "string", "description" : "The main content of the email template. This is a required field and must be a string.", "example" : null }, "folderId" : { "type" : "string", "description" : "The identifier of the folder in which the template is stored. This is an optional field and must be a string if provided.", "example" : null }, "name" : { "type" : "string", "description" : "The name of the email template. This is a required field and must be a string.", "example" : null }, "subject" : { "type" : "string", "description" : "The subject line of the email template. This is an optional field and must be a string if provided.", "example" : null } }, "example" : null }, "PublicTemplateUpdate" : { "required" : [ "body", "folderId", "name", "subject" ], "type" : "object", "properties" : { "body" : { "type" : "object", "properties" : { }, "description" : "An object representing the body content of the email template.", "example" : null }, "folderId" : { "type" : "object", "properties" : { }, "description" : "An object representing the identifier of the folder where the email template is stored.", "example" : null }, "name" : { "type" : "object", "properties" : { }, "description" : "An object representing the name of the email template.", "example" : null }, "subject" : { "type" : "object", "properties" : { }, "description" : "An object representing the subject line of the email template.", "example" : null } }, "example" : null } }, "responses" : { "Error" : { "description" : "An error occurred.", "content" : { "*/*" : { "schema" : { "$ref" : "#/components/schemas/Error" }, "example" : null } } } }, "securitySchemes" : { "developer_hapikey" : { "type" : "apiKey", "name" : "hapikey", "in" : "query" }, "oauth2" : { "type" : "oauth2", "flows" : { "authorizationCode" : { "authorizationUrl" : "https://app.hubspot.com/oauth/authorize", "tokenUrl" : "https://api.hubapi.com/oauth/v1/token", "scopes" : { "sales-templates-public-read" : "", "sales-templates-public-write" : "" } } } }, "private_apps" : { "type" : "apiKey", "name" : "private-app", "in" : "header" }, "private_apps_legacy" : { "type" : "apiKey", "name" : "private-app-legacy", "in" : "header" } } }, "x-hubspot-product-tier-requirements" : { "marketing" : "FREE", "sales" : "FREE", "service" : "FREE", "cms" : "FREE", "commerce" : "FREE", "crmHub" : "FREE", "dataHub" : "FREE" } }